Re: Rendering a view for ajax and non ajax

2006-12-04 Thread AD7six
Hi Grant, It's probably wise to take a step back and look at your code with an eye on what methods you should be using. You should not be calling render in your view, or was that typo? Your message implies that you have table_contents.thtml and table_content.thtml, but I can´t really make out

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread TT
Great work, installed new version right away and everything works just good. Switching to lazy-loading is a good decision. CakePHP makes it already easy enough to program, performance should be another concern and in this case the decision to go for performance is definately the right one.

Saving a model from a different controller

2006-12-04 Thread Symen Timmermans
Hello, I'm quite new to CakePHP but there is something very simple I want to do, and I can't get it right. I'm building a website that shows trips people can book. The trip index page is /packages/index I want to log every time someone clicks on a trip in a table called Packagesclicks. So I

Re: Saving a model from a different controller

2006-12-04 Thread Symen Timmermans
Nevermind, I found the solution to my problem using Debug level 2. Because there was no userID in the session, $this-Session-read(usersID) returned null, and the database didn't like inserting null in the packagesclicks table. Sorry. --~--~-~--~~~---~--~~ You

RE: going crazy about update method.

2006-12-04 Thread Mariano Iglesias
Because most probably the model doesn't validate. Can you show us the model? When you get the ID you are not using the model. Also, do this instead of directly saving so you can check what Cake reports: function edit($name) { $this-Config-id =

foreach loop and row color

2006-12-04 Thread mschwer
Hello! To retrieve the Output on my views template i used the normal foreach() loop. ? foreach ($Programms as $programm): ? tr td? echo $programm['Programm']['wann']; ?/td td? echo $programm['Programm']['wo']; ?/td td? echo

Re: foreach loop and row color

2006-12-04 Thread Samuel DeVore
?php foreach ($things as $row=$thing): ? tr ?php e(($row%2)?class='even':class='odd') ?/tr td?php e($thing['field']) ?/td /tr ?php endforeach; ? see if that gives you a hint On 12/4/06, mschwer [EMAIL PROTECTED] wrote: Hello! To retrieve the Output on my views template i used the

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Ismael S. Kafeltz
The change about Model issue was what i asked for! Good Job Bakers!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

RE: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Mariano Iglesias
Well, its not often that you can take something out of the freezer and have it taste better than before, but that's what happened. We received a few more bugs and as Gwoo said in a message last week, speed was an issue. So, with the bugs that came in, we spent some time making things

persistModel documentation

2006-12-04 Thread majna
There is no documentation for $persistModel variable . What's basic usage, and where or when should I use it? tnx. ...and tnx for cake 1.1.11 ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

Re: error messages (validation) ghost text

2006-12-04 Thread Domain Developer
Thank you. I will read through the search results. On Dec 3, 10:09 pm, nate [EMAIL PROTECTED] wrote: http://www.google.com/search?client=safarirls=enq=debugging+css+in+... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: CakePHP highlighted in IBM's PHP project resource website

2006-12-04 Thread Domain Developer
I can't wait for the next installment. On Dec 3, 6:58 pm, francky06l [EMAIL PROTECTED] wrote: Superb, thanks folks.. On Dec 2, 8:33 am, Mariano Iglesias [EMAIL PROTECTED] wrote: Nic... http://www-128.ibm.com/developerworks/opensource/top-projects/php.html P.S: Thanks Domain

Still having problems with retrieving data from HABTM relationships.

