Re: How to use 'paginate' in hasMany Associations

2008-06-26 Thread majna
Controller: $this-paginate = array( 'params' = array($id)); in view add: if (isset($paginate['params'])) { $paginator-options(array('url' = $paginate['params'])); } On Jun 26, 3:57 am, rain [EMAIL PROTECTED] wrote: BTW I am using the cakephp 1.2 rc1 On Jun 26, 8:52 am, rain

Detect cookies

2008-06-26 Thread dandreta
Hi! I have used the OthAuth component for the access to my application, defining the groups and permissions. If in the browser the cookies are not activated, on login the user cannot enter to the restricted functions because the permissions are not loaded in the session. What I want is if a user

AjaxHelper - Adding an observeField to a dynamic div?

2008-06-26 Thread Mike
Hello! I've looked at the docs, at the API, and a little bit at the source, as well as Googling around for this, but I can't seem to find any answers, and I'm kinda stuck :) I'm trying to use the Cake 1.2.0.6311 (beta) distribution, and I've tried it using both FireFox 3 and IE 7.0.5730.13 I'm

Don't Know How to Delete

2008-06-26 Thread KURT
Basically, this is my codes: users_controller.php: function admin_delete($id = null) { $username = $this-Session-read('user'); $user = $this-Acl-Aro-findByAlias($username); if ($username) { if

about url error handling

2008-06-26 Thread rain
let's see a scene: i have a Posts controller, and the controller has a view action. ?php class PostsController extends AppController { var $name = 'Posts'; var $helpers = array('Html', 'Form'); function view($id = null) { if (!$id) {

Re: Cakephp 1.2 l10n and i18n - how to switch current language?!

2008-06-26 Thread biesbjerg
I don't think it's possible to change language mid-page, as you just said, i18n is a singleton and the po/mo file is parsed and loaded once per request. On Jun 25, 6:47 pm, Pento [EMAIL PROTECTED] wrote: Thanks, but it not work correctly when for example auth component is used. Problem

Re: How to use 'paginate' in hasMany Associations

2008-06-26 Thread rain
that's work! thanks! On Jun 26, 2:49 pm, majna [EMAIL PROTECTED] wrote: Controller: $this-paginate = array( 'params' = array($id)); in view add: if (isset($paginate['params'])) {         $paginator-options(array('url' = $paginate['params'])); } On Jun 26, 3:57 am, rain [EMAIL

Re: cake extract in different files problem

2008-06-26 Thread biesbjerg
What rev. are you using? https://trac.cakephp.org/ticket/3519 - Fixed 8 months ago On Jun 23, 9:41 pm, Alberto [EMAIL PROTECTED] wrote: Hi, I was using cake extract and I realized a possible bug in the script. I used the function __d(domain, text) to set the text in different files. When

Re: content-based ACL

2008-06-26 Thread leo
This is all beside the point. Consoles are not the way to backend a website. On 25 Juny, 17:02, phobic [EMAIL PROTECTED] wrote: Hi there. webhuset.no is a norwegian company and offers ssh shell access - Bjarte On Jun 25, 10:22 am, leo [EMAIL PROTECTED] wrote: I know they're out there,

if ( !AMP ) what?

2008-06-26 Thread leo
I'm looking at delivering a web application on a pen drive. It's not especially large, much smaller in fact than the WAMP installation. As it is a USB device, there are bound to be some performance issues, but it is running slower than an external internet installation, even with cacheing. Can

Re: AjaxHelper - Adding an observeField to a dynamic div?

2008-06-26 Thread schneimi
Hi, I am not sure, but it could be a problem like http://groups.google.com/group/cake-php/browse_thread/thread/d7c97c5f6f2ffc8e/db10a26a5d2c113c?show_docid=db10a26a5d2c113c Better use http://bin.cakephp.org/ to post your code. Hope this helps, Michael On 26 Jun., 09:07, Mike [EMAIL PROTECTED]

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread dr. Hannibal Lecter
Dear God. What kind of developer doesn't want to research? Is there a better way to learn how the framework works? The gut of it? I agree, the docs have their flaws. However.. I started leaning Cake about 6 months ago, from scratch. It was a bit tough for the first few days, because of the new

Re: Daily stats (page hits) reporting with cake

2008-06-26 Thread Dr. Tarique Sani
Either select and post process in PHP or Use a second table (temp?) which has the entire date range and do a join on that table... AFAIR the SQL Cookbook had a similar recipe Tarique On Thu, Jun 26, 2008 at 4:00 PM, Fahad [EMAIL PROTECTED] wrote: hi, i am currently working on a site that

Re: Daily stats (page hits) reporting with cake

2008-06-26 Thread dr. Hannibal Lecter
I know this probably won't answer your question, but here goes anyway.. If possible, why not use Google Analytics? On Jun 26, 12:30 pm, Fahad [EMAIL PROTECTED] wrote: hi, i am currently working on a site that requires reporting daily hits of its web pages. this is the SQL structure

Re: Cakephp 1.2 l10n and i18n - how to switch current language?!

2008-06-26 Thread Pento
Thanks for reply! Hmmm, I will have to hack some code in this situation.. On Jun 26, 12:12 pm, biesbjerg [EMAIL PROTECTED] wrote: I don't think it's possible to change language mid-page, as you just said, i18n is a singleton and the po/mo file is parsed and loaded once per request. On Jun

Re: Daily stats (page hits) reporting with cake

2008-06-26 Thread Dr. Tarique Sani
On Thu, Jun 26, 2008 at 5:25 PM, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: I know this probably won't answer your question, but here goes anyway.. If possible, why not use Google Analytics? May be they are working on a Google Analytics killer ;) T --

Re: Daily stats (page hits) reporting with cake

2008-06-26 Thread Fahad
actually, 'page stats' is only an example. i need it mainly for tracking external referral links. i have coded a complete statcounter.com clone back in 2005 - but couldnt run it well because the server became super busy! now i am totally in love with cake, and want to build everything with it.

Re: Daily stats (page hits) reporting with cake

2008-06-26 Thread grigri
Assuming you're using an auto-incrementing id, and entries are never deleted, you could do this: SELECT d1.date,d2.date FROM hits h1 INNER JOIN hits h2 ON (h2.id=h1.id+1) WHERE h1.dateh2.date AND TO_DAYS(h2.date)-TO_DAYS(h1.date)1 cakeified: class Hit extends AppModel {

Re: Daily stats (page hits) reporting with cake

2008-06-26 Thread Fahad Ibnay Heylaal
thanks for the code. will definitely try it :) -- http://frinity.blogspot.com On Thu, Jun 26, 2008 at 6:13 PM, grigri [EMAIL PROTECTED] wrote: Assuming you're using an auto-incrementing id, and entries are never deleted, you could do this: SELECT d1.date,d2.date FROM hits h1 INNER

Re: Daily stats (page hits) reporting with cake

2008-06-26 Thread Fahad
thanks for the code. will definitely try it :) On Jun 26, 6:13 pm, grigri [EMAIL PROTECTED] wrote: Assuming you're using an auto-incrementing id, and entries are never deleted, you could do this: SELECT d1.date,d2.date   FROM hits h1   INNER JOIN hits h2     ON (h2.id=h1.id+1)   WHERE

