Re: Need sanity check please!! One controller Multiple models..
hi Nate, thanks for that, I agree the Set() method is cleaner. The extra "create()" method was a typo. I might just be getting a hang of this! :-) pat. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
instantiating a model
I am fairly new to Cake, but have been reading a bit of RoR. I'd actually prefer to us Cake because of speed and deployment issues. Just wondering how you instantiate a model class within your controller. In RoR the 'find' method actually returns objects but in cake seems to return just an array of data. RoR example: myObject = Model.new myObject.methodcall some_objects = myObject.children etc... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
I try to update my cake from 0.10.8.2047_rc5 to 1.1.3.2967, Then I found I can't use $controllername->modelname->findAll, What can I do ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Scaffold vs. Baking
Are you using the latest version of Cake?-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access public*/ On 5/26/06, jgoforth <[EMAIL PROTECTED]> wrote: Maybe I have missed something along the way, but my initialunderstanding of what the bake tool did was basically creating hardcopy versions of what scaffolding does on the fly. After having usedit, this seems to have been an incorrect understanding. I set up my database and everything was working find in scaffolding, soI went in and used the bake tool to create everything, but I keeprunning into things that don't work in the baked version. Specifically right now, dates in forms don't end up getting saved to the database,despite the fact that everything else does. Any thoughts on that matterwould be appreciated, but my real question is why are the two different in the first place? Is any difference between the two a bug or was myoriginal assumption incorrect? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Scaffold vs. Baking
Maybe I have missed something along the way, but my initial understanding of what the bake tool did was basically creating hard copy versions of what scaffolding does on the fly. After having used it, this seems to have been an incorrect understanding. I set up my database and everything was working find in scaffolding, so I went in and used the bake tool to create everything, but I keep running into things that don't work in the baked version. Specifically right now, dates in forms don't end up getting saved to the database, despite the fact that everything else does. Any thoughts on that matter would be appreciated, but my real question is why are the two different in the first place? Is any difference between the two a bug or was my original assumption incorrect? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakeBakery takes another step !
Hey Sven, Forgot to mentio that you can get the files on the SVN repository: https://svn.cakeforge.org/svn/bakery -- < If you know Red Hat you know Red Hat, If you know Slackware you know Linux > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakeBakery takes another step !
On 5/26/06, Sven <[EMAIL PROTECTED]> wrote: > Does anybody know where I can find the tutorials mentioned above? > Seems like they have moved to another URL, but I can't find them there. There's a project on cakeforge to host the project but somehow it's still empty :( http://cakeforge.org/projects/bakery/ The project was live at: http://bakery.cakephp.org for a second there and can se some things at: http://bakery.cakephp.org/articles But looks like the guys are still messing with it... -- < If you know Red Hat you know Red Hat, If you know Slackware you know Linux > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: cache @ favicon
actually, due to the size of the pages (600KB) , i thought *any* help would be good, instead of hammering the database every page :/ btw, i could not find anywhere how to cache some variables.. i remember i saw it somewhere, but can't remember now... any idea ? the favicon problem was actually solved, using my layout, but the page i was seeing was cached or something. thanks spark! On 5/26/06, AD7six <[EMAIL PROTECTED]> wrote: > > Hi DJ Spark, > Are you using your own layout? > > If Either > your apache log, or your web server log, shows requests for > /movies/edit/favicon.ico etc. > Or > If you access your root page with a decent browser (not IE) and you see > your favicon displayed > then access any sub page, press F5 and the favicon disappears > Then > The relavent layout doesn't have an absolute favicon path. If you look > in the contents of movies_edit_2136.php it will also show the favicon > path. > > Cheers, > > AD7six > PS. How many time will the url /movies/edit/2136 be accessed? If it's 1 > or 2 there isn't much if anything to be gained by caching the result ;) > > > > > -- [web] http://synapsisdi.com.br [livesets] http://djspark.com.br --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Thanks Nut but for once I did not had any problem. Just wondering how Nate's snippet should be functioning. Larry E. Masters aka PhpNut wrote: Olivier, A new release has been announced, download it and the problem should be gone. -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ On 5/26/06, Olivier percebois-Garve <[EMAIL PROTECTED]> wrote: Nate have you the controller's method going with this ? I'm probably thinking too quickly but I don't get how this method will return 2 things at once. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: prevent expiration of session info?
Hi Dave, Sessions don't last longer than the window is open*.You might want to look into useing Cake database sessions. If you use 2 way encryption you can store something in a cookie which is neither the users password, nore their DB stored password and still authenticate who they are. http://rossoft.wordpress.com/2006/05/22/simple-encryption-class/ Cheers, AD7six * For some browsers, such as Mozilla, the session lasts as long as all browser windows are open, so it's necessary to close all Mozilla windows generates a new session. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: prevent expiration of session info?
Are you saying there's no way for a session to persist across browsers launches? If so, then a cookie may be the only way. I was using a cookie for a while but having issues. For one thing, at least in Camino I was getting different cookies set for different controller paths; for another, I'm using this for user login and having the session obfuscate the real login info is advantageous (though I suppose I could use md5 to generate an ID for the cookie the same way the session does). --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Here, just to save people from the trouble of digging, it what a response looks like (spacing added): var __ajaxUpdater__ = { first:"%09This%20is%20the%20first%20div%2C%20it%20has%20the%20current%20time%3A%0A%091148669377" }; for (n in __ajaxUpdater__) { if (typeof __ajaxUpdater__[n] == "string" && $(n)) Element.update($(n), unescape(__ajaxUpdater__[n])); } --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
It's the least I can do; I would prefer to see new features earlier by taking some of the load of you chaps ;). And I learn from reading the q's that are out of my current scope ( I cached some of my views for the first time today). Cheers, AD7six Off topic, chipped in for comment: There are some snippets which also use orphan helpers and a number which seem to be either obsolete (integrated or duplicated in Cake now) or need enhancing to be useful. The drawback of an active community seems to be policing their efforts :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: cache @ favicon
Hi DJ Spark, Are you using your own layout? If Either your apache log, or your web server log, shows requests for /movies/edit/favicon.ico etc. Or If you access your root page with a decent browser (not IE) and you see your favicon displayed then access any sub page, press F5 and the favicon disappears Then The relavent layout doesn't have an absolute favicon path. If you look in the contents of movies_edit_2136.php it will also show the favicon path. Cheers, AD7six PS. How many time will the url /movies/edit/2136 be accessed? If it's 1 or 2 there isn't much if anything to be gained by caching the result ;) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
@Olivier: The controller method is empty (so I didn't bother posting it). I the view just outputs some dummy data as a proof of concept. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Olivier,A new release has been announced, download it and the problem should be gone.-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut * @access public*/On 5/26/06, Olivier percebois-Garve <[EMAIL PROTECTED]> wrote: Natehave you the controller's method going with this ? I'm probably thinkingtoo quickly but I don'tget how this method will return 2 things at once. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
@AD7six: Thanks for keeping that up-to-date. Hopefully that'll be less of a problem when we have the Bakery set up, with a proper peer-review system. And thanks for all the time you've put in answering questions on the list. That helps out a lot. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Quick Fix Release
Well, we noticed a few minor issues that were not corrected properly. So, get this new bug fix release CakePHP 1.1.3.2963. As usual, it should be a simple upgrade. Just drop in the new cake directory. The only other change was the additional of the CAKE_SESSION_TABLE define in core.php. If you are using database for your sessions storage, then you might be interested in this new config option.1.1.3.2963:Download: http://cakeforge.org/frs/?group_id=23&release_id=97 Change log: http://cakeforge.org/frs/shownotes.php?release_id=97As always, thanks for being a great community and using CakePHP.-- /** * @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access public*/ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: prevent expiration of session info?
What have you got session.cookie_lifetime , session.gc_maxlifetime (and any others that are useful) set to in your ini file? I don't know your app of course, but maybe using a "remember me" cookie and recording anything else the user might want to access from hour to hour in a cookie would avoid session time out problems, or even if the user closes the browser and wants to be back where they were etc. Hope it's useful, Cheers, AD7six --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: prevent expiration of session info?
Hmm...this doesn't seem to help. I've set CAKE_SESSION_TIMEOUT to a ridiculously high number (604800) and just in case set CAKE_SECURITY to 'low'. The session still times out after a couple hours and I have to log in again. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
cache @ favicon
i'm using cake 1.1 , but this also hapenned with 1.0 when using $cacheAction = true; Cake records 2 copies of each file, one of them with _favicon.ico on the name: movies_edit_2136.php (687556 bytes) movies_edit_favicon.ico.php (687161 bytes) the favicon.ico file IS in my document_root (it's pointing to app/webroot) I tried the only thing i found in this group (gwoo said changing the path in the default layout from relative to absolute '/favicon.ico' could solve another problem related to session), but the files are still being recorded in the server. Anyone having the same problems ?? Actually, is it a problem ? (besides disk space :) spark! -- [web] http://synapsisdi.com.br [livesets] http://djspark.com.br --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Great stuff Nate, and all of the Cake team! Helpers: Some of the helpers defined on the wiki (such as http://wiki.cakephp.org/docs:helpers:custom:pagination) don't extend anything and therefore suffer from this problem. Well they will when you read this message but that's the magic of community spirit ;). Cheers, AD7six --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Great work as always :)Keep up the awesome work!Marcelo.On 5/26/06, Olivier percebois-Garve <[EMAIL PROTECTED] > wrote:Natehave you the controller's method going with this ? I'm probably thinking too quickly but I don'tget how this method will return 2 things at once.nate wrote:> Hey y'all,>> Just wanted to make a follow-up comment about something that happened> this release. Actually, it's more of a confession: We did it again. > We started adding new features.>> One thing people kept asking about was how to update multiple page> elements in a single Ajax request, and up till now, we had no way of> doing that. Not only that, but doing Ajax updates now takes less view > code, thanks to AjaxHelper::div( ) and AjaxHelper::divEnd( ). Take a> look:>> // test.thtml> > link('Update 2 Div\'s', '/controller/test', array('update' => > array('first', 'second'))); ?>>> div('first'); ?>> This is the first div, it has the current time:> > divEnd('first'); ?> >> div('second'); ?>> This is the second div, it shows server variables:> > divEnd('second'); ?>> >>> >>> --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Nate have you the controller's method going with this ? I'm probably thinking too quickly but I don't get how this method will return 2 things at once. nate wrote: > Hey y'all, > > Just wanted to make a follow-up comment about something that happened > this release. Actually, it's more of a confession: We did it again. > We started adding new features. > > One thing people kept asking about was how to update multiple page > elements in a single Ajax request, and up till now, we had no way of > doing that. Not only that, but doing Ajax updates now takes less view > code, thanks to AjaxHelper::div( ) and AjaxHelper::divEnd( ). Take a > look: > > // test.thtml > > link('Update 2 Div\'s', '/controller/test', array('update' => > array('first', 'second'))); ?> > > div('first'); ?> > This is the first div, it has the current time: > > divEnd('first'); ?> > > div('second'); ?> > This is the second div, it shows server variables: > > divEnd('second'); ?> > > > > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Thanks nate, but this wasn't my problem - it was issue of 2 people on IRC today - they has helpers which aren't extend Helper class and after upgrade to latest release they ends with above errr message. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
@Sam: Mostly just clever output buffering to capture the content between the div tags. I implemented a new callback in Helper, which AjaxHelper uses to write out the content, and then exit. It packages it as a JSON object, with an extra little snippet of code that gets evaluated on the client side. It iterates thru the elements in the object, and assigns the content to the proper div element. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
100rk, that's impossible unless you upgraded wrong. The afterRender( ) method is defined in the Helper base class, so as long as your helper extends it properly, you should have no errors. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Error after installing oceancms
I am going to play with OceanCMS later today. I will see if I can get it to work with the 1.1. release. If I do I will zip it up and send it to you describing the changes.On 5/26/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote: What is your debug level set at in /app/core.phpTry setting a value of 2 if you are at 0 or 1 for more error messages. On 5/26/06, Sven < [EMAIL PROTECTED]> wrote:Thanks for your help.The error has disappeared but now I see nothing and get no response from the application. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Nate, how do you set up the returned information from the ajax->link to fill the two divs?On 5/26/06, nate < [EMAIL PROTECTED]> wrote:Hey y'all,Just wanted to make a follow-up comment about something that happened this release. Actually, it's more of a confession: We did it again.We started adding new features.One thing people kept asking about was how to update multiple pageelements in a single Ajax request, and up till now, we had no way of doing that. Not only that, but doing Ajax updates now takes less viewcode, thanks to AjaxHelper::div( ) and AjaxHelper::divEnd( ). Take alook:// test.thtmllink('Update 2 Div\'s', '/controller/test', array('update' => array('first', 'second'))); ?>div('first'); ?>This is the first div, it has the current time:divEnd('first'); ?> div('second'); ?>This is the second div, it shows server variables:divEnd('second'); ?> --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
One thing in this release is: all of Your helpers has to extend class 'Helper' (or some child of it), or You will fight error messages like: Fatal error: Call to undefined method TestHelper::afterRender() in //cake/libs/view/view.php on line 586 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakeBakery takes another step !
Hi there! Does anybody know where I can find the tutorials mentioned above? Seems like they have moved to another URL, but I can't find them there. Sven --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Error after installing oceancms
What is your debug level set at in /app/core.phpTry setting a value of 2 if you are at 0 or 1 for more error messages.On 5/26/06, Sven < [EMAIL PROTECTED]> wrote:Thanks for your help.The error has disappeared but now I see nothing and get no response from the application. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Custom SQL and Weird Arrays
Right, but I expect that the weird-ass SQL might be slightly different. Also, I remember writing in a fix for it, but that could have been for something slightly different. Yeah, I can't remember; too many beers ago. Anyway, give it a try, it just might work. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Need sanity check please!! One controller Multiple models..
You can use Model::set( ) either with an array or single value, i.e. $this->User->Radcheck->set('op', 'testop'); Internally, the model stores it's data in an array, but there are multiple ways of setting and getting values. Also, you only have to run create( ) once. All that does is clear out the model so you can write a new record. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Google Maps + CakePHP Recipe
On 5/25/06, tom <[EMAIL PROTECTED]> wrote: > Quite a few of the things I expected to be very difficult with CakePHP > have actually been "a breeze." Well, not a breeze, but doable. Anyway, > no fanfare. Here's how to integrate mapping with your application. gwoo and I have a solution for Google Maps as well (gwoo did most of the work. I just upgraded things to use v2 of the Google Maps API and wrote the Yahoo! Geocoder component). Here are some links: gecoder comp: https://cakeforge.org/plugins/scmsvn/viewcvs.php/trunk/CakeMap/controllers/components/yahoo_geocoder.php?rev=112&root=rdos&view=markup map helper: https://cakeforge.org/plugins/scmsvn/viewcvs.php/trunk/CakeMap/views/helpers/google.php?rev=112&root=rdos&view=markup layout (look for the JS here): https://cakeforge.org/plugins/scmsvn/viewcvs.php/trunk/CakeMap/views/layouts/default.thtml?rev=112&root=rdos&view=markup usage: https://cakeforge.org/plugins/scmsvn/viewcvs.php/trunk/CakeMap/views/maps/index.thtml?rev=112&root=rdos&view=markup -- jason lee http://www.steeplesoft.com http://blogs.steeplesoft.com http://littlezoper.livejournal.com --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Google Maps + CakePHP Recipe
Such thing is so exotic and interesting to me, is it possible to see the result somewhere online ? tom wrote: > Quite a few of the things I expected to be very difficult with CakePHP > have actually been "a breeze." Well, not a breeze, but doable. Anyway, > no fanfare. Here's how to integrate mapping with your application. > > Add the data fields > > I'd recommend fields called "latitude" and "longitude," of the type > FLOAT. You can use strings if you want, but that will eliminate some > cool possibilities in the future. And have a field called "location" or > something of that sort. > > Add the input > > Let's say that the *model* is called "Place" you could use this. > > hidden('Place/latitude', array('id' => > 'PlaceLatitude')); ?> > hidden('Place/longitude', array('id' => > 'PlaceLongitude')); ?> > input('Place/name', array('class' => > 'primary_input')); ?> > location > input('Place/location'); ?> > map > > > Add the Action > > Replace "YOUR_APP" with your AppId & put this in a controller (for > instance, Places) > > function geocode($location) > { >// Allowed hostname (api.local and api.travel are also possible > here) > define ('HOSTNAME', > 'http://api.local.yahoo.com/MapsService/V1/geocode?'); > > // Get the REST call path from the AJAX application > // Is it a POST or a GET? > //$path = ($_POST['yws_path']) ? $_POST['yws_path'] : > $_GET['yws_path']; > $url = > HOSTNAME.'appid='.'YOUR_APP'.'&location='.urlencode($location); > > // Open the Curl session > $session = curl_init($url); > > // If it's a POST, put the POST data in the body > if (isset($_POST['yws_path'])) { > $postvars = ''; > while ($element = current($_POST)) { > $postvars .= key($_POST).'='.$element.'&'; > next($_POST); > } > curl_setopt ($session, CURLOPT_POST, true); > curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars); > } > > // Don't return HTTP headers. Do return the contents of the call > curl_setopt($session, CURLOPT_HEADER, false); > curl_setopt($session, CURLOPT_RETURNTRANSFER, true); > > // Make the call > $xml = curl_exec($session); > > // The web service returns XML. Set the Content-Type > appropriately > header("Content-Type: text/xml"); > echo $xml; > curl_close($session); > exit(); > } > ?> > > > h4. Add SecondMap & ThirdMap > > Download the files > http://notes.we-run.com/file_download/1 > thirdmap.js > http://notes.we-run.com/file_download/2 > secondmap.js and drop them in webroot/js and include them in > layouts/default.thtml > > http://www.google.com/apis/maps/signup.html > Get a Google Maps API Key > > Output stuff. > > In the "index" or "list" view, when you're outputting the list of > geotagged-things, use code like this: > > > > ?> > >link($place['Place']['name'], > '/places/view/'.$place['Place']['id']); ?> > > ?> > > > > > > thirdMap('map'); > > > of course, replace $place['Place'] with whatever your action is. > > Hooray! > > You should be all set. This will leave you with a quick, cross-browser > (screenreader compatible!) Google Maps solution. > > > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.2.2955 Release
Hey y'all, Just wanted to make a follow-up comment about something that happened this release. Actually, it's more of a confession: We did it again. We started adding new features. One thing people kept asking about was how to update multiple page elements in a single Ajax request, and up till now, we had no way of doing that. Not only that, but doing Ajax updates now takes less view code, thanks to AjaxHelper::div( ) and AjaxHelper::divEnd( ). Take a look: // test.thtml link('Update 2 Div\'s', '/controller/test', array('update' => array('first', 'second'))); ?> div('first'); ?> This is the first div, it has the current time: divEnd('first'); ?> div('second'); ?> This is the second div, it shows server variables: divEnd('second'); ?> --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Ajax Form Serialization
Thanks! That helps a lot. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Error after installing oceancms
look at the forum pages of oceanCMS, I wrote down some stuffs to do to install ocean CMS. If I remember right it has a custom validator. Also you should know that it was made for RC5 or RC6, I don't think that the code is updated for the lasts cake releases. olivvv Sven wrote: > Hi there! > > I've just tried to install oceancms but I only get this fatal error: > > Fatal error: Cake's validation model, which is incompatible with > Validator, was found to be loaded (most likely from /libs/model.php). > in D:\xampp\htdocs\dvl\oceancms\app\vendors\validator.php on line 20 > > Does anybody has a solution? > > Thanks and greets, > Sven > > > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Error after installing oceancms
Thanks for your help. The error has disappeared but now I see nothing and get no response from the application. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: fundamental dispatcher strategy flawed?
I don't see how that's more clear. The fact that you'd have to explicitly prefix actions with "action_" is redundant in itself, as all public controller methods are implicitly actions already. Also, you'll note that controller methods prefixed with _ are considered private, and therefore inaccessible via the Dispatcher, which is a much more sensible way to organize things. The fact that you can't use a few words out of an entire language (absent a small configuration change) is a minor inconvenience at best, and hardly reason enough to change the way Dispatcher works. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Ajax Form Serialization
alert(alert(Form.serialize(test));
ftest1=ftest1value&ftest2=ftest2value will alert the input values... if they are not null so u can send this values trought url to do something without submit hydra12 escreveu: I'm about to show my ignorance, I'm afraid. I've found several references to serializing a form, but I don't really understand what this means. Can anybody help me out with an explanation? Thanks in advance! hydra12 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Error after installing oceancms
comment all the lines in cake/xxx/validators.php (or something like this). In this file there are some defines like this one: define('VALID_NOT_EMPTY',); Comment all of those defines --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Ajax Form Serialization
I'm about to show my ignorance, I'm afraid. I've found several references to serializing a form, but I don't really understand what this means. Can anybody help me out with an explanation? Thanks in advance! hydra12 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Error after installing oceancms
Hi there! I've just tried to install oceancms but I only get this fatal error: Fatal error: Cake's validation model, which is incompatible with Validator, was found to be loaded (most likely from /libs/model.php). in D:\xampp\htdocs\dvl\oceancms\app\vendors\validator.php on line 20 Does anybody has a solution? Thanks and greets, Sven --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: fundamental dispatcher strategy flawed?
Try to read more about routes: http://manual.cakephp.org/chapter/4 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Google Maps + CakePHP Recipe
Hi tom! It looks just great - only bad thing on this tutorial is it's location - wiki is IMO better place for it, as people are looking for user tutorials && experiences there ;-) Anyway: good work. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Bad,too bad,when a column is char and it's has values like '0222' or '00222'
if you use a before action like follow: function beforeSave(){ $this->data['config']["startsend"]="'".$this->data['config']["startsend"]."'"; return true; } it will save the value as "'0022'" --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Bad,too bad,when a column is char and it's has values like '0222' or '00222'
When a column is char and it's has values like '0222' or '00222',you can't save the 0 at front of the value! God --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
CakePHP 1.1.2.2955 Release
The response to the 1.0 release has been fantastic. Digg provided some excitement and we had a lot of new visitors to #cakephp on IRC, where there are regularly 70+ users. So, to thank everyone for getting in some good tickets, we have CakePHP 1.1.2.2955This release fixes some bugs found in the 1.0 release. We also made some changes to the coding standards in this release. The major changes were the removal of newlines for the first bracket of a function definition and the if/else statements, and we changed from spaces to tabs. By changing the style we were able to reduce the overall footprint by a couple of KB. We will continue to actively fix the bugs on the 1.0 line of code, but ask that everyone be very diligent in how they submit the tickets. Several tickets were marked for 2.0 because that is the default on the new ticket form. Please, go through the form thoroughly when submitting a ticket. We like to fix bugs, but do not like having to sift through missed categorized tickets. If you have a feature or enhancement request those are marked for 2.0. If you are using 1.0 and have a problem mark those for 1.0, but be sure to try the latest nightly before submitting a ticket. If you need some help from the docs team you can submit tickets for the 1.0 Manual. Thanks to everyone who is using CakePHP. We have a one of the best communities around, which continues to make CakePHP the best rapid development framework for PHP.If you are so compelled, please think about contributing to the cause at http://cakefoundation.org/pages/contribute1.1.2.2955:Download: http://cakeforge.org/frs/?group_id=23&release_id=96 Change log: http://cakeforge.org/frs/shownotes.php?release_id=96Complete list of closed tickets: https://trac.cakephp.org/milestone/1.0.0.xComplete list of change sets since last release: https://trac.cakephp.org/timeline?from=05%2F26%2F06&daysback=23&changeset=on&update=UpdateHappy Baking.Cake Software Foundation, Inc.-- /** * @author Larry E. Masters * @var string $userName* @param string $realName* @returns string aka PhpNut* @access public*/ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
enter data with "has many" relationship
Hi all, I've been playing around with cakephp for about a week now and must say it make coding so much more fun :-) My problem is this: I have 2 tables. 1)Invoices 2)Details Invoices contains the customer details, Details contains the the individual items of an invoice. let's say the fields in the Details table are id, invoice_id, serialnr, amount, price, description Now I would like to create an HTML form that looks something like [lots of customer details in a few lines on the top] 1) [input fields for 'details' table] 2) [input fields for 'details' table] 3) [input fields for 'details' table] 4) [input fields for 'details' table] 5) [input fields for 'details' table] (save invoice) if I fill out the first 3 rows, then 3 records in my details table should be created, if i fill out 5 rows, then 5 records should be created etc. What's the best way to create the html form so that i can use data validation on the details model for each record that i enter on the form? If this is a very simple or even stupid question, please don't laugh too loud at me - I'm very sensitive on friday afternoons :-D Thanks in advance Mike --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Global variables?
Hi All, This is on the Wiki now (http://wiki.cakephp.org/tutorials:css_menus) , Hope it's useful and if there are any updates, I don't own it - feel free to enhance it ;). Cheers, AD7six --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Simple HABTM Question
Hi Dee, The -> Just reverences a Variable or method on an object (if it has () it't a method). In the example above, contractor has a variable Servic, which is set to a Service object. It the chain of object could be avoided by using: var $uses ("Contractor","Service"); $this->Service->find("service_name = 'Web Design'"); Happy coding, Cheers, AD7six --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---