2006-12-04 Thread TWIOF
Hello everyone. I've asked similar Q's before but not found the right solution yet. When retrieving HABTM data a $this-That-findAll() works fine in the controller. BUT, if I use a function in the model it wont get the HABTM data: return $this-findAll($conditions, $fields, $order, $limit, null,

RE: Rendering a view for ajax and non ajax

2006-12-04 Thread Grant Davies
Sorry I should be more clear.. When the page is first rendered I have a table generated with content in it. Once the page is up there are some selection boxes to allow you to filter the contents of the table. So the first time the page is rendered there is no ajax call, its just rendered.

Re: Cake is breaking database views. This looks like a bug.

2006-12-04 Thread [EMAIL PROTECTED]
Below is my view. I wonder if my self-joins on people is what throws the mysql PHP connector off so that it does not return the correct table name? Do you know what version of mysql you are using (the PHP module that provides MySQL connectivity? Or are you using mysqli? Mine is a few versions

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Claudio Poli 
thanks for another great release :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

associations problem

2006-12-04 Thread Claudio Poli 
hi guys, I've some association explained here, and they works pretty well. However I want to be able to fetch a User's Profile when querying Article model. I've tried with recursion, but it will just fetch every article that belongsTo this User, and this is not what I want. Should I work with

Re: associations problem

2006-12-04 Thread Jon Bennett
I've some association explained here, and they works pretty well. However I want to be able to fetch a User's Profile when querying Article model. it should be available, like so: $data['Article']['User']['Profile'] if you're also getting every article that a user has made, then yes I'd use

Re: How do I use cookies in cakePHP

2006-12-04 Thread Walker Hamilton
Hi, I also used Rossoft's cookie component as well. I also wanted to easily let users log in (no matter which page they enter on). So here's my attempt to make that happen: http://walkerhamilton.com/437/cakephp-remember-me --~--~-~--~~~---~--~~ You received

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread joel
One thing I'm still not getting a grasp on, with the whole updating-to-the-newest-version-of-cake thing, is that sometimes I notice that files in the app directory have changed. For instance, /app/webroot/index.php is newer. Does it need to be replaced, or do I only have to replace the /cake

Re: associations problem

2006-12-04 Thread Claudio Poli 
thanks, it works. had to use: $this-User-unbindModel(array('hasMany'=array('Article'))); in Article model. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Felix Geisendörfer
Well, most of the times replacing the /cake folder will be enough. Sometimes however, files inside /app change, like /app/webroot/index.php. In those cases you should replace them as well to be on the safe side. In order to see what has changed in those files you can check the SVN difference

RE: How do I use cookies in cakePHP

2006-12-04 Thread Mariano Iglesias
Looking at your code, I would have to say that it is not recommended to add models at the AppController level. Your code is just asking to be made a component :) Something like app/controllers/components/remember_me.php: ?php class RememberMeComponent extends Object { var $components =

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Claudio Poli 
I'm having some problem.. In an application I've loaded a bunch of model into app_controller.php like var $uses = array('Blah', 'Etc'); to be available in every controller; after the upgrade into every controller I go CakePHP tells me that he wants a model with the same name as the controller.

Re: associations problem

2006-12-04 Thread Jon Bennett
Hi, thanks, it works. had to use: $this-User-unbindModel(array('hasMany'=array('Article'))); in Article model. cool, though you could also unbind the (any) association from within your controller, in this case you have ArticlesController, which means you can access User as a child of

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Marcelo de Moraes Serpa
Well, most of the times replacing the /cake folder will be enough. Sometimes however, files inside /app change, like /app/webroot/index.php. In those cases you should replace them as well to be on the safe side. In order to see what has changed in those files you can check the SVN

Re: Still having problems with retrieving data from HABTM relationships.

2006-12-04 Thread TWIOF
right i'm getting somewhere, by reffering to the habtm relationship directly* in my model function i get 2 sql queries generated. ONe for the habtm data one for the related model. *return $this-nameOfModel-findAll($conditions, $fields, $order, $limit, null, 1) but this doesn't offer enough

RE: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Mariano Iglesias
You shouldn't set models at the AppController level. From this post: http://groups-beta.google.com/group/cake-php/browse_thread/thread/df5e0b3a75 d0202a Larry says: You should not define the $uses var in your AppController. When you set the $uses var it should be done in child classes, and

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Claudio Poli
Il giorno 04/dic/06, alle ore 18:05, Mariano Iglesias ha scritto: You shouldn't set models at the AppController level. From this post: http://groups-beta.google.com/group/cake-php/browse_thread/thread/ df5e0b3a75 d0202a Larry says: You should not define the $uses var in your

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Claudio Poli
Il giorno 04/dic/06, alle ore 18:04, joel ha scritto: With this version of Cake, I now get an error on my site which says: Fatal error: Class 'ConnectionManager' not found in /cake/libs/session.php on line 445 Does anyone know what this is all about, or where I might be calling that

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread joel
Claudio Poli wrote: are you saving session in database instead of php/cake? Yes, I am. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Felix Geisendörfer
Hey Felix, really good suggestion... I'm going to try implementing this. However, I would I manage changes to files inside app/webroot (as you said) considering they're out of the vendor package? Nothing is out of the vendor package ; ). A complete copy of the latest version of CakePHP

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Marcelo de Moraes Serpa
Uoha! Thanks a lot for the in-depth explanation! :) It surely helped a lot :D Marcelo. On 12/4/06, Felix Geisendörfer [EMAIL PROTECTED] wrote: Hey Felix, really good suggestion... I'm going to try implementing this. However, I would I manage changes to files inside app/webroot (as you said)

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Larry E. Masters aka PhpNut
Claudio Poli wrote: are you saving session in database instead of php/cake? Yes, I am. ok, same problem here. Add this to your bootstrap.php file for now. uses('model' . DS . 'connection_manager'); -- /** * @author Larry E. Masters * @var string $userName * @param string $realName

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread kitten
Had the same problem, too. Session in DB instead of files. Seems as if one line is missing from cake/bootstrap.php that was present in the previous release: require LIBS . 'model' . DS . 'connection_manager.php'; If you don't want to change the core, you can also add this line to your own

Re: How do I use cookies in cakePHP

2006-12-04 Thread Walker Hamilton
Whoa. Okay, why didn't I notice that before! That's freaking awesome and what I should have done in the first place. :) thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

custom html helper

2006-12-04 Thread [EMAIL PROTECTED]
Hi all, I want to have a custom HTML Helper in my helpers dir and it seems like it's always the one belonging to the core that is used, it doesn't seem to be the same with the form helper for instance. any idea what i' doing wrong ? is it an intended behaviour ? tia thomas

Problem with DEBUG set to 1

2006-12-04 Thread Ismael S. Kafeltz
Hello Bakers, i have problem in creating a new user. I have no ideia, so i came here to ask for help. When i create a new user, i create new rows in others table base on the last index of the new user... the problem is that it work FINE when debug is set to 1 (development), when i set to 0

Re: Problem with DEBUG set to 1

2006-12-04 Thread Chris Hartjes
On 12/4/06, Ismael S. Kafeltz [EMAIL PROTECTED] wrote: Can someone tell me what could be? Nothing more was done, i ONLY set DEBUG to 0... Thank you all. I would suggest you go into the /tmp/cache directory in your Cake application and delete whatever you find there. DEBUG 0 causes Cake to

Re: How do I use cookies in cakePHP

2006-12-04 Thread Walker Hamilton
Okay, so I think I got it all up and running as a component, Mariano. Your way was much better, though I had to modifying your (i'm sure quickly written) code to get it to work, especially with the new lazy loading models. http://walkerhamilton.com/439/rememberme-component

RE: How do I use cookies in cakePHP

2006-12-04 Thread Mariano Iglesias
Glad you liked it. I'm sure you had to modify it, I just programmed it in outlook and don't have a debugging plugin for it ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart,

Re: persistModel documentation

2006-12-04 Thread Matt Adams
majna wrote: There is no documentation for $persistModel variable . What's basic usage, and where or when should I use it? tnx. If you have a large number of models (some of my applications have around 1000 of these) you'll probably want to end up using the persistModel option - it

Re: autocomplete option

2006-12-04 Thread [EMAIL PROTECTED]
hi Grant: Sorry for the delay in my response, thanks for your help in my autocomplete problem I used your advice and change manually in the javascript and works :) regards Gleny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: custom html helper

2006-12-04 Thread Ryders
Hi Thomas, I don't know in what order dirs are looked up for helpers, but after what you said, I would assume the helpers directory from the core is looked at first. However I ran into the same problem, the html helper had a few things I wanted to improve and so what I did is creating my own

RE: custom html helper

2006-12-04 Thread Mariano Iglesias
Extend the helper this way: 1. Create a file called myhtml.php on your app/views/helpers directory. 2. Have its contents be something like the following. I'm overriding method selectTag as in your example, with some small changes, like... PLEASE USE BRACES! :) ?php loadHelper('html'); class

Re: custom html helper

2006-12-04 Thread Seb
Dude!! loadHelper('html'); is what I was missing! cheers for that! Braces... I'll take a good note of it! ;) Cheers! Seb. On Dec 5, 9:04 am, Mariano Iglesias [EMAIL PROTECTED] wrote: Extend the helper this way: 1. Create a file called myhtml.php on your app/views/helpers directory. 2.

Re: custom html helper

2006-12-04 Thread [EMAIL PROTECTED]
thanks to both of you I really thought if I had a html.php in helpers folder it would be used instead of the core one like it seems to happen for form.php for instance ... if anyone is able to clarify ... :) tia thomas --~--~-~--~~~---~--~~ You received this

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread [EMAIL PROTECTED]
Hi, On Dec 4, 2:27 pm, Larry E. Masters aka PhpNut [EMAIL PROTECTED] wrote: The main increase comes from the lazy loading of models. Previous versions of CakePHP loaded all the models in the models directory. This functionality made access to models easier, but came at the expense of valuable

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Christoph
I don't know if I've got biased by your comment, but I DID notice a speed increase. Nicee :) As did I. A significant increase, in fact! Way to go you guys! Definitely a great job very well done! thnx, Christoph --~--~-~--~~~---~--~~ You received this

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread gwoo
You should submit patches to trac and try not to alter the api. At the very least send someone on the dev team an email with your thoughts. This way the whole community benefits without needing to handle third party patches --~--~-~--~~~---~--~~ You received

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Larry E. Masters aka PhpNut
As did I. A significant increase, in fact! Way to go you guys! Definitely a great job very well done! Thanks Christoph, The improvement had been planned for sometime I just hate thinking about optimization when code is not where I would like it to be. I feel optimization is to be done in

RE: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread Mariano Iglesias
I think it's a smart idea. Perfectionism (like any other extreme) is a very bad thing for developers because it tends to slow down delivery time. -MI --- Remember, smart coders answer ten questions for every question they

File Uploads

2006-12-04 Thread Websta*
Ok so i am having some major issues getting file uploads going on my cake app. Firstly what seems to happen is as soon as i add 'enctype=multipart/form-data' to mthe form in my view, my call to $this-Model-save($this-data) in the controller spits the dummy as the file field is now an array of

manually update datetime field...

2006-12-04 Thread Seb
Hi everyone, I'm still experimenting with Cake and feel I'm missing something; upon login, I do this; $someone['User']['last_login'] = date('Y-m-d H:i:s'); $this-User-save($someone); Which should be updating the last_login field with the current datetimestamp; though it doesn't work. however

RE: manually update datetime field...

2006-12-04 Thread Mariano Iglesias
When updating a single field it is better to use saveField(). Assuming 4 is the ID of the user you are trying to save: $this-User-id = 4; $this-User-saveField('last_login', date('Y-m-d H:i:s')) If your query is only saving when disabling validation that means that it is not validating :) You

Re: RE: manually update datetime field...

2006-12-04 Thread Samuel DeVore
probably you have a validate for username being not empty or password or something like that, go with saveField it will be marginally faster ;) On 12/4/06, Mariano Iglesias [EMAIL PROTECTED] wrote: When updating a single field it is better to use saveField(). Assuming 4 is the ID of the user

Bootstrappers Unite!

2006-12-04 Thread Bootstrapper
If you're bootstrapping a professional web business using CakePHP, let's team up to help each other be more successful. Of course we can work together to maximize our use of CakePHP, but we can also share information, resources, connections and ideas for all the other areas of your business:

Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.

2006-12-04 Thread [EMAIL PROTECTED]
On Dec 5, 11:42 am, gwoo [EMAIL PROTECTED] wrote: You should submit patches to trac and try not to alter the api. At the very least send someone on the dev team an email with your thoughts. This way the whole community benefits without needing to handle third party patches I always try to

logging or saving all sql statements in Model

2006-12-04 Thread Copongcopong
Is there an assigned variable for all created sql statement in a model that I can save for logging and tracking purpose (via beforeSave, beforeDelete ...)? I am planning to create a tracking for the sql statement without altering the basecode of CakePHP. Thanks

RE: Bootstrappers Unite!

2006-12-04 Thread Mariano Iglesias
Hi there, I haven't quite understood what you are seeking. I am currently building an enterpise application with CakePHP that will be the foundation of a large online business, but I'm not sure what kind of connection you are looking for. -MI

Re: File Uploads

2006-12-04 Thread Mikee Freedom
Sorry, after a bit of a reread don't forget to record the path of your file somewhere. Either in the database itself or I tend to include it as a constant or attribute of my model so I can move stuff easily. cheers, mikee On 05/12/06, Mikee Freedom [EMAIL PROTECTED] wrote: Hey Paul, File

Re: Cake is breaking database views. This looks like a bug.

2006-12-04 Thread [EMAIL PROTECTED]
I found out some things that make enough sense to work around: 1) If I remove the _ from the name of the view it works much better (v_people changed to vpeople) 2) This view works fine when accessed via associations from other models. (ie, when from a groups model via a HABTM association with

Re: Custom empty value for selectTag

2006-12-04 Thread shanlalit
in place of $levelID, in the form use (array('' = 'Select level') + $levelID) :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To