Re: Cakephp 1.2 l10n and i18n - how to switch current language?!

2008-06-26 Thread Pento
No, but I use Auth component and initialize it in App's beforeFilter. And this component call __( ) function ...and so set language On Jun 26, 4:51 pm, Marcin Domanski [EMAIL PROTECTED] wrote: Het, are you setting the lang in beforeFilter ? greets, On Thu, Jun 26, 2008 at 1:56 PM, Pento

Re: Custom route question

2008-06-26 Thread theChrisWalker
This might be beside the point, and I can't think of a way to do it as you've described without hard coding, but (and it's a big but), why do you have hardcoded controllers for each game/team or game/ match? and given that you do why not hard code the route? It would seem more logical (altough

Re: about url error handling

2008-06-26 Thread rain
i find using cakeerror can do this. On Jun 26, 3:43 pm, rain [EMAIL PROTECTED] wrote: let's see a scene: i have a Posts controller, and the controller has a view action. ?php class PostsController extends AppController { var $name = 'Posts'; var $helpers = array('Html',

exclude default layout from login view

2008-06-26 Thread RJ
Hi, How should i explicitly exclude the default layout from my login page. For the other views , i need the default layout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Showing checkboxes for a related table's HABTM field

2008-06-26 Thread Cylindric
Greetings all. I have a model that consists of Companies and their Contacts. Both Contacts and Companies have one or more HABTM relationships. Account HASMANY Contact Account HABTM Service Contact HABTM Interest Now I have a form for a contact to edit their information, and they can also

new to cake

2008-06-26 Thread codebreak
can any one suggest me about the tutors i am new to cake development ... i have knowledge in php+mysql+ajax+javascript... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Creating cake source code documentation?

2008-06-26 Thread Michael Schmalle
Hi, I'm not saying what is right or wrong but, phpDocumentor is really fast if you have php's tokenizer module installed. This documentor is what PEAR uses for all it's docs. Mike On Thu, Jun 26, 2008 at 5:19 AM, Sudhir Porwal [EMAIL PROTECTED] wrote: I personally prefer doxygen in my

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Michael Schmalle
Hi, Nice comment. I just got into CakePHP (using Drupal) 3 days ago and I'm already making stuff. Why, I know OOP from other areas and this framework really hits OOP on the head. I think that is why people that prefer code igniter to cake want it 'now'. If you have really 'studied' OOP, cake

prob related in input type

2008-06-26 Thread kaushik
I am new Cakephp and facing prob. customizing the default input function. when I am using the below code: ?php echo $form-input('title', array('size' = '40'))? the output is below: div class=input text requiredlabel for=NoteTitleTitle/ labelinput name=data[Note][title] type=text size=40

Re: Don't Know How to Delete

2008-06-26 Thread Michael Schmalle
Hi, I'm no genius with cake yet but I see something that might not be right, In your action, you are not specifying an id to delete. $html-link(__('Delete', true), array('action'='delete', $form-value('User.id')), null. Shouldn't you have, $html-link(__('Delete', true),

Re: Paginate with Containable

2008-06-26 Thread PHP developer
Try this. It will work $this-Post-contain(false, array('Member', 'Topic')); $result = $this-paginate(); On Jun 7, 12:43 pm, NappyHeaded [EMAIL PROTECTED] wrote: I'm having trouble figuring out how to pare down my queries withContainablebehavior when using paginate. Basically, I am showing

Re: new to cake

2008-06-26 Thread Daniel Hofstetter
Hi, can any one suggest me about the tutors i am new to cake development ... i have knowledge in php+mysql+ajax+javascript... Have a look at the blog tutorial in the manual: http://book.cakephp.org/view/219/blog -- Daniel Hofstetter http://cakebaker.42dh.com

Re: authenticate direct downloads

2008-06-26 Thread Jonathan Snook
Yeah, because of your post, I've been careful to mention the whole mime-type thing. :) Has a ticket been opened to add custom media types to the MediaView? On Thu, Jun 26, 2008 at 5:45 AM, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: How about some shameless plugs? :)

Re: exclude default layout from login view

2008-06-26 Thread Jonathan Snook
function login () { $this-layout = 'login'; } On Thu, Jun 26, 2008 at 7:39 AM, RJ [EMAIL PROTECTED] wrote: Hi, How should i explicitly exclude the default layout from my login page. For the other views , i need the default layout --~--~-~--~~~---~--~~ You

Re: prob related in input type

2008-06-26 Thread Jonathan Snook
You'll likely find it easier to code that structure out manually: tr td align=right valign=top class=tblloginTitle :/td td?php echo $form-text('title', array('size'= 40')) ? ?php echo $form-error('title') ?/td /tr If you plan to do this a lot, make your own helper that

Re: What is the easiest way to update?

2008-06-26 Thread Smelly_Eddie
No advice, really? On Jun 25, 9:20 am, Smelly_Eddie [EMAIL PROTECTED] wrote: Hey group, thanks for reading.. I have a rather complex site built on 1.1 THe application does not work at all with 1.2 framework underneath. Is there a way to port 1.1 controllers, models and views to a 1.2

Re: prob related in input type

2008-06-26 Thread grigri
See this thread: http://groups.google.com/group/cake-php/browse_thread/thread/1ff0f7a34261a59b Will probably give you some ideas. (Why are you totally getting rid of the label element, anyway?) hth grigri On Jun 26, 3:51 pm, Jonathan Snook [EMAIL PROTECTED] wrote: You'll likely find it

Re: Multiple checkboxes and inserting descriptions

2008-06-26 Thread b logica
On Tue, Jun 24, 2008 at 7:19 PM, Tad [EMAIL PROTECTED] wrote: Thanks; I know how to grab the info from the database, but what I was wondering is if there is an $option like 'after' that works for each checkbox element, rather than the entire checkbox set. I don't think you understand.

Re: authenticate direct downloads

2008-06-26 Thread dr. Hannibal Lecter
Heh, I'm still amazed by the fact that someone (except my wife) is actually reading that stuff :-) Anyway, as far as I can see, there's only this: https://trac.cakephp.org/ticket/4517 and it's not very clear about it, it looks like it's just add these few types I need. A generic solution

Re: How to make submit image button in php?

2008-06-26 Thread Lance Willett
Try: ?php echo $form-submit('/path/to/image.png'); ? If the button image file is in your /webroot/img/ directory, you can just use the image file name: ?php echo $form-submit('my-button.gif') ? See more in the API docs:

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread dr. Hannibal Lecter
Man, I remember my first contact with ASP.NET/C# .. I felt like being shot with a nail gun *and* run over by a truck. But once you figure it out, it's just logical and simple. Then the new guy comes in and you're just staring at him with that how can you not understand this look. :-) I think

L10n not working at all

2008-06-26 Thread teum
I've been trying to localize my application for hours now. I followed the documentation (1.2), tried a lot of tutorials, read a lot of posts here but I still can't get it working. In my app controller I have this : uses(L10n); class AppController extends Controller { var $components =

Slow page loads, max execution time out

2008-06-26 Thread amfriedman
Hi all I'm developing a social networking app. Performance-wise, the app is working decently well on the live server, but as I've coded and coded over the past few months, it has become increasingly slow on my local development PC. I'm running WAMP on Windows Vista. My only hunch right now is

Re: Slow page loads, max execution time out

2008-06-26 Thread James K
The restrict behavior was brought into the core in RC1. It's now called contain. Replace all your restrict calls with contain instead. amfriedman wrote: Hi all I'm developing a social networking app. Performance-wise, the app is working decently well on the live server, but as I've coded

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Gustavo Carreno
On Wed, Jun 25, 2008 at 8:50 PM, Wayne Madison [EMAIL PROTECTED] wrote: Yes! This discussion thread is about Documentation. The Current Documentation is good. On a scale of 1 to 10, it is a 5. This was a VERY LONG email. I supose it took you quite a while to write up, right? Just to be a

Re: if ( !AMP ) what?

2008-06-26 Thread Gustavo Carreno
On Thu, Jun 26, 2008 at 9:38 AM, leo [EMAIL PROTECTED] wrote: Any advice appreciated. Quick Google: http://www.lokkju.com/blog/archives/category/cakephp/ http://bakery.cakephp.org/articles/view/lighttpd-and-cakephp-setup-in-subdirectories John, aka _psychic_, did something in the past named

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Chris Hartjes
On Thu, Jun 26, 2008 at 1:42 PM, Gustavo Carreno [EMAIL PROTECTED] wrote: Now, with the time you took to cry about your issue and even write this, quite large, email I supose you could do something better with that time: - Register an account at book.cakephp.org - Browse through the contents

Session problem with phpcaptcha component in Cake 1.1

2008-06-26 Thread skoggins
Hi All, I am trying to use the phpcaptcha component with Cake 1.1. and I find that it works fine when a user is logged in but the image does not appear when no one is logged into the site. THis makes me think it is an issue with phpcaptcha needing a Session to be started before it can appear

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread abba bryant
I didn't see anyone else mention this $data = $this-Model-find( 'list', ... ); Wayne Madison wrote: How to add a select option based upon database table to a View(form) Step 1: In the Controller (foo_controller) which will be used to produce the View(Form) foo.cbt that needs a

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread itsnotvalid
I just start learning Cake since last month, I also find some frustration along the way. Things such as requestAction(), beforeFilter() really irritate me as they don't really correspond to the little amount of OOP I have learned. Lately I compared Cake's Auth and DarkAuth and they actually use

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Jonathan Snook
So, to get back to my original point: there is nothing stopping any one from contributing documentation to the CakePHP manual except themselves. I think the biggest hurdle to contributing is just having the confidence in feeling that what is being documented is the correct way to do things.

Re: Slow page loads, max execution time out

2008-06-26 Thread DaveMahon
It's probably a stupid question, but have you clicked on the Context link to find the function in your code that is leading to the errant model queries? On Jun 26, 11:48 am, amfriedman [EMAIL PROTECTED] wrote: Hi all I'm developing a social networking app.  Performance-wise, the app is

Re: Weird 404 error

2008-06-26 Thread Tallbrick
Thanks for the tip Sam, but that didn't seem to work for me. I used your suggestion to modify the .htaccess file in my -top- cake directory: AddType x-mapp-php5 .php IfModule mod_rewrite.c RewriteEngine on RewriteRuleapp$ /app/ [L] RewriteRule^$ app/webroot/[L]

Re: Auth Component the most failment of Cakephp

2008-06-26 Thread Alessio
dear, believe me, that I have taken all possibilities...and calling the parent class... I don't know... Sometimes Auth gives me errors... I am testing.. I am deciding if pass to manual management of users... I will see... Bye On Jun 25, 9:28 pm, the_woodsman [EMAIL PROTECTED] wrote: Just

Fatal Error: Memory exhausted

2008-06-26 Thread Matt Huggins
I'm getting a fatal error regarding my memory being exhausted when performing a very basic CakePHP operation. I'm not sure why I'm getting it or what I can do to fix it. Hopefully someone else can see what's wrong with my code since I seem to be missing something. Here's what I'm doing in my

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Gustavo Carreno
On Thu, Jun 26, 2008 at 7:10 PM, Chris Hartjes [EMAIL PROTECTED] wrote: Gustavo, Thank you for showing the proper way to respond to criticisms about the CakePHP documentation. Well, probably a little less name calling would be appropriate, but heck, I've been awake for more than 24hs doing

Re: Fatal Error: Memory exhausted

2008-06-26 Thread Gustavo Carreno
On Thu, Jun 26, 2008 at 10:30 PM, Matt Huggins [EMAIL PROTECTED] wrote: I'm getting a fatal error regarding my memory being exhausted when performing a very basic CakePHP operation. I'm not sure why I'm getting it or what I can do to fix it. Hopefully someone else can see what's wrong with

Re: table driven select box example for cakePHP ver 1.2.0.xxxxx

2008-06-26 Thread Wayne Madison
Hannibal, Thanks for the alternative solution for a cakePHP selectoption table driven solution! http://dsi.vozibrale.com/articles/view/creating-a-select-box-for-a-related-model Wayne On Jun 26, 6:25 am, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Dear God. What kind of developer doesn't

Re: Which find to use on controller?

2008-06-26 Thread Louie Miranda
Thank you. I have noted your comment. On Sat, Jun 21, 2008 at 2:08 AM, DaveMahon [EMAIL PROTECTED] wrote: Use caution with findAll. It is being deprecated in favor of just generic find. In 1.2 it will continue to work with a warning, but that functionality will go away, likely in Cake 2.0.