Mocking Cookies in CakeTestCase::testAction()?
I was wondering if there's a way to fake the cookies set when testing controllers? Either that or somehow capture the headers output when you call testAction() in your controller test case. Or would the cookies set/deleted in the controller actions being tested be set/deleted when running your test case in your browser? It's kind of late (for me), so sorry if I'm incoherent TIA! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Installing CakePHP on MAMP
I've already tried that, and I have also checked if the .htaccess files are were they are supposed to be, and they are. Can't figure out why I can't see anything... On Jan 25, 12:45 am, "Troy Gilbert" <[EMAIL PROTECTED]> wrote: > Be careful of how you copy the Cake folders into the MAMP htdocs folder... > if you're using Finder (instead of unzipping them straight into place) you > might be missing the .htaccess files that are in Cake's root because Finder > doesn't show them by default. Unfortunately, there's not a trivial way to > just show them temporarily, you've got to go to terminal and switch a > property, move/copy the files, then switch them back. > > Easiest: just unzip the CakePHP install straight to where you want it. > > Troy. > > On Jan 24, 2008 4:31 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > Hey, > > I'm having a major problem with installing CakePhp on a MAMP > > application on Mac OSX 10.4.10 > > > There's nothing wrong with the MAMP Apache Server, I tried out > > Codeigniter and it worked just fine. But when I unzip CakePhp put it > > on my "localhost" and try to go to the Cake folder. Nothing happends. > > > I can't reach the index.php file. I can't reach any other file on the > > whole cake folder. I even tried to put a image file in the root folder > > of the cake installation. And the server can't find it. > > > Is this a mod_rewrite thing? Any suggestions? I would really love to > > try out CakePhp! > > > Best regards, > > Alex --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: retrieve data form two tables
You have to create association between two tables by their respective Models and then you can use the notation: ModelName.FieldName in the Where condition On Jan 25, 11:48 am, Rgarg <[EMAIL PROTECTED]> wrote: > Hi... > > i wants to display records form two tables(tickets,bookings) using > cake php 1.2. > is there any way to put 'where condition' in this->findall(). --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: how to upload file?
Can you tell, what is the enctype you gave for the form? On Jan 25, 11:17 am, Rgarg <[EMAIL PROTECTED]> wrote: > please help me.. its not working. > the value of $_FILES['filename']['tmp_name'] is not comming form my > add.thtml page. > what's the solution for this? > > On Jan 24, 9:13 pm, "Novice Programmer" <[EMAIL PROTECTED]> > wrote: > > > At the face of it, every thing looks ok.. it would be great if you dont mind > > telling us the error messages you are getting. > > > Thanks. > > > On 1/24/08, Rgarg <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > Please help me to upload a file. i am using this > > > > if (move_uploaded_file($_FILES['filename']['tmp_name'], > > > $destination_path)) { > > >$this->Session->setFlash('File is valid, and was successfully > > > uploaded.'); > > >$this->redirect('/products/index'); > > > } else { > > > $this->Session->setFlash('There\'s issues! Maybe the file is too > > > big.'); > > >$this->redirect('/products/index'); > > > } > > > -- > > Thanks & Regards, > > Novice (http://ishuonweb.wordpress.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?hl=en -~--~~~~--~~--~--~---
retrieve data form two tables
Hi... i wants to display records form two tables(tickets,bookings) using cake php 1.2. is there any way to put 'where condition' in this->findall(). --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: how to upload file?
please help me.. its not working. the value of $_FILES['filename']['tmp_name'] is not comming form my add.thtml page. what's the solution for this? On Jan 24, 9:13 pm, "Novice Programmer" <[EMAIL PROTECTED]> wrote: > At the face of it, every thing looks ok.. it would be great if you dont mind > telling us the error messages you are getting. > > Thanks. > > On 1/24/08, Rgarg <[EMAIL PROTECTED]> wrote: > > > > > > > Hi > > > Please help me to upload a file. i am using this > > > if (move_uploaded_file($_FILES['filename']['tmp_name'], > > $destination_path)) { > >$this->Session->setFlash('File is valid, and was successfully > > uploaded.'); > >$this->redirect('/products/index'); > > } else { > > $this->Session->setFlash('There\'s issues! Maybe the file is too > > big.'); > >$this->redirect('/products/index'); > > } > > -- > Thanks & Regards, > Novice (http://ishuonweb.wordpress.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?hl=en -~--~~~~--~~--~--~---
Wordpress MU integration
Hiya guys, I'm looking to run a corporate blogging site with 30 Personal Blogs.Having explored WPMU I've concluded: 1. Use 1 Cake-powered Master-Blog for centralized CMS 2. Cake will read content from the WPMU blogs via XML feeds. 3. Admin-user can view content & publish articles directly to All blogs via WPMU API. 4. Cake will accept New Blog requesting using Registration via SMS I'm sorta lost on how I should start to utilize an external apps API in Cake.Should I create a component to directly communicate with the API via nuSOAP? Thanks --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Cake without a SQL database
Realistically, it would probably be easier for you to move to a Mysql database and use Cake the "regular" way than to try to find a way to keep using your XML etc. Otherwise you could try to see about implementing a driver for your XML file, and just pretend the XML file is a database. But this sounds like a lot more work to me. Wayne On 1/24/08, sam <[EMAIL PROTECTED]> wrote: > > Does anyone have any thoughts on this matter? > > On Jan 21, 9:21 pm, sam <[EMAIL PROTECTED]> wrote: > > I am working on porting my current web site over to a MVC framework. > > Right now I am evaluating Cake PHP. I have gone through the blog > > tutorial and it all makes sense when the back end is a standard SQL > > database. > > > > At present my web site is driven via a XML file and by hard drive > > queries (images on the hard drive). How would I go about implementing > > a model that is powered by these types of sources? > > > > Sam > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Beginning CakePHP book with Apress
pre-ordering now! :) On Jan 25, 2008 9:20 AM, Dave <[EMAIL PROTECTED]> wrote: > > Yes sir. 1.2 all the way. > > On Jan 24, 4:20pm, Baz <[EMAIL PROTECTED]> wrote: > > Would you believe that about 2 hours ago I was on Amazon and typed > CakePHP > > and found this? > > > > Please oh please tell me the book will be about Cake 1.2 > > > > Although I doubt it. > > -- > > Kevin Lloyd > > 3HN Designshttp://www.3HNDesigns.com/ > > (214) 473-4207 > > > > On Jan 24, 2008 4:25 PM, Dave <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hello all, > > > > > Just wanted to share some great news... Apress has picked up my > > > manuscript for a CakePHP book which will come out in July. Things are > > > moving along nicely and I'm excited to contribute some documentation > > > to the Cake community. Lots of you have been interested in the > > > progress of my Newbies guide and I've been tight-lipped about it > > > because of the procedure of getting the book reviewed, etc. At least > > > now you know of something more substantial than a self-published book > > > on the horizon. > > > > > The page on Amazon is preliminary, but up and running, FYI: > > > > >http://www.amazon.com/Beginning-CakePHP-Professional-David-Golding/dp. > .. > > > > -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: dAuth v0.3 [Session losing 'salt' variable]
I also just compared dev to production: dev: php 5.2.5, php-default session settings apache 2.2.6 production php 5.2.5, php-default session settings apache 2.2.8 When I upgraded production I actually switched to default httpd.conf settings in case any of the previous Apache1.3 settings were part of the problem. As I said earlier, I'm not sure what to check next... On Jan 24, 9:30 pm, volve <[EMAIL PROTECTED]> wrote: > Changing cake_session storage back to 'cake' (app/tmp/sessions/*) made > no difference. I can't find anything in trac.cakephp.org, and I > managed to misspell your name - sorry! > > I don't know what to do now... :( > > -volve > > On Jan 24, 9:18 pm,volve<[EMAIL PROTECTED]> wrote: > > > Ok... well... all was going well with Apache2 and PHP5 on the new dev > > environment, so I upgraded the production server... and the same > > problem is still occurring! I am so confused! I didn't do anything > > custom with the Apache2 or PHP5 configs on production; I used the > > recommended settings. :( > > > The grep -i showed some Session->valid and Session->read calls but the > > only Session->write or Session->delete calls were in d_auth.php. > > > What's more is that I'm using this Users/login action as the default / > > route for this project so this issue is occurring without the user > > having to navigate to any other pages/actions at all... :-/ > > > I'm off to search trac.cakephp.org now but this is crazy. The only > > difference between dev and prod now is dev has mysql5 and prod is > > still mysql4 (I am using cake_sessions in the database - I'll try > > switching back to files, see if it helps). > > > Thanks again Diether, > > -volve > > > On Jan 20, 5:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > Well, something is removing items from ( or maybe totally wiping ) > > > your session, and i don't think it's dAuth ;-) > > > did grep -i session on your project yield anything? > > > But at least you have an environment where it works. try comparing > > > php.ini's, apache.conf's , looking up bugs for cake and php ( session > > > bugs will probably be also in this group), downgrading the php of the > > > new environment etc ... > > > > good luck! > > > Dieter > > > > On Jan 19, 5:33 pm,volve<[EMAIL PROTECTED]> wrote: > > > > > Thank you very much for getting back to me Dieter! > > > > > The salt is definitely "in there" before attemptLogin is called as I > > > > can stick a print_r in Users/login action and I see the salt at the > > > > top of the page when I load the login form. (But the print_r inside > > > > attemptLogin shows it as missing when submitting the login form.) > > > > > I spent some time last night setting-up a second development > > > > environment with PHP5 and... the problem hasn't reappeared... I know > > > > this doesn't really make sense, but I wanted to share anyway. Maybe > > > > there's some quirky CakePHP Session handling bug that isn't present in > > > > PHP5 ? All I did was copy over my previous app directory into this new > > > > environment and changed database logins. > > > > > I'm still baffled, but at least it's progress (I think). :) > > > > > Thanks again, > > > > -volve > > > > > On Jan 19, 6:38 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > > > I basically did a > > > > > > fresh install of the v0.3 files from bakery.cakephp.org and wanted > > > > > > to > > > > > > get them all working as-is before customizing (to make sure there > > > > > > was > > > > > > nothing in my project interfering, I grep'd the entire source tree > > > > > > for > > > > > > references to 'salt' and only found the new dAuth ones). > > > > > > Well, this is weird indeed. I also used the powers of grep on the > > > > > dauth sources and found out that at only 1 place the salt is written > > > > > into the session, which is in the function newSalt() of the component. > > > > > By grepping on Session i could not find a place where the salt might > > > > > be removed or the session cleared or anything like that. I suggest > > > > > you also grep on Session in your entire project to find out if > > > > > something else might be interfering. ( use grep -i to be sure you > > > > > dont miss anything) > > > > > > Also make sure that the salt is put in the session before trying to > > > > > read it out ( eg you're not going directly to the attemptLogin logic > > > > > before opening the login page. and make sure you have a salt there > > > > > first) --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
On Jan 24, 2008 4:36 PM, Doug @ Straw Dogs <[EMAIL PROTECTED]> wrote: > > I'm a developer by heart and know I'd love to code in CakePHP. > However, I'm failing to see any solid business benifit in using it > that can help me sell it to the directors. > I'm still just learning the ropes here so I don't have much to offer, but I do have to say that some of the terse responses here are very disappointing. That they come from some of the very people who one should expect to offer the most thoughtful and cogent sales pitch for Cake is terrible. Telling Doug to get out of Dodge is ridiculous. Do you want this framework to be accepted by more people? Or do you pine for the good old days, when Cake was something only a very small group of developers worked on? I'm guessing not, and that you'd like it to continue gaining in popularity. Don't get me wrong: this is not a flame. From what I've seen so far, CakePHP is an excellently produced framework and I intend to move more of my existing projects to it, let alone future ones. However, I'm lucky in that I left the corporate scene awhile ago and answer to nobody but my clients. Were I still lead developer at my old company, I'd be looking for the same answers Doug is. Do yourselves a favour and give him and other devs the ammunition they need to overcome the corporate inertia that they face. Like it or not, CakePHP needs a bit of a sales pitch that management can understand. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: dAuth v0.3 [Session losing 'salt' variable]
Changing cake_session storage back to 'cake' (app/tmp/sessions/*) made no difference. I can't find anything in trac.cakephp.org, and I managed to misspell your name - sorry! I don't know what to do now... :( -volve On Jan 24, 9:18 pm, volve <[EMAIL PROTECTED]> wrote: > Ok... well... all was going well with Apache2 and PHP5 on the new dev > environment, so I upgraded the production server... and the same > problem is still occurring! I am so confused! I didn't do anything > custom with the Apache2 or PHP5 configs on production; I used the > recommended settings. :( > > The grep -i showed some Session->valid and Session->read calls but the > only Session->write or Session->delete calls were in d_auth.php. > > What's more is that I'm using this Users/login action as the default / > route for this project so this issue is occurring without the user > having to navigate to any other pages/actions at all... :-/ > > I'm off to search trac.cakephp.org now but this is crazy. The only > difference between dev and prod now is dev has mysql5 and prod is > still mysql4 (I am using cake_sessions in the database - I'll try > switching back to files, see if it helps). > > Thanks again Diether, > -volve > > On Jan 20, 5:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Well, something is removing items from ( or maybe totally wiping ) > > your session, and i don't think it's dAuth ;-) > > did grep -i session on your project yield anything? > > But at least you have an environment where it works. try comparing > > php.ini's, apache.conf's , looking up bugs for cake and php ( session > > bugs will probably be also in this group), downgrading the php of the > > new environment etc ... > > > good luck! > > Dieter > > > On Jan 19, 5:33 pm,volve<[EMAIL PROTECTED]> wrote: > > > > Thank you very much for getting back to me Dieter! > > > > The salt is definitely "in there" before attemptLogin is called as I > > > can stick a print_r in Users/login action and I see the salt at the > > > top of the page when I load the login form. (But the print_r inside > > > attemptLogin shows it as missing when submitting the login form.) > > > > I spent some time last night setting-up a second development > > > environment with PHP5 and... the problem hasn't reappeared... I know > > > this doesn't really make sense, but I wanted to share anyway. Maybe > > > there's some quirky CakePHP Session handling bug that isn't present in > > > PHP5 ? All I did was copy over my previous app directory into this new > > > environment and changed database logins. > > > > I'm still baffled, but at least it's progress (I think). :) > > > > Thanks again, > > > -volve > > > > On Jan 19, 6:38 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > > I basically did a > > > > > fresh install of the v0.3 files from bakery.cakephp.org and wanted to > > > > > get them all working as-is before customizing (to make sure there was > > > > > nothing in my project interfering, I grep'd the entire source tree for > > > > > references to 'salt' and only found the new dAuth ones). > > > > > Well, this is weird indeed. I also used the powers of grep on the > > > > dauth sources and found out that at only 1 place the salt is written > > > > into the session, which is in the function newSalt() of the component. > > > > By grepping on Session i could not find a place where the salt might > > > > be removed or the session cleared or anything like that. I suggest > > > > you also grep on Session in your entire project to find out if > > > > something else might be interfering. ( use grep -i to be sure you > > > > dont miss anything) > > > > > Also make sure that the salt is put in the session before trying to > > > > read it out ( eg you're not going directly to the attemptLogin logic > > > > before opening the login page. and make sure you have a salt there > > > > first) --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: dAuth v0.3 [Session losing 'salt' variable]
Ok... well... all was going well with Apache2 and PHP5 on the new dev environment, so I upgraded the production server... and the same problem is still occurring! I am so confused! I didn't do anything custom with the Apache2 or PHP5 configs on production; I used the recommended settings. :( The grep -i showed some Session->valid and Session->read calls but the only Session->write or Session->delete calls were in d_auth.php. What's more is that I'm using this Users/login action as the default / route for this project so this issue is occurring without the user having to navigate to any other pages/actions at all... :-/ I'm off to search trac.cakephp.org now but this is crazy. The only difference between dev and prod now is dev has mysql5 and prod is still mysql4 (I am using cake_sessions in the database - I'll try switching back to files, see if it helps). Thanks again Diether, -volve On Jan 20, 5:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Well, something is removing items from ( or maybe totally wiping ) > your session, and i don't think it's dAuth ;-) > did grep -i session on your project yield anything? > But at least you have an environment where it works. try comparing > php.ini's, apache.conf's , looking up bugs for cake and php ( session > bugs will probably be also in this group), downgrading the php of the > new environment etc ... > > good luck! > Dieter > > On Jan 19, 5:33 pm,volve<[EMAIL PROTECTED]> wrote: > > > Thank you very much for getting back to me Dieter! > > > The salt is definitely "in there" before attemptLogin is called as I > > can stick a print_r in Users/login action and I see the salt at the > > top of the page when I load the login form. (But the print_r inside > > attemptLogin shows it as missing when submitting the login form.) > > > I spent some time last night setting-up a second development > > environment with PHP5 and... the problem hasn't reappeared... I know > > this doesn't really make sense, but I wanted to share anyway. Maybe > > there's some quirky CakePHP Session handling bug that isn't present in > > PHP5 ? All I did was copy over my previous app directory into this new > > environment and changed database logins. > > > I'm still baffled, but at least it's progress (I think). :) > > > Thanks again, > > -volve > > > On Jan 19, 6:38 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > I basically did a > > > > fresh install of the v0.3 files from bakery.cakephp.org and wanted to > > > > get them all working as-is before customizing (to make sure there was > > > > nothing in my project interfering, I grep'd the entire source tree for > > > > references to 'salt' and only found the new dAuth ones). > > > > Well, this is weird indeed. I also used the powers of grep on the > > > dauth sources and found out that at only 1 place the salt is written > > > into the session, which is in the function newSalt() of the component. > > > By grepping on Session i could not find a place where the salt might > > > be removed or the session cleared or anything like that. I suggest > > > you also grep on Session in your entire project to find out if > > > something else might be interfering. ( use grep -i to be sure you > > > dont miss anything) > > > > Also make sure that the salt is put in the session before trying to > > > read it out ( eg you're not going directly to the attemptLogin logic > > > before opening the login page. and make sure you have a salt there > > > first) --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Beginning CakePHP book with Apress
Yes sir. 1.2 all the way. On Jan 24, 4:20 pm, Baz <[EMAIL PROTECTED]> wrote: > Would you believe that about 2 hours ago I was on Amazon and typed CakePHP > and found this? > > Please oh please tell me the book will be about Cake 1.2 > > Although I doubt it. > -- > Kevin Lloyd > 3HN Designshttp://www.3HNDesigns.com/ > (214) 473-4207 > > On Jan 24, 2008 4:25 PM, Dave <[EMAIL PROTECTED]> wrote: > > > > > Hello all, > > > Just wanted to share some great news... Apress has picked up my > > manuscript for a CakePHP book which will come out in July. Things are > > moving along nicely and I'm excited to contribute some documentation > > to the Cake community. Lots of you have been interested in the > > progress of my Newbies guide and I've been tight-lipped about it > > because of the procedure of getting the book reviewed, etc. At least > > now you know of something more substantial than a self-published book > > on the horizon. > > > The page on Amazon is preliminary, but up and running, FYI: > > >http://www.amazon.com/Beginning-CakePHP-Professional-David-Golding/dp... --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: create dynamic site map from routes?
I am sure I have seen a cakephp googlesitemap thingie (either a components or a tutorial on making them; I bookmarked it but can't find the bookmark anymore) I am not certain if routes can be used for this; perhaps theres a better way? but info on route is here http://api.cakephp.org/1.2/class_router.htmltheres a routes - which is an array of routes (who'd of thought) On 24/01/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I would like to create a dynamic site map foe my CakePHP 1.2 beta > site. Normally I would pull the site map from a cms database of > pages. But I do not have a CMS for this site, and thought maybe I > could do this using routes or some other knowledge Cake itself holds. > > Any ideas? > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Problem with Delete
Posted! #3984 (Delete {alias} from Table - non-standard SQL which stops Firebird working) I'm so happy to finally try and contribute, I just hope I've done the right thing and don't waste anyone's time :-) On Jan 25, 12:33 am, villas <[EMAIL PROTECTED]> wrote: > I'm well aware of alias and use aliases all the time in Firebird. I > use AS for field aliases but not table aliases. > > select id AS id_alias from Table Alias > delete from Table alias where alias.field = 1 > > I did not know you could interpose 'alias' between 'DELETE' and 'FROM' > but I was just able to test it with MySQL and it does work -- but > maybe MySQL is non-standard. > > However, why not just use DELETE FROM? The 'alias' in that position > doesn't seem to add anything and just stops Firebird working. I will > try to post my first ticket! > > On Jan 24, 4:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > I just found this: > > >http://www.1keydata.com/sql/sqlalias.html > > > That describes using alias without the 'AS' I mentioned above (which > > is needed in MySQL). In this reference, they use the alias feature as > > described in villas original post: > > > SELECT "table_alias"."column_name1" "column_alias" FROM "table_name" > > "table_alias" > > > So it looks like the original query was syntactically correct (at > > least for some db systems). Maybe theproblemis that FirebirdSQL > > doesn't support aliases at all?? > > > Dave --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Cake without a SQL database
Does anyone have any thoughts on this matter? On Jan 21, 9:21 pm, sam <[EMAIL PROTECTED]> wrote: > I am working on porting my current web site over to a MVC framework. > Right now I am evaluating Cake PHP. I have gone through the blog > tutorial and it all makes sense when the back end is a standard SQL > database. > > At present my web site is driven via a XML file and by hard drive > queries (images on the hard drive). How would I go about implementing > a model that is powered by these types of sources? > > Sam --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Problem with Delete
I'm well aware of alias and use aliases all the time in Firebird. I use AS for field aliases but not table aliases. select id AS id_alias from Table Alias delete from Table alias where alias.field = 1 I did not know you could interpose 'alias' between 'DELETE' and 'FROM' but I was just able to test it with MySQL and it does work -- but maybe MySQL is non-standard. However, why not just use DELETE FROM? The 'alias' in that position doesn't seem to add anything and just stops Firebird working. I will try to post my first ticket! On Jan 24, 4:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I just found this: > > http://www.1keydata.com/sql/sqlalias.html > > That describes using alias without the 'AS' I mentioned above (which > is needed in MySQL). In this reference, they use the alias feature as > described in villas original post: > > SELECT "table_alias"."column_name1" "column_alias" FROM "table_name" > "table_alias" > > So it looks like the original query was syntactically correct (at > least for some db systems). Maybe theproblemis that FirebirdSQL > doesn't support aliases at all?? > > Dave --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Beginning CakePHP book with Apress
Wow, awesome news! Did you say July? I'm going to cry... Ok, I can wait. On Jan 24, 7:02 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Jan 24, 2008, at 3:25 PM, Dave wrote: > > > > > Hello all, > > > Just wanted to share some great news... Apress has picked up my > > manuscript for a CakePHP book which will come out in July. Things are > > moving along nicely and I'm excited to contribute some documentation > > to the Cake community. > > The book is free?! > > ;) > > -- John --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
views without controllers or models??
Basically, I want to use a pre-existing CakePHP user Authentication system as a quick and easy wrapper for a pre-existing website (content of website completely independent of CakePHP and its database, it just grants access). Is there a way I can create a path somewhere in my app directory that only uses the app_controller.php and not it's own controller? Thanks, Dave --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Installing CakePHP on MAMP
Be careful of how you copy the Cake folders into the MAMP htdocs folder... if you're using Finder (instead of unzipping them straight into place) you might be missing the .htaccess files that are in Cake's root because Finder doesn't show them by default. Unfortunately, there's not a trivial way to just show them temporarily, you've got to go to terminal and switch a property, move/copy the files, then switch them back. Easiest: just unzip the CakePHP install straight to where you want it. Troy. On Jan 24, 2008 4:31 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hey, > I'm having a major problem with installing CakePhp on a MAMP > application on Mac OSX 10.4.10 > > There's nothing wrong with the MAMP Apache Server, I tried out > Codeigniter and it worked just fine. But when I unzip CakePhp put it > on my "localhost" and try to go to the Cake folder. Nothing happends. > > I can't reach the index.php file. I can't reach any other file on the > whole cake folder. I even tried to put a image file in the root folder > of the cake installation. And the server can't find it. > > Is this a mod_rewrite thing? Any suggestions? I would really love to > try out CakePhp! > > Best regards, > Alex > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Beginning CakePHP book with Apress
On Jan 24, 2008, at 3:25 PM, Dave wrote: > > Hello all, > > Just wanted to share some great news... Apress has picked up my > manuscript for a CakePHP book which will come out in July. Things are > moving along nicely and I'm excited to contribute some documentation > to the Cake community. The book is free?! ;) -- John --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Beginning CakePHP book with Apress
> Please oh please tell me the book will be about Cake 1.2 well; from what I can tell this short intro seems to be about 1.2 (screen shots; .ctp) in fact proof on page 17 Running CakePHP > #e localhost is now ready to run Cake. Download the latest stable release > of Cake from > cakephp.org. (Right now, the most current stable release is Cake 1.1. > Because version 1.2 is set to > o$cially take over, and it does have some signi!cant improvements, we'll > use 1.2 in this book.) > When you've downloaded and extracted the Cake release !le, you'll end up > with a folder called > "cake_1.2.0." or something like that. Inside this folder contains > everything you need to run I have only skim read bits of it but it seems well written to me; I will be reading it later; first I have to resume my ongoing battle with auth/acl I would like to hear what other have to say about this book:- S On 24/01/2008, Baz <[EMAIL PROTECTED]> wrote: > > Would you believe that about 2 hours ago I was on Amazon and typed CakePHP > and found this? > > Please oh please tell me the book will be about Cake 1.2 > > Although I doubt it. > -- > Kevin Lloyd > 3HN Designs > http://www.3HNDesigns.com/ > (214) 473-4207 > > On Jan 24, 2008 4:25 PM, Dave <[EMAIL PROTECTED] > wrote: > > > > > Hello all, > > > > Just wanted to share some great news... Apress has picked up my > > manuscript for a CakePHP book which will come out in July. Things are > > moving along nicely and I'm excited to contribute some documentation > > to the Cake community. Lots of you have been interested in the > > progress of my Newbies guide and I've been tight-lipped about it > > because of the procedure of getting the book reviewed, etc. At least > > now you know of something more substantial than a self-published book > > on the horizon. > > > > The page on Amazon is preliminary, but up and running, FYI: > > > > > > http://www.amazon.com/Beginning-CakePHP-Professional-David-Golding/dp/1430209771/ > > > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Beginning CakePHP book with Apress
Would you believe that about 2 hours ago I was on Amazon and typed CakePHP and found this? Please oh please tell me the book will be about Cake 1.2 Although I doubt it. -- Kevin Lloyd 3HN Designs http://www.3HNDesigns.com/ (214) 473-4207 On Jan 24, 2008 4:25 PM, Dave <[EMAIL PROTECTED]> wrote: > > Hello all, > > Just wanted to share some great news... Apress has picked up my > manuscript for a CakePHP book which will come out in July. Things are > moving along nicely and I'm excited to contribute some documentation > to the Cake community. Lots of you have been interested in the > progress of my Newbies guide and I've been tight-lipped about it > because of the procedure of getting the book reviewed, etc. At least > now you know of something more substantial than a self-published book > on the horizon. > > The page on Amazon is preliminary, but up and running, FYI: > > > http://www.amazon.com/Beginning-CakePHP-Professional-David-Golding/dp/1430209771/ > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Installing CakePHP on MAMP
Hey, I'm having a major problem with installing CakePhp on a MAMP application on Mac OSX 10.4.10 There's nothing wrong with the MAMP Apache Server, I tried out Codeigniter and it worked just fine. But when I unzip CakePhp put it on my "localhost" and try to go to the Cake folder. Nothing happends. I can't reach the index.php file. I can't reach any other file on the whole cake folder. I even tried to put a image file in the root folder of the cake installation. And the server can't find it. Is this a mod_rewrite thing? Any suggestions? I would really love to try out CakePhp! Best regards, Alex --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Beginning CakePHP book with Apress
Hello all, Just wanted to share some great news... Apress has picked up my manuscript for a CakePHP book which will come out in July. Things are moving along nicely and I'm excited to contribute some documentation to the Cake community. Lots of you have been interested in the progress of my Newbies guide and I've been tight-lipped about it because of the procedure of getting the book reviewed, etc. At least now you know of something more substantial than a self-published book on the horizon. The page on Amazon is preliminary, but up and running, FYI: http://www.amazon.com/Beginning-CakePHP-Professional-David-Golding/dp/1430209771/ --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
In a company like that I would try to convince them of the increased development speed. Show them the stuff with the form helpers, and the save() method on objects and stuff like that. Try to make them realise that CakePHP will drasticly reduce development time, but in the mean time to still charge the clients the same. That should make a serious entrepeneur realise it's worth the investment.. ;) On Jan 24, 10:55 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Jan 24, 2008, at 2:36 PM, Doug @ Straw Dogs wrote: > > > > > > "Best Practices" - We've not used best practices before and its > > worked. So why change now? > > "OO" - As above. Nothing more than a buzzword. Whats the point. > > Yada yada yada. > > I'd have to agree with Chris at some level. Any place that thinks OO > is just a buzzword, and that Best Practices aren't important is going > to run into some serious trouble in the not too far future. > > Run. > > -- John --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
I'm new to Cake so I can't defend it at the moment (although in the near future I probably will). But your company sounds like the suck. Royally. In closing, OOP is definitely not just a buzzword -- it's a way of life for most programmers. It's a standard way to develop applications and more importantly -- maintain that application for years to come in a cost-effective, efficient way. On Jan 24, 5:39 pm, MonkeyGirl <[EMAIL PROTECTED]> wrote: > While I agree that it's a scary place to work for that doesn't see the > benefits of following standards and using frameworks, here's how I'd > word it: using CakePHP lets you do make the same site in far less time > (at least, it does once you're used to it, maybe for the third project > onwards). It's kind of like having a whole team of invisible > programmers at your disposal, working for free. > > It also means that if a client changes their mind about how they want > the site to work (and they will if you don't put your foot down), > making those changes will be almost as quick and easy as they assume > it is, for once. > > For example, the other week a client decided to suddenly change the > spec on a site that was nearly live. They wanted to change a static > list of things into a fully back-office-managed list that they could > add to, delete from, rename all the things on the list, and so on. > Creating the table and changing a column in the database, and pretty > much copying and pasting the code and changing a few variable and > class names here and there took all of about maybe twenty minutes. > Without CakePHP, it would have been maybe half a day's work. > > At least, that's how I like to feel about it, although it almost makes > me feel guilty that I'm not paying the CakePHP developers an hourly > rate while I work. :) > > Hope that helps, > Zoe. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
While I agree that it's a scary place to work for that doesn't see the benefits of following standards and using frameworks, here's how I'd word it: using CakePHP lets you do make the same site in far less time (at least, it does once you're used to it, maybe for the third project onwards). It's kind of like having a whole team of invisible programmers at your disposal, working for free. It also means that if a client changes their mind about how they want the site to work (and they will if you don't put your foot down), making those changes will be almost as quick and easy as they assume it is, for once. For example, the other week a client decided to suddenly change the spec on a site that was nearly live. They wanted to change a static list of things into a fully back-office-managed list that they could add to, delete from, rename all the things on the list, and so on. Creating the table and changing a column in the database, and pretty much copying and pasting the code and changing a few variable and class names here and there took all of about maybe twenty minutes. Without CakePHP, it would have been maybe half a day's work. At least, that's how I like to feel about it, although it almost makes me feel guilty that I'm not paying the CakePHP developers an hourly rate while I work. :) Hope that helps, Zoe. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
>From my experience businesses fall into this category for a few reasons: They just came into management and have been doing the same thing for so long and have already built a rather large application and it would just take too much time and effort to redo things. This is understandable...You can't really argue with that. It's sometimes hard for a developer to distance himself from what would eventually be so simple and efficient and concentrate on the money. No matter how easy it may be to redesign a system, it's going to take time; time the company would most likely spend on making money. >From your description, that doesn't seem to be the case. Now I have no idea what your company does, but "Quick and Dirty" scares me. If they already have a system (no matter how disfunctional), then it may be hard to get them to switch. If they don't have a system, then they do suffer from a bit of close mindedness. If The other problem with CakePHP is that no large scale company is going to let their business run of something with "Beta" in the title (I'm assuming you were going to propose 1.2 beta, right?). If it's just two developers, then you don't have many people to convince. Any developer can see the beauty of a framework. You guys could put together a small presentation and take this to management and see what flies. If all else fails and you really really want them to take up CakePHP, here's what you do: 1. You said that one developer already knows CakePHP. Good. In your off time, tutor the other guy. It's really not as hard as it sounds. The time it takes 2 people to learn cake is not 2 * (time for one person). You already know what all the shortcuts are. You know what to focus on, you can just tell them. 2. Now I'm assuming that you dont' have a system. If you don't, then start doing projects in CakePHP to get a feel for it. 3. When you feel that both of your developers are capable, you start cranking out projects faster than they can dream them upthen you walk into the office and say: "I bet you've noticed the increased productivity. This is how we achieved this. Now we can go back to old way, or keep doing what we're doing. It's up to you" :) Yes this technique is underhanded, but it works. But keep in mind, this is not something that you would want to do if they already have a system. This is how I implemented the switch to jQuery at my company: I showed my manager how I could condense 80 lines of code down to 15 AND do cool Ajax stuff :D. If anyone out there has convinced an enter company/department to switch over to CakePHP I'd love to hear about it. -- Kevin Lloyd 3HN Designs http://www.3HNDesigns.com/ (214) 473-4207 On Jan 24, 2008 3:55 PM, John David Anderson (_psychic_) < [EMAIL PROTECTED]> wrote: > > > On Jan 24, 2008, at 2:36 PM, Doug @ Straw Dogs wrote: > > > > > > > > "Best Practices" - We've not used best practices before and its > > worked. So why change now? > > "OO" - As above. Nothing more than a buzzword. Whats the point. > > Yada yada yada. > > I'd have to agree with Chris at some level. Any place that thinks OO > is just a buzzword, and that Best Practices aren't important is going > to run into some serious trouble in the not too far future. > > Run. > > -- John > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
On Jan 24, 2008, at 2:36 PM, Doug @ Straw Dogs wrote: > > > "Best Practices" - We've not used best practices before and its > worked. So why change now? > "OO" - As above. Nothing more than a buzzword. Whats the point. > Yada yada yada. I'd have to agree with Chris at some level. Any place that thinks OO is just a buzzword, and that Best Practices aren't important is going to run into some serious trouble in the not too far future. Run. -- John --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
On Jan 24, 2008, at 2:36 PM, Doug @ Straw Dogs wrote: > In answer (devils advocate) to the sites sales pitch: > "No Configuration" - Way too vague. == less maintenance cost (= less $ in the long run) > > "Extremely Simple" - One developer doesn't know how to use it. Time > is money and no matter how simple it is, it will still require time to > learn. == shallow learning curve for developers (= easy transition to a better solution) > "Active, Friendly Community" - So what? Why do I care? I can do it == free documentation, free testing, free new features Along with this, if your top guy gets hit by a bus (or worse, hired by the competition), you have a pool of people you can go to in order to get help and documentation. > in PHP - that has a huge community too. > "Best Practices" - We've not used best practices before and its > worked. So why change now? Because you can only dodge the bullet for so long. Keep doing the wrong thing, and it's gonna come back to haunt you. Guaranteed. > "OO" - As above. Nothing more than a buzzword. Whats the point. > Yada yada yada. == reusable code, better maintainability Most of those translate into getting things out the door faster, and being more safe as far as a solid, documented codebase. fwiw, John --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
On Jan 24, 2008 4:36 PM, Doug @ Straw Dogs <[EMAIL PROTECTED]> wrote: > In answer (devils advocate) to the sites sales pitch: > "No Configuration" - Way too vague. > "Extremely Simple" - One developer doesn't know how to use it. Time > is money and no matter how simple it is, it will still require time to > learn. > "Active, Friendly Community" - So what? Why do I care? I can do it > in PHP - that has a huge community too. > "Best Practices" - We've not used best practices before and its > worked. So why change now? > "OO" - As above. Nothing more than a buzzword. Whats the point. > Yada yada yada. > > This is what I'm up against > Time to find a company that's a little more open-minded. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Business Benifit?
On Jan 24, 10:36 pm, "Doug @ Straw Dogs" <[EMAIL PROTECTED]> wrote: > I'm a developer by heart and know I'd love to code in CakePHP. > However, I'm failing to see any solid business benifit in using it > that can help me sell it to the directors. > > The site states features - but not benifits and certainly not business > benifits. > > Imagine there's a small company with 2 developers. One knows Cake and > the other doesn't. The preferred development method is 'quick and > dirty' with no desire to learn new methods. > > How do you sell a new framework like Cake in that instance? > > Help me out - please? :) > > P.S. > > In answer (devils advocate) to the sites sales pitch: > "No Configuration" - Way too vague. > "Extremely Simple" - One developer doesn't know how to use it. Time > is money and no matter how simple it is, it will still require time to > learn. > "Active, Friendly Community" - So what? Why do I care? I can do it > in PHP - that has a huge community too. > "Best Practices" - We've not used best practices before and its > worked. So why change now? > "OO" - As above. Nothing more than a buzzword. Whats the point. > Yada yada yada. > > This is what I'm up against Get out of there and while you still can! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Business Benifit?
I'm a developer by heart and know I'd love to code in CakePHP. However, I'm failing to see any solid business benifit in using it that can help me sell it to the directors. The site states features - but not benifits and certainly not business benifits. Imagine there's a small company with 2 developers. One knows Cake and the other doesn't. The preferred development method is 'quick and dirty' with no desire to learn new methods. How do you sell a new framework like Cake in that instance? Help me out - please? :) P.S. In answer (devils advocate) to the sites sales pitch: "No Configuration" - Way too vague. "Extremely Simple" - One developer doesn't know how to use it. Time is money and no matter how simple it is, it will still require time to learn. "Active, Friendly Community" - So what? Why do I care? I can do it in PHP - that has a huge community too. "Best Practices" - We've not used best practices before and its worked. So why change now? "OO" - As above. Nothing more than a buzzword. Whats the point. Yada yada yada. This is what I'm up against --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
create dynamic site map from routes?
I would like to create a dynamic site map foe my CakePHP 1.2 beta site. Normally I would pull the site map from a cms database of pages. But I do not have a CMS for this site, and thought maybe I could do this using routes or some other knowledge Cake itself holds. Any ideas? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
suggestion: add to view::__scripts out of order
Looking at the source for view.php I see that addScript() simply appends a new script to __scripts. I'm wondering if it would be worthwhile to add a 3rd param to addScript() so that the new script can be inserted at some other position than the end. Something like: array_splice($this->__scripts, $position, count($this->__scripts), array_merge(array($name), array_slice($this->__scripts, $position))); That's the basic idea. $position would have to be checked against the actual length of the array, of course. Or, maybe an array could be passed instead of the integer position. Something like array('insertBefore'=>'another_script') Thoughts? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Importing and Executing Raw SQL: Problems with Semicolons
On Jan 24, 2008 2:48 PM, daphonz <[EMAIL PROTECTED]> wrote: > But when I try to use it to insert a line like: > > INSERT INTO `categories` > (`id`,`parent_id`,`slug`,`name`,`teaser`,`description`,`model`,`options`,`ordering`,`lft`,`rght`,`enabled`,`type`,`level`,`created`,`modified`) > VALUES ('2','0','file-repository','File Repository',' p>',NULL,'Document','a:1:{i:0;s: > 1:\"0\";}','1','3','4','true','nested',NULL,'2007-11-01 > 17:33:17','2007-11-01 17:33:17'); Is there any reason you're not building up an array containing that information and using $this->Model->save($dataArray) ? -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: not sure whats best practice: recursiveness
> With your data relationships you have an easy way using recursive = 0: > > $this->Product->Comment->findAll("Comment.product_id = ". > $myProductId); > > Since Comment belongsTo Product, and also Comment belongsTo User, the > Product and User models will be joined into the same query, and you > will get all the data you want by going through the Comment model, > without any need for recursion > 0. you're right, but if a Product doesn't have a comment, it won't get listed. Maybe I could make an initial comment on a Products save for that case. Anyway, great Idea, thx for helping me out on this! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: not sure whats best practice: recursiveness
Thx, your hint helped to discover the bindable behaviour in the bakery, that helped a lot: > $this->Product->restrict('Comment.User'); > $this->set('product', $this->Product->read(null, $id)); Now everything's fine. Thx 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?hl=en -~--~~~~--~~--~--~---
Re: not sure whats best practice: recursiveness
With your data relationships you have an easy way using recursive = 0: $this->Product->Comment->findAll("Comment.product_id = ". $myProductId); Since Comment belongsTo Product, and also Comment belongsTo User, the Product and User models will be joined into the same query, and you will get all the data you want by going through the Comment model, without any need for recursion > 0. Sometimes the trick is to just know which model to best go through for your query. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Why are HABTM 'with' relationships auto-deleted on Model::save() ??
Thanks nate. On Jan 24, 1:51 pm, nate <[EMAIL PROTECTED]> wrote: > class Post extends AppModel { > > var $hasAndBelongsToMany = array("Tag" => array("with" => > "Whatever", "unique" => false)); > > } > > On Jan 24, 2:48 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > I'm back to thinking I'm right...someone please prove me wrong here. > > > If $fieldList is specified for Model::save() shouldn't it at least > > THEN ignore the 'with' relationships? It currently does the DELETE > > query even in this case. > > > The only other option is saveField() but that is really wasteful for > > the multiple queries. > > > On Jan 24, 1:31 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > yeah that seems like a logical thing to do > > > > On Jan 24, 1:30 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > > > Hey Eric, why don't you just use saveField() in this situation? > > > > > On Jan 24, 1:20 pm, "[EMAIL PROTECTED]" > > > > > <[EMAIL PROTECTED]> wrote: > > > > > I don't know why HABTM relationships are deleted automatically on a > > > > > Model::save() in the first place, but is this really necessary for the > > > > > 'with' relationships too? They are practically standalone models so > > > > > shouldn't there be an option to preserve the current 'with' > > > > > relationships? > > > > > > I can unbind() them, but I'm questioning that this is a logical thing > > > > > to do before every single save() where I'm just updating the original > > > > > model. > > > > > > Core contributors have any input on this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: not sure whats best practice: recursiveness
As far as I know.. best practice is to use unbindmodel() to unbind product from comment right before you do the read() On Jan 24, 12:35 pm, Buckyball <[EMAIL PROTECTED]> wrote: > Hello to all, > > just started to play around with cake and I like it. > Now I stuck a little concernig accociations > and the recursive level of find/findAll. > > I got following setup: > > ProducthasManyComment > Comment belongsTo User > Comment belongsTo Product > UserhasMany Comment > > Within the product view I would like to show all comments belonging to > this product including > the nickname of the user who wrote it. > > With a normal > > > $this->Product->read(null, $id)); > > I only can get the User.id of the comment Table. Ok, I can set > > > $this->Product->recursive = 2; > > to fetch the belonging user, but then there's a big sql query overhead > because > cake also fetches the belonging product of the comment again, which > obviously > is not needed. > > to make it hopefully a bit more clear, here's my data array > (shortened): > > Array > ( > [Product] => Array > ( > [id] => 3 > [name] => Handy aus Ttitan mit Diamanten > [description] => Sehr teuer, sehr cool ;-) > [selldate] => 2008-01-22 17:09:00 > [price] => 8887.23 > [condition] => NEW > [created] => 2008-01-22 17:10:10 > [slug] => Handy-Aus-Titan-Mit-Diamanten > ) > > [Comment] => Array > ( > [0] => Array > ( > [id] => 2 > [user_id] => 1 > [product_id] => 3 > [text] => sdfsfsdfsdfsd > [created] => 2008-01-23 17:38:18 > [User] => Array > ( > [fname] => Sven > [username] => zoq > [email] => [EMAIL PROTECTED] > ) > > [Product] => Array > ( > [id] => 3 > [name] => Handy aus Ttitan mit Diamanten > [description] => Sehr teuer, sehr cool ;-) > [selldate] => 2008-01-22 17:09:00 > [price] => 8887.23 > [condition] => NEW > [created] => 2008-01-22 17:10:10 > [slug] => Handy-Aus-Titan-Mit-Diamanten > ) > > ) > > ) > ) > > Is there any way to avoid $recursive = 2 ? Or is it just the way cake > works ? > Or should I manually get the comments username byId which in fact > would safe > some queries ? If so, how can I get the required user names ? > > I would like to hear what, in such a situation, would be the best to > do. > > thx > > --B. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Model->Del() causes SQL Error
On Jan 24, 2008 3:01 PM, stefan <[EMAIL PROTECTED]> wrote: > > Hi all, > > i have a Problem with my Models that use HABTM relations (also i'm not > sure if this causes the trouble) > > when using the $model->del($id) i get an sql error: > > SQL Error: 1066: Not unique table/alias: 'Company' > > the query built by cake is: > DELETE `Company` FROM `companies` AS `Company` WHERE `Company`.`id` IN > (11) > > why does cake to that? > i could of course write my own query as this is a very tiny one, but i > would like to understand why cake does this... You might want to try updating to a more recent version of 1.2 (if that's what you're using). I ran into this problem and saw that it got fixed. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Model->Del() causes SQL Error
Hi all, i have a Problem with my Models that use HABTM relations (also i'm not sure if this causes the trouble) when using the $model->del($id) i get an sql error: SQL Error: 1066: Not unique table/alias: 'Company' the query built by cake is: DELETE `Company` FROM `companies` AS `Company` WHERE `Company`.`id` IN (11) why does cake to that? i could of course write my own query as this is a very tiny one, but i would like to understand why cake does this... thanks a lot stefan --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
not sure whats best practice: recursiveness
Hello to all, just started to play around with cake and I like it. Now I stuck a little concernig accociations and the recursive level of find/findAll. I got following setup: ProducthasManyComment Comment belongsTo User Comment belongsTo Product UserhasMany Comment Within the product view I would like to show all comments belonging to this product including the nickname of the user who wrote it. With a normal > $this->Product->read(null, $id)); I only can get the User.id of the comment Table. Ok, I can set > $this->Product->recursive = 2; to fetch the belonging user, but then there's a big sql query overhead because cake also fetches the belonging product of the comment again, which obviously is not needed. to make it hopefully a bit more clear, here's my data array (shortened): Array ( [Product] => Array ( [id] => 3 [name] => Handy aus Ttitan mit Diamanten [description] => Sehr teuer, sehr cool ;-) [selldate] => 2008-01-22 17:09:00 [price] => 8887.23 [condition] => NEW [created] => 2008-01-22 17:10:10 [slug] => Handy-Aus-Titan-Mit-Diamanten ) [Comment] => Array ( [0] => Array ( [id] => 2 [user_id] => 1 [product_id] => 3 [text] => sdfsfsdfsdfsd [created] => 2008-01-23 17:38:18 [User] => Array ( [fname] => Sven [username] => zoq [email] => [EMAIL PROTECTED] ) [Product] => Array ( [id] => 3 [name] => Handy aus Ttitan mit Diamanten [description] => Sehr teuer, sehr cool ;-) [selldate] => 2008-01-22 17:09:00 [price] => 8887.23 [condition] => NEW [created] => 2008-01-22 17:10:10 [slug] => Handy-Aus-Titan-Mit-Diamanten ) ) ) ) Is there any way to avoid $recursive = 2 ? Or is it just the way cake works ? Or should I manually get the comments username byId which in fact would safe some queries ? If so, how can I get the required user names ? I would like to hear what, in such a situation, would be the best to do. thx --B. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Why are HABTM 'with' relationships auto-deleted on Model::save() ??
class Post extends AppModel { var $hasAndBelongsToMany = array("Tag" => array("with" => "Whatever", "unique" => false)); } On Jan 24, 2:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm back to thinking I'm right...someone please prove me wrong here. > > If $fieldList is specified for Model::save() shouldn't it at least > THEN ignore the 'with' relationships? It currently does the DELETE > query even in this case. > > The only other option is saveField() but that is really wasteful for > the multiple queries. > > On Jan 24, 1:31 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > yeah that seems like a logical thing to do > > > On Jan 24, 1:30 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Hey Eric, why don't you just use saveField() in this situation? > > > > On Jan 24, 1:20 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > > > I don't know why HABTM relationships are deleted automatically on a > > > > Model::save() in the first place, but is this really necessary for the > > > > 'with' relationships too? They are practically standalone models so > > > > shouldn't there be an option to preserve the current 'with' > > > > relationships? > > > > > I can unbind() them, but I'm questioning that this is a logical thing > > > > to do before every single save() where I'm just updating the original > > > > model. > > > > > Core contributors have any input on this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Importing and Executing Raw SQL: Problems with Semicolons
Oh, sorry, I misunderstood your initial reply. So to properly answer you: yes. The SQL syntax works when directly loaded through the command line or PHPMyAdmin. When I remove any INSERT data that contains serialized content, my initial system works just fine, and the SQL file is successfully loaded into the MySQL server. But when I try to use it to insert a line like: INSERT INTO `categories` (`id`,`parent_id`,`slug`,`name`,`teaser`,`description`,`model`,`options`,`ordering`,`lft`,`rght`,`enabled`,`type`,`level`,`created`,`modified`) VALUES ('2','0','file-repository','File Repository',' ',NULL,'Document','a:1:{i:0;s: 1:\"0\";}','1','3','4','true','nested',NULL,'2007-11-01 17:33:17','2007-11-01 17:33:17'); And run it with query(), rawQuery(), or execute(), the system fails. I'm pretty sure it's related to those additional semi-colons in the serialized content. Thanks for your continued assistance. -Casey On Jan 24, 2:32 pm, "b logica" <[EMAIL PROTECTED]> wrote: > On Jan 24, 2008 1:46 PM, daphonz <[EMAIL PROTECTED]> wrote: > > > > > I may not understand the LOAD DATA LOCAL INFILE fully, but doesn't > > that require special security access? > > If you have shell access to the database you can use this command to > load the data into a table. One needs to have the "FILE privilege" > unless "LOCAL" is used. See here for all the dirty details: > > http://dev.mysql.com/doc/refman/5.0/en/load-data.html > > Alternatively (because i'm not entirely sure what you have in your > file--raw data or SQL statements) you can connect to mysql from a > shell and use this syntax: > > \. /path/to/your/file > > > I'm trying to get this system > > to work off of a generic apache server out-of-the-box. > > I realise that. What i mean is, can the statements in the file be run > against a database without errors when doing so directly (ie. without > PHP)? If you can't get shell access, can you load the contents of the > file using PHPMyAdmin? The point is to ensure that your SQL syntax is > ok to begin with. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Why are HABTM 'with' relationships auto-deleted on Model::save() ??
I'm back to thinking I'm right...someone please prove me wrong here. If $fieldList is specified for Model::save() shouldn't it at least THEN ignore the 'with' relationships? It currently does the DELETE query even in this case. The only other option is saveField() but that is really wasteful for the multiple queries. On Jan 24, 1:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > yeah that seems like a logical thing to do > > On Jan 24, 1:30 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hey Eric, why don't you just use saveField() in this situation? > > > On Jan 24, 1:20 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > I don't know why HABTM relationships are deleted automatically on a > > > Model::save() in the first place, but is this really necessary for the > > > 'with' relationships too? They are practically standalone models so > > > shouldn't there be an option to preserve the current 'with' > > > relationships? > > > > I can unbind() them, but I'm questioning that this is a logical thing > > > to do before every single save() where I'm just updating the original > > > model. > > > > Core contributors have any input on this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Importing and Executing Raw SQL: Problems with Semicolons
On Jan 24, 2008 1:46 PM, daphonz <[EMAIL PROTECTED]> wrote: > > I may not understand the LOAD DATA LOCAL INFILE fully, but doesn't > that require special security access? If you have shell access to the database you can use this command to load the data into a table. One needs to have the "FILE privilege" unless "LOCAL" is used. See here for all the dirty details: http://dev.mysql.com/doc/refman/5.0/en/load-data.html Alternatively (because i'm not entirely sure what you have in your file--raw data or SQL statements) you can connect to mysql from a shell and use this syntax: \. /path/to/your/file > I'm trying to get this system > to work off of a generic apache server out-of-the-box. > I realise that. What i mean is, can the statements in the file be run against a database without errors when doing so directly (ie. without PHP)? If you can't get shell access, can you load the contents of the file using PHPMyAdmin? The point is to ensure that your SQL syntax is ok to begin with. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Why are HABTM 'with' relationships auto-deleted on Model::save() ??
yeah that seems like a logical thing to do On Jan 24, 1:30 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hey Eric, why don't you just use saveField() in this situation? > > On Jan 24, 1:20 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > I don't know why HABTM relationships are deleted automatically on a > > Model::save() in the first place, but is this really necessary for the > > 'with' relationships too? They are practically standalone models so > > shouldn't there be an option to preserve the current 'with' > > relationships? > > > I can unbind() them, but I'm questioning that this is a logical thing > > to do before every single save() where I'm just updating the original > > model. > > > Core contributors have any input on this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Why are HABTM 'with' relationships auto-deleted on Model::save() ??
Hey Eric, why don't you just use saveField() in this situation? On Jan 24, 1:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I don't know why HABTM relationships are deleted automatically on a > Model::save() in the first place, but is this really necessary for the > 'with' relationships too? They are practically standalone models so > shouldn't there be an option to preserve the current 'with' > relationships? > > I can unbind() them, but I'm questioning that this is a logical thing > to do before every single save() where I'm just updating the original > model. > > Core contributors have any input on this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Why are HABTM 'with' relationships auto-deleted on Model::save() ??
I don't know why HABTM relationships are deleted automatically on a Model::save() in the first place, but is this really necessary for the 'with' relationships too? They are practically standalone models so shouldn't there be an option to preserve the current 'with' relationships? I can unbind() them, but I'm questioning that this is a logical thing to do before every single save() where I'm just updating the original model. Core contributors have any input on this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Importing and Executing Raw SQL: Problems with Semicolons
I may not understand the LOAD DATA LOCAL INFILE fully, but doesn't that require special security access? I'm trying to get this system to work off of a generic apache server out-of-the-box. On Jan 24, 12:26 pm, "b logica" <[EMAIL PROTECTED]> wrote: > On Jan 24, 2008 11:14 AM, daphonz <[EMAIL PROTECTED]> wrote: > > > > > > > Hi Folks, > > > I'm trying to create a self-install routine for my web app, part of > > which requires it to create multiple tables with some pre-set content. > > > I use a system similar to that mentioned by Cakebaker, (http:// > > cakebaker.42dh.com/2007/04/16/writing-an-installer-for-your-cakephp- > > application/), which, for the most part, works fine. > > > The problem arises when I'm trying to load the SQL data into the > > database. The tables will load just fine, but there are content rows > > that contain serialized information. When it comes to executing those > > lines of code, (using the rawQuery routine, I get an MySQL syntax > > error. > > > Here's what I'm currently doing: > > >$statements = > > file_get_contents($fileNameOfSQLDump,'FILE_TEXT'); > >$db->rawQuery($statements); > > > I'm reasonably sure that the problem comes in on the first line of > > content that includes a serialized data string. Also, I've used this > > same SQL data to import through other programs such as PHPMyAdmin, so > > I know it's not a fundamental problem with the data itself. > > Can you execute the same statements using LOAD DATA LOCAL INFILE? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Command Line in Mac OSX Leopard
P.S. I then had a problem because I'm using MAMP for mySQL and the command line bake couldn't connect to the database. Follow the instructions on this thread to fix it: http://groups.google.com/group/cake-php/browse_thread/thread/5865eb1c29c1/644b7eadf87a7a68?lnk=gst&q=mamp#644b7eadf87a7a68 On Jan 24, 7:19 pm, martinp <[EMAIL PROTECTED]> wrote: > I finally did it. Thanks for your help everyone. This is how, step-by- > step: > > I set up a file - ~./bash_login (as longint says above). This was done > by typing: > pico .bash_profile > from the first directory you're in when you open Terminal (your Users/ > username directory). > > In this (new) file I typed: > export PATH=$PATH:/Applications/MAMP/Cake_1.2/cake/console > > The above directory was the path I'd saved Cake to... obviously you > need to change it to whatever applies. > and then CTRL O to save. > > Then when I typed 'cake' I had the screen I'd been looking for. Hurrah! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Command Line in Mac OSX Leopard
I finally did it. Thanks for your help everyone. This is how, step-by- step: I set up a file - ~./bash_login (as longint says above). This was done by typing: pico .bash_profile from the first directory you're in when you open Terminal (your Users/ username directory). In this (new) file I typed: export PATH=$PATH:/Applications/MAMP/Cake_1.2/cake/console The above directory was the path I'd saved Cake to... obviously you need to change it to whatever applies. and then CTRL O to save. Then when I typed 'cake' I had the screen I'd been looking for. Hurrah! --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Pquery with cake1.2 beta and PHP5
Hi Guys, Does anyone has used Pquery with cake1.2 beta on PHP 5. I are trying to use it but it is not working for me. Anyone have any idea for Pquery. Thanks --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Auth / Acl and plugins
Hi Bakers, I am having a problem with ACL and Auth component. First the context : 1) I have several applications, and I am using a User / Group etc .. plugin in order to the "public" site to process the login and the redirect the user to ont of the application. The User / Group / Role and some other table are stored in a separate database. This plugin expect a dadabse configuration 'access' and that should be set in the database.php of the application using the plugin. The $useDbConfig is set 'access' into the plugin appModel. 2)In each application I have a database that contains all my application tables as well as the the acl tables (acos / sros / acos_aros). For the application this is the "default" configuration of my dabase php. Each application has got a second configuration $access that points to the 1) db. I the application I use the Auth component in type "action". Here start the problem when I want to check a controller/action using the Auth. Indeed, being in one of my application I receive a message "no tables users found for model User". I have been into the code, and actually that comes from the db_acl node method that does a ClassRegistry::init. Actually this the ClassRegistry::init that output the error, because I guess, the plugin name id not know. Indeed the model extracted from the User record is User and not plugin.User... I have tried to set the userModel in the auth using "plugin.User", but that can't work and would need lot's of modifications. Well, I am asking if someone has got a solution for this, or maybe there is an existing way in ACL to handle Model.foreign key that are in plugins ? Thanks --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: FormHelper - multiple checkbox tags
On Jan 24, 2008 12:18 PM, Renan Gonçalves <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using the new form helper on Cake 1.2. > I would like to create multiple checkbox, but I can't, because it generates > div's that should not be generated (brokes layout). > > $form->select(' Model.column', array('key' => 'value'), null, > array('multple' => 'checkbox')) > > I think that I could be choose for create div's or not. > Check out this article: http://bakery.cakephp.org/articles/view/overriding-specific-html-tags-before-using-helper-methods Although, I'm not absolutely certain that this will help in your case, because i'm not certain where in Cake the divs are being added. Have a look inside these files: /cake/libs/view/helpers/html.php /cake/libs/view/helpers/form.php --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Accessing Acl from a Helper
Thanks for the info. That is a great solution. On Jan 23, 5:02 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > It is a component and thus only available to cotrollers. > > What I do is I set the authentication data I need in my views from the > beforeFilter of AppController. > > if ( isset($this->Auth) ) > { > // do all the normal auth setups first. Then... > $this->set('auth', $this->Auth->user() ); > > } > > Then I can check if the user is logged in or not. I can print his/her > name in the top-section if I want. Things like that. > > You can do the same with Acl stuff. > > if ( isset($this->Acl) ) > { > $this->set('aclData', $this->Acl->someDataYouNeedOnEveryPage ); > > } > > On Jan 23, 9:02 pm, Keith <[EMAIL PROTECTED]> wrote: > > > I'm trying to create a helper that checks the Acl and provides edit / > > delete links appropriately on my index action. > > > I keep getting an error that Acl is an undefined property in the > > helper. Does the Acl object only exist inside the controller? > > > Anyone run into this issue and have a work around? I am probably over > > thinking this thing... --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Create new object with "hasAndBelongsToMany" association
I believe that whatever model you are using to save needs to be first in your array, so if you are saving with $this->Tab->save() your code needs to look like this: $to_save['Tab'] = array( 'title' => '(Onglet)', 'position' => ($position['0']['0']['position']+1) ); $to_save['Version'] = array( 'id'=> $this->data['Version']['id'] ); $this->Tab->save($to_save, true); Or, you can use $this->Tab->Version->save($to_save) with your current setup instead. Also, If you are using Cake 1.2 you may be seeing this bug: http://groups.google.com/group/cake-php/browse_thread/thread/2ad48c4e10f58fc0/289a09fe363ef50a?lnk=raot Try Nina's fix and see if it works. Dave On Jan 24, 9:11 am, LoKi <[EMAIL PROTECTED]> wrote: > Hi! I'm beginner with cakephp. > I have two objets linked with "hasAndBelongsToMany" association : > > VERSION MODEL > *** > > class Version extends AppModel { > var $name = 'Version'; > > var $hasAndBelongsToMany = array('Tab' => > > array('className' => 'Tab', > > 'joinTable' => 'tabs_versions', > > 'foreignKey' => 'version_id', > > 'associationForeignKey'=> 'tab_id', > > 'unique' => true > ) > ); > > } > > TAB MODEL > *** > > class Tab extends AppModel { > var $name = 'Tab'; > > var $hasAndBelongsToMany = array('Version' => > > array('className' => 'Version', > > 'joinTable' => 'tabs_versions', > > 'foreignKey' => 'tab_id', > > 'associationForeignKey'=> 'version_id', > > 'unique' => true > ) > ); > > } > > ** > > I would like to make a new "tab" without form. > My problem : The new tab is created, but the association in the table > named "tabs_versions" (in database) isn't created. > > My actual php code (in controller) : > > $to_save = array(); > $to_save['Version'] = array( > 'id' => > $this->data['Version']['id'] > ); > $to_save['Tab'] = array( > 'title' => '(Onglet)', > 'position' => > ($position['0']['0']['position']+1) > ); > $this->Tab->save($to_save, true); > > How can I do ? > Thanks 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?hl=en -~--~~~~--~~--~--~---
Re: Importing and Executing Raw SQL: Problems with Semicolons
On Jan 24, 2008 11:14 AM, daphonz <[EMAIL PROTECTED]> wrote: > > Hi Folks, > > I'm trying to create a self-install routine for my web app, part of > which requires it to create multiple tables with some pre-set content. > > I use a system similar to that mentioned by Cakebaker, (http:// > cakebaker.42dh.com/2007/04/16/writing-an-installer-for-your-cakephp- > application/), which, for the most part, works fine. > > The problem arises when I'm trying to load the SQL data into the > database. The tables will load just fine, but there are content rows > that contain serialized information. When it comes to executing those > lines of code, (using the rawQuery routine, I get an MySQL syntax > error. > > Here's what I'm currently doing: > >$statements = > file_get_contents($fileNameOfSQLDump,'FILE_TEXT'); >$db->rawQuery($statements); > > I'm reasonably sure that the problem comes in on the first line of > content that includes a serialized data string. Also, I've used this > same SQL data to import through other programs such as PHPMyAdmin, so > I know it's not a fundamental problem with the data itself. > Can you execute the same statements using LOAD DATA LOCAL INFILE? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
FormHelper - multiple checkbox tags
Hello, I'm using the new form helper on Cake 1.2. I would like to create multiple checkbox, but I can't, because it generates div's that should not be generated (brokes layout). $form->select('Model.column', array('key' => 'value'), null, array('multple' => 'checkbox')) I think that I could be choose for create div's or not. Thank's -- Renan Gonçalves - Software Engineer Cell Phone: +55 (11) 8633-6018 MSN: [EMAIL PROTECTED] Web Site: renangoncalves.com São Paulo - SP/Brazil --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Don't want to trigger modified field update
If you're using Model::save(), then no, there's no way to deactivate it (that I know of). However, you could try this: $this->MyModel->updateAll(array('visits' => 'visits+1'), array('id' => {{whatever}})); This will update the record, but will not call beforeSave(), afterSave(), or update any other fields. It will just do a straight sql update. On Jan 24, 4:58 pm, Andrew Assarattanakul <[EMAIL PROTECTED]> wrote: > It probably would be better to create a separate table to take care of > the visit counter so that you don't have to stop a built in > convention. This way if you have a modified field in the visit table > you can also see when the last time someone visited that page. > > On Jan 24, 8:57 am, Jakanapes <[EMAIL PROTECTED]> wrote: > > > I have a small app I'm working on and I'm trying to port it over to > > cakePHP for easier handling. > > > There is a table that serves pages and I want the modified field to be > > updated on an edit, but I have a visits field that I increment so I > > can track the most popular page views and I don't want to update the > > modified every time the page is selected. Is there a way to tell cake > > not to update the modified field? > > > TIA --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: question about *po files and i18n
thanks 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?hl=en -~--~~~~--~~--~--~---
Re: Don't want to trigger modified field update
It probably would be better to create a separate table to take care of the visit counter so that you don't have to stop a built in convention. This way if you have a modified field in the visit table you can also see when the last time someone visited that page. On Jan 24, 8:57 am, Jakanapes <[EMAIL PROTECTED]> wrote: > I have a small app I'm working on and I'm trying to port it over to > cakePHP for easier handling. > > There is a table that serves pages and I want the modified field to be > updated on an edit, but I have a visits field that I increment so I > can track the most popular page views and I don't want to update the > modified every time the page is selected. Is there a way to tell cake > not to update the modified field? > > TIA --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: fileinfo help needed
On Jan 24, 2008 12:53 AM, bob <[EMAIL PROTECTED]> wrote: > Just magic.mime > Maybe it's a Windows thing. Try adding the following to your php.ini: [mime_magic] mime_magic.debug = On mime_magic.magicfile = 'c:\magic.mime' --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Looking for a cool php debugger(supporting cake)
On Jan 24, 2008 11:22 AM, Novice Programmer <[EMAIL PROTECTED]> wrote: > > I was wondering what all you are guys are using for debugging. > I'm a Komodo user and it has built-in support for using Xdebug for debugging purposes. You might also want to check out the Zend Developers Zone (http://devzone.zend.com) where they have been doing a series on debugging PHP using Xdebug. Hope that helps. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: question about *po files and i18n
I have my po files in UTF-8 and everything works fine (polish chars are displayed properly on UTF-8 encoded pages). You can have %s etc in your language strings. Just use sprintf(__('Message id', true), $var1, $var2, ...) for example: in po MSGID "Do you want to delete %s?" MSGSTR "Czy chcesz usunac %s?" in view printf(__('Do you want to delete %s?', true), $name) (or sprintf if you not want to print if immediately) On 22 Sty, 17:09, Dia <[EMAIL PROTECTED]> wrote: > hi > > my question is simple: is it possible use expression like %s in msgid > and msgstr in *po files? > tried but failed > > tanks in advance > > note: > manual says encode *po files in ISO-... but in my case I have to > encode *po files in UTF-8 > in ISO-..., special chars are not displayed correctly > my HTML code is served in UTF-8, can it be the reason ? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Looking for a cool php debugger(supporting cake)
I've heard good things about xdebug, Komodo IDE, and Zend Studio, though the later 2 aren't free. Dave On Jan 24, 9:22 am, "Novice Programmer" <[EMAIL PROTECTED]> wrote: > Hello guys, > > I am relatively new at cake and more specifically at php. I am more of a > desktop programmer than a web programmer. Have programmed on C++, java et > al.. when i got into php i found debugging extremely tough(using echo and > all that), then i found eclipse PDT extension which helped me debugging the > php. Now when i started developing on cake, eclipse seems useless for this > frame work and is not able to help me in debugging(it can't load the page > when i launch it from debug option from tools). > > I was wondering what all you are guys are using for debugging. > > -- > Thanks & Regards, > Novice (http://ishuonweb.wordpress.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?hl=en -~--~~~~--~~--~--~---
Create new object with "hasAndBelongsToMany" association
Hi! I'm beginner with cakephp. I have two objets linked with "hasAndBelongsToMany" association : VERSION MODEL *** class Version extends AppModel { var $name = 'Version'; var $hasAndBelongsToMany = array('Tab' => array('className'=> 'Tab', 'joinTable'=> 'tabs_versions', 'foreignKey' => 'version_id', 'associationForeignKey'=> 'tab_id', 'unique' => true ) ); } TAB MODEL *** class Tab extends AppModel { var $name = 'Tab'; var $hasAndBelongsToMany = array('Version' => array('className'=> 'Version', 'joinTable'=> 'tabs_versions', 'foreignKey' => 'tab_id', 'associationForeignKey'=> 'version_id', 'unique' => true ) ); } ** I would like to make a new "tab" without form. My problem : The new tab is created, but the association in the table named "tabs_versions" (in database) isn't created. My actual php code (in controller) : $to_save = array(); $to_save['Version'] = array( 'id'=> $this->data['Version']['id'] ); $to_save['Tab'] = array( 'title' => '(Onglet)', 'position' => ($position['0']['0']['position']+1) ); $this->Tab->save($to_save, true); How can I do ? Thanks 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?hl=en -~--~~~~--~~--~--~---
Re: question about *po files and i18n
up no one knows ? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Problem with Delete
I just found this: http://www.1keydata.com/sql/sqlalias.html That describes using alias without the 'AS' I mentioned above (which is needed in MySQL). In this reference, they use the alias feature as described in villas original post: SELECT "table_alias"."column_name1" "column_alias" FROM "table_name" "table_alias" So it looks like the original query was syntactically correct (at least for some db systems). Maybe the problem is that FirebirdSQL doesn't support aliases at all?? Dave --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: help, upgrade from alpha to beta: paginator problem
I tried using array but not this (easier) way... ashamed :/ it works, thanks for helping --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: An Idea For Ease Of Developing Views
Absolutely agree with all the above. Template systems (Smarty, et al) are obtrusive layers upon layers that are completely unnecessary. Very basic PHP *Is* a templating system. With alternative control block structure, it is very readable in view/html code (ie: :endif; usage) and thats exactly what it is there fore. By the time you take a templating system like Smarty, which is trying to re-invent the wheel, you have overly complex code in your view, too many layers of processing, and an extra syntax inserted into the framework. Useless. I've used the preg replace method when a client just wants to get away with placeholder tags in the view like {{field:contactname}} and is very demanding about it. WebSpin.biz On Jan 24, 10:24 am, hydra12 <[EMAIL PROTECTED]> wrote: > I'll have to agree. I confess that, when I first started using cake, > I hated using php in my views. I had been using smarty and a few > other templating systems, and I thought they were better. I was > wrong. Adding a templating system adds one more level to debug and > one more level where things can go wrong. PHP works great, cake devs > already know it, and it can be very nice looking if you design your > site properly. > > hydra12 > > On Jan 24, 7:52 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > > > On Jan 24, 2008 5:41 AM, Gary Taylor <[EMAIL PROTECTED]> wrote: > > > > I would love to see this as an addon to cake or even built in. I > > > can't stand using php in my view code (even though I am a php > > > programmer !), I have tried flexy and about to try smarty. > > > PHP itself is a templating language, so I do wonder why people work so > > hard to add another layer of processing and overhead to a PHP-based > > application. If you have designers who can't be bothered to learn a > > little PHP in order to use PHP-based templates, well, I suggest you > > get some new designers who are actually willing to learn something > > new. > > > Templating systems in PHP are a solution looking for a problem. > > > -- > > Chris Hartjes > > Internet Loudmouth > > Motto for 2008: "Moving from herding elephants to handling snakes..." > > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Looking for a cool php debugger(supporting cake)
Hello guys, I am relatively new at cake and more specifically at php. I am more of a desktop programmer than a web programmer. Have programmed on C++, java et al.. when i got into php i found debugging extremely tough(using echo and all that), then i found eclipse PDT extension which helped me debugging the php. Now when i started developing on cake, eclipse seems useless for this frame work and is not able to help me in debugging(it can't load the page when i launch it from debug option from tools). I was wondering what all you are guys are using for debugging. -- Thanks & Regards, Novice (http://ishuonweb.wordpress.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?hl=en -~--~~~~--~~--~--~---
Re: Problem with Delete
MySQL can use alias. if you "SELECT * FROM table as alias" then whenever you reference the table later in the query, you have to use alias.field instead of table.field. It also will return the results as alias instead of table. Perhaps this is not compatible with all database systems, I don't know. Though I did a quick google search and found references to it in SQL Server and Access. Dave On Jan 24, 5:36 am, villas <[EMAIL PROTECTED]> wrote: > @RichardatHome. That's what I figured. But maybe other DBs accept > the 'alias' in the middle? > > @davidgregan. Which DB accepts this format? MySQL? > > DELETE {$alias} FROM table > > FirebirdSQL definitely doesn't like it :-) > > On Jan 24, 10:46 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > > > I don't know firebirdSQL, but every other version of SQL (and this is > > how the SQL92 spec. has it) I've ever used uses the syntax described > > by villas: > > > DELETE FROM table WHERE conditions. > > > On Jan 24, 12:31 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > this is not correct SQL, it should be: > > > DELETE "CURRENCY" FROM "CURRENCIES" AS "CURRENCY" WHERE > > > "CURRENCY"."ID" > > > > so I'm guessing the line in dbo_source.php should be: > > > > return "DELETE {$alias} FROM {$table} {$this->alias} AS {$alias} > > > {$joins} > > > {$conditions}"; > > > > Does this fix the problem as well? If so, you should probably change > > > it to that, as a $conditions array will likely cause it to bomb again > > > without AS {$alias}, since CakePHP will try to use the alias > > > "CURRENCY" on any conditions instead of using the actual table name > > > "CURRENCIES". > > > > On Jan 23, 4:21 pm, villas <[EMAIL PROTECTED]> wrote: > > > > > Cake 1.2 beta WindowsXP FirebirdSQL Code baked > > > > > I notice on deleting a record I get a SQL error > > > > e.g. > > > > DELETE "CURRENCY" FROM "CURRENCIES" "CURRENCY" WHERE > > > > "CURRENCY"."ID" ... > > > > > Is this SQL correct -- why does the second word exist? ("CURRENCY"), > > > > shouldn't it just be Delete From CURRENCIES > > > > > I notice that everything seems to be OK if I edit dbo_source.php and > > > > comment out the first {alias} in this line: > > > > > return "DELETE {$alias} FROM {$table} {$this->alias}{$alias} {$joins} > > > > {$conditions}"; > > > > > ...maybe it's just a FirebirdSQL thing? > > > > > If it's a bug I could report it, but I would appreciate advice > > > > because I am often wrong about these things :-) --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Importing and Executing Raw SQL: Problems with Semicolons
Hi Folks, I'm trying to create a self-install routine for my web app, part of which requires it to create multiple tables with some pre-set content. I use a system similar to that mentioned by Cakebaker, (http:// cakebaker.42dh.com/2007/04/16/writing-an-installer-for-your-cakephp- application/), which, for the most part, works fine. The problem arises when I'm trying to load the SQL data into the database. The tables will load just fine, but there are content rows that contain serialized information. When it comes to executing those lines of code, (using the rawQuery routine, I get an MySQL syntax error. Here's what I'm currently doing: $statements = file_get_contents($fileNameOfSQLDump,'FILE_TEXT'); $db->rawQuery($statements); I'm reasonably sure that the problem comes in on the first line of content that includes a serialized data string. Also, I've used this same SQL data to import through other programs such as PHPMyAdmin, so I know it's not a fundamental problem with the data itself. I've tried using the Sanitize class to escape the text, but that escapes everything, and nothing is executed. Any guidance in this area would be appreciated. Either in alternate methods to load in the SQL data dump, or basic philosophical changes in how I approach this problem. Thanks! Casey --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Capture webcam stream from client and upload it as a flash video to server
What the hell... some one can't spam our great community like this.. i hope some one is taking care of this. Thanks. On 1/24/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Web Cam Sex - Free Adult Web Cams - Webcam Porn - LIVE CHAT WEBCAMS > > http://www.ibestadult.info/1/webcam.html > > Webcam Sex With Webcam Girls From all over the world. Pick your live > sex cam take the web cam girls to a private session and enjoy the show > from the privacy ... > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > > . > Web Cam Sex - Free Adult Web Cams - Webcam Porn - LIVE CHAT WEBCAMS > > http://www.ibestadult.info/1/webcam.html > > Webcam Sex With Webcam Girls From all over the world. Pick your live > sex cam take the web cam girls to a private session and enjoy the show > from the privacy ... > > > > > -- Thanks & Regards, Novice (http://ishuonweb.wordpress.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?hl=en -~--~~~~--~~--~--~---
Re: how to upload file?
At the face of it, every thing looks ok.. it would be great if you dont mind telling us the error messages you are getting. Thanks. On 1/24/08, Rgarg <[EMAIL PROTECTED]> wrote: > > > Hi > > Please help me to upload a file. i am using this > > if (move_uploaded_file($_FILES['filename']['tmp_name'], > $destination_path)) { >$this->Session->setFlash('File is valid, and was successfully > uploaded.'); >$this->redirect('/products/index'); > } else { > $this->Session->setFlash('There\'s issues! Maybe the file is too > big.'); >$this->redirect('/products/index'); > } > > > > -- Thanks & Regards, Novice (http://ishuonweb.wordpress.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?hl=en -~--~~~~--~~--~--~---
auth-component with many email-adresses (cake 1.2)
hi, i already posted this question in the german cakegroup. But i didnt get an answer. In fact there isnt much activity at all in the german group. So maybe someone could help me with that. I am a beginner in cake. I want to use the auth-component in cake1.2. I have a table "users" with the user´s password. But the table "users" doesnt contain a field "username". Instead i have a table "emails". So there is the relation: user <- 1:n -> emails The User should be able to login with his password + one of his emailadresses. How can you do this with the auth-component? Thanks in advance lx --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Don't want to trigger modified field update
I have a small app I'm working on and I'm trying to port it over to cakePHP for easier handling. There is a table that serves pages and I want the modified field to be updated on an edit, but I have a visits field that I increment so I can track the most popular page views and I don't want to update the modified every time the page is selected. Is there a way to tell cake not to update the modified field? TIA --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: help, upgrade from alpha to beta: paginator problem
> tried some stuff but failed What have you tried? Have you tried this? $paginator->prev('<< Page précédente', array('url' => array($annee)), null, array('class' => 'disabled')); On Jan 24, 3:47 pm, Dia <[EMAIL PROTECTED]> wrote: > before, this code worked perfectly : > > $paginator->prev('<< Page précédente', array('url' => $annee), null, > array('class'=>'disabled')) > > now, I have this error message: > array_merge(): Argument #2 is not an array [CORE\cake\libs\view\helpers > \paginator.php, line 306] > > the problem is on 'url' => $annee > tried some stuff but failed > I don't understand on how to solve it... > > thanks in advance --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Capture webcam stream from client and upload it as a flash video to server
Web Cam Sex - Free Adult Web Cams - Webcam Porn - LIVE CHAT WEBCAMS http://www.ibestadult.info/1/webcam.html Webcam Sex With Webcam Girls From all over the world. Pick your live sex cam take the web cam girls to a private session and enjoy the show from the privacy ... . . . . . . . . . . . . . . . . . . Web Cam Sex - Free Adult Web Cams - Webcam Porn - LIVE CHAT WEBCAMS http://www.ibestadult.info/1/webcam.html Webcam Sex With Webcam Girls From all over the world. Pick your live sex cam take the web cam girls to a private session and enjoy the show from the privacy ... --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
help, upgrade from alpha to beta: paginator problem
before, this code worked perfectly : $paginator->prev('<< Page précédente', array('url' => $annee), null, array('class'=>'disabled')) now, I have this error message: array_merge(): Argument #2 is not an array [CORE\cake\libs\view\helpers \paginator.php, line 306] the problem is on 'url' => $annee tried some stuff but failed I don't understand on how to solve it... thanks in advance --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Possible to loop through all flash-messages? (1.2)
Thanks! As so often with cake the answer is so simple that you would never think of trying it :) On Jan 24, 4:16 pm, grigri <[EMAIL PROTECTED]> wrote: > if (is_array($messages = $session->read('Message'))) { > foreach (array_keys($messages) as $key) { > $session->flash($key); > }} > > ?> > > On Jan 24, 3:05 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > In version 1.2 the Session component uses dot-notation when creating > > flash messages. Is there any way to loop through them? > > > I am guessing the answer is somewhere in the Set class but I haven't > > been able to figure out how to do it. > > > A layout snippet: > > > if ($session->check('Message.flash')): > > $session->flash(); > > endif; > > if ($session->check('Message.auth')): > > $session->flash('auth'); > > endif; > > // and so on... > > > I want to be able to flash "all" messages. But when I start making up > > my own keys this part of the layout will start to get ugly. > > > Anyone got the hang of this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: CakePhp and Extjs tree
I was reading the docs for cake 1.2 (http://tempdocs.cakephp.org/) and found out that there is a tree behavior. Maybe this could help with getting the correct data into the correct format. I haven't dug into it yet due to lack of time, but it might be worth looking at. On Jan 24, 8:19 am, Paolo <[EMAIL PROTECTED]> wrote: > Hi! Thanks for your answer, I tried using a function that loads all > the children of the tree and puts them, formatted in a particular way, > in a textbox. I can read that textbox and parse it to add all the > relevant stuff to the db. I'll post a tutorial soon. > > Thanks > > On 23 Gen, 19:39, hydra12 <[EMAIL PROTECTED]> wrote: > > > I haven't tried this yet. You might look here for some basic > > information: > > http://extjs.com/learn/Tutorial:Ext20_Tree_TreeLoader_PHP_MySQL > > > The main problem I see with doing this with cake is getting your data > > in the correct format. I have some other extjs tutorials; maybe I can > > get atreetutorial up sometime. You can find my other stuff > > here:http://www.ntatd.org/mark. Maybe some of it will help, since the > > datagrids do cover outputting data in json format. > > > hydra12 > > > On Jan 22, 8:14 am, Paolo <[EMAIL PROTECTED]> wrote: > > > > Hi all! > > > Hasanyone tried to integrate cake with extjstree? I qould like the > > > used to edit the structure of a menu using extjs drag and drop tools > > > on atree, and then get the values (for ezample, a sequence of root -> > > > node 1, node 2-> node 3 -> node 4 > > > and then update the parent in the db fields. > > > Any idea? > > > thanks --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: An Idea For Ease Of Developing Views
I'll have to agree. I confess that, when I first started using cake, I hated using php in my views. I had been using smarty and a few other templating systems, and I thought they were better. I was wrong. Adding a templating system adds one more level to debug and one more level where things can go wrong. PHP works great, cake devs already know it, and it can be very nice looking if you design your site properly. hydra12 On Jan 24, 7:52 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Jan 24, 2008 5:41 AM, Gary Taylor <[EMAIL PROTECTED]> wrote: > > > > > I would love to see this as an addon to cake or even built in. I > > can't stand using php in my view code (even though I am a php > > programmer !), I have tried flexy and about to try smarty. > > PHP itself is a templating language, so I do wonder why people work so > hard to add another layer of processing and overhead to a PHP-based > application. If you have designers who can't be bothered to learn a > little PHP in order to use PHP-based templates, well, I suggest you > get some new designers who are actually willing to learn something > new. > > Templating systems in PHP are a solution looking for a problem. > > -- > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Possible to loop through all flash-messages? (1.2)
read('Message'))) { foreach (array_keys($messages) as $key) { $session->flash($key); } } ?> On Jan 24, 3:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > In version 1.2 the Session component uses dot-notation when creating > flash messages. Is there any way to loop through them? > > I am guessing the answer is somewhere in the Set class but I haven't > been able to figure out how to do it. > > A layout snippet: > > if ($session->check('Message.flash')): > $session->flash(); > endif; > if ($session->check('Message.auth')): > $session->flash('auth'); > endif; > // and so on... > > I want to be able to flash "all" messages. But when I start making up > my own keys this part of the layout will start to get ugly. > > Anyone got the hang of this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Updating a generateList() to use find("list") - problems with syntax?
Looks like the '{n}' bit is prepended automatically in the find() method, so you don't need it. Why it's not grouping is a different matter... Exactly what SQL is generated without the '{n}' ? And paste a debug() of the resultset too. In fact, temporarily hack your model.php and add this line: $this->log(compact('keyPath,'valuePath','groupPath','results')); just before this line : return Set::combine($this->__filterResults($results, true), $keyPath, $valuePath, $groupPath); (line 1823 in release 6398) And paste the results. On Jan 24, 2:42 pm, RichardAtHome <[EMAIL PROTECTED]> wrote: > Hi again folks, still not having any luck with this. Here's what I > currently have: > > $tags = $this->Output->Tag->find("list", array( > "fields"=>array( > "{n}.Tag.id", > "{n}.Tag.name", > "{n}.TagType.name"), > "order"=>array( > "TagType.name", > "Tag.name ASC" > ), > "recursive"=>0 > )); > > I've tested this in the current Beta and the nightly build and get the > following error: > > Query: SELECT `{n}`.`Tag`, `{n}`.`TagType`, `Tag`.`id` FROM `tags` AS > `Tag` LEFT JOIN `tag_types` AS `TagType` ON (`Tag`.`tag_type_id` = > `TagType`.`id`) WHERE 1 = 1 ORDER BY `TagType`.`name` ASC, > `Tag`.`name` ASC > > Warning (512): SQL Error: 1109: Unknown table '{n}' in field list [CORE > \cake\libs\model\datasources\dbo_source.php, line 440] > > It looks like {n} isn't being parsed correctly? > > Here's the model (in case I've messed up in there): > > var $hasAndBelongsToMany = array( > 'OutputType' => array('className' => 'OutputType', > 'joinTable' => > 'outputs_output_types', > 'foreignKey' => 'output_id', > 'associationForeignKey' => > 'output_type_id', > 'unique' => true, > 'conditions' => '', > 'fields' => '', > 'order' => '', > 'limit' => '', > 'offset' => '', > 'finderQuery' => '', > 'deleteQuery' => '', > 'insertQuery' => '' > ), > 'Tag' => array('className' => 'Tag', > 'joinTable' => 'outputs_tags', > 'foreignKey' => 'output_id', > 'associationForeignKey' => > 'tag_id', > 'unique' => true, > 'conditions' => '', > 'fields' => '', > 'order' => '', > 'limit' => '', > 'offset' => '', > 'finderQuery' => '', > 'deleteQuery' => '', > 'insertQuery' => '' > ), > 'Theme' => array('className' => 'Theme', > 'joinTable' => > 'outputs_themes', > 'foreignKey' => 'output_id', > 'associationForeignKey' => > 'theme_id', > 'unique' => true, > 'conditions' => '', > 'fields' => '', > 'order' => '', > 'limit' => '', > 'offset' => '', > 'finderQuery' => '', > 'deleteQuery' => '', > 'insertQuery' => '' > ) > ); > > If you remove the {n} from the find(), the tags are outputted, but no > option groups are displayed (the tags ARE grouped by category however, > just displayed as one long list) --~--~-~--~~~---~--~~ 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?hl=en -~-
Possible to loop through all flash-messages? (1.2)
In version 1.2 the Session component uses dot-notation when creating flash messages. Is there any way to loop through them? I am guessing the answer is somewhere in the Set class but I haven't been able to figure out how to do it. A layout snippet: if ($session->check('Message.flash')): $session->flash(); endif; if ($session->check('Message.auth')): $session->flash('auth'); endif; // and so on... I want to be able to flash "all" messages. But when I start making up my own keys this part of the layout will start to get ugly. Anyone got the hang of this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: cakephp 1.2 :: Database prefix and tips about sanitize
Thanks. But in custom queries like: $this->query('UPDATE `bm_aros` SET `alias`... We need to use: $this->query('UPDATE ' . $this->database prefix. '`bm_aros` SET `alias`... I dont remember if is databaseprefix or just only prefix. hydra12 escribió: > I could be wrong, but I don't think you have to do anything to use the > database prefix. That's configured in database.php. > > On Jan 19, 1:21 pm, Josoroma <[EMAIL PROTECTED]> wrote: > >> I have an afterSave function inside a model, my two questions are: >> >> #1 How do i use the database prefix? >> >> #2 Do i need to sanitize $data['User']['username'] and $data['User'] >> ['id']? >> >> Thanks in advance. >> >> function afterSave(){ >> >> $data = $this->read(); >> $this->query('UPDATE `bm_aros` SET `alias` = \'' . $data['User'] >> ['username'] . '\' WHERE `model` = \'User\' AND `foreign_key` = ' . >> $data['User']['id']); >> return true; >> >> } >> > > > > -- - José Pablo Orozco Marín [EMAIL PROTECTED] Tel. +506 820-7280 Por favor, visite mi pasión: http://www.SukiaLogic.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?hl=en -~--~~~~--~~--~--~---
Re: css classes for flash messages
Was just showing another supported way to do it ;) Sam D On Jan 24, 2008 7:21 AM, grigri <[EMAIL PROTECTED]> wrote: > > sam d: > > Yeah, flash layouts are handy. But the added overhead of running a > layout and whatnot hardly seems worth it for a one-liner message. If > you were using this in conjunction with the params() to display a > detailed error/warning/whatever message, I'd agree. But for simple > static text, I prefer using the 'key' parameter and using the normal > functionality. > > This is just a personal opinion though; to each his own! > > > On Jan 24, 2:13 pm, grigri <[EMAIL PROTECTED]> wrote: > > //-- > > > > In your controller action: > > > > $this->Session->setFlash('There was an error', null, array(), > > 'error'); > > return; > > > > In your layout: > > > > // If there's an error, display it - if not, display flash message [if > > there is one] > > if (!$session->flash('error')) { > > $session->flash(); > > > > } > > > > In your css > > > > #flashMessage.message { > > color: blue; > > > > } > > > > #errorMessage.message { > > color: red; > > > > } > > > > //-- > > > > If you really want to make things simple you could do this: > > > > class AppController extends Controller { > > function set($one, $two = null) { > > parent::set($one, $two); > > if (isset($this->viewVars['errorMessage'])) { > > $this->Session->setFlash($this->viewVars['error'], null, > > array(), 'error'); > > unset($this->viewVars['errorMessage']); > > } > > } > > > > } > > > > then in any controller just do > > > > $this->set('errorMessage', 'Something went horribly wrong'); return; > > > > (you'll still have to adjust the layout and css as above) > > > > On Jan 24, 12:10 pm, Sebastian <[EMAIL PROTECTED]> wrote: > > > > > Hey, > > > > > it seems like before 1.2 you were able to send errorMessage from the > > > controller to the view by simply setting: > > > > > $this->set('errorMessage', 'There was an error'); > > > > > This message was then automatically rendered with the appropriate css > > > class from cakePHP's default css file at the top of the page like a > > > flash message. > > > > > However, in 1.2 this doesn't work anymore :-( The only way I get to > > > output error messages is by: > > > > > $this->Session->setFlash('There was an error!'); > > > $this->render(); > > > $this->exit(); > > > > > My problem now is, that all these flash messages are rendered with the > > > same css class (same background, same font color), which makes it hard > > > to differentiate between an information and an error flash message. > > > > > Is there any way to bring back the traditional way to output error > > > messages? If not, is there a way to define css classes for a flash > > > message? > > > > > Regards, > > > > > Sebastian > > > -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Updating a generateList() to use find("list") - problems with syntax?
Hi again folks, still not having any luck with this. Here's what I currently have: $tags = $this->Output->Tag->find("list", array( "fields"=>array( "{n}.Tag.id", "{n}.Tag.name", "{n}.TagType.name"), "order"=>array( "TagType.name", "Tag.name ASC" ), "recursive"=>0 )); I've tested this in the current Beta and the nightly build and get the following error: Query: SELECT `{n}`.`Tag`, `{n}`.`TagType`, `Tag`.`id` FROM `tags` AS `Tag` LEFT JOIN `tag_types` AS `TagType` ON (`Tag`.`tag_type_id` = `TagType`.`id`) WHERE 1 = 1 ORDER BY `TagType`.`name` ASC, `Tag`.`name` ASC Warning (512): SQL Error: 1109: Unknown table '{n}' in field list [CORE \cake\libs\model\datasources\dbo_source.php, line 440] It looks like {n} isn't being parsed correctly? Here's the model (in case I've messed up in there): var $hasAndBelongsToMany = array( 'OutputType' => array('className' => 'OutputType', 'joinTable' => 'outputs_output_types', 'foreignKey' => 'output_id', 'associationForeignKey' => 'output_type_id', 'unique' => true, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ), 'Tag' => array('className' => 'Tag', 'joinTable' => 'outputs_tags', 'foreignKey' => 'output_id', 'associationForeignKey' => 'tag_id', 'unique' => true, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ), 'Theme' => array('className' => 'Theme', 'joinTable' => 'outputs_themes', 'foreignKey' => 'output_id', 'associationForeignKey' => 'theme_id', 'unique' => true, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ) ); If you remove the {n} from the find(), the tags are outputted, but no option groups are displayed (the tags ARE grouped by category however, just displayed as one long list) --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: fread errors with 1.2 beta and php 4.3.2
On Jan 24, 2008 9:19 AM, Blackolo <[EMAIL PROTECTED]> wrote: > > have exactly this same each time when it cake try to access > cache :( if anyone know reason ... > Delete all the files in the tmp/cache directory. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: fread errors with 1.2 beta and php 4.3.2
have exactly this same each time when it cake try to access cache :( if anyone know reason ... On Jan 16, 5:31 pm, oceanguy <[EMAIL PROTECTED]> wrote: > My best guess is that it's all the cache files. > > Doing nothing more than copying the cake application files to a fresh > install, I get the standard "change permissions on your app/tmp > directory." After doing so, I get several dozen of these fread/fclose/ > fwrite errors. > > Here's an example...http://new.coolclassroom.org/test/ > > On Jan 16, 3:39 am, AD7six <[EMAIL PROTECTED]> wrote: > > > Confirm what ;). It might be helpful if you indicated what file it was > > trying to read/write --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Inserting secure urls or actions
.htaccess? Do you mean rewriting the URL's? This will not work, because I want the Client to post to https. Or am I missing something? On Jan 24, 1:57 am, francky06l <[EMAIL PROTECTED]> wrote: > You can use .htaccess to force an https connection for the desired > url's. > > On Jan 23, 6:34 pm, vb13 <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > I am struggling with the following (I hope simple) issue in 1.2 > > > I have a login form that has to post via https. I would like to use > > cake controller/action url notation and let the framework generate a > > full https://... URL. > > > I.e. in my template I have code > > > https://www.foo.com/user/login, i.e. cake should > > know to generate full url as https:// and not http://. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: css classes for flash messages
sam d: Yeah, flash layouts are handy. But the added overhead of running a layout and whatnot hardly seems worth it for a one-liner message. If you were using this in conjunction with the params() to display a detailed error/warning/whatever message, I'd agree. But for simple static text, I prefer using the 'key' parameter and using the normal functionality. This is just a personal opinion though; to each his own! On Jan 24, 2:13 pm, grigri <[EMAIL PROTECTED]> wrote: > //-- > > In your controller action: > > $this->Session->setFlash('There was an error', null, array(), > 'error'); > return; > > In your layout: > > // If there's an error, display it - if not, display flash message [if > there is one] > if (!$session->flash('error')) { > $session->flash(); > > } > > In your css > > #flashMessage.message { > color: blue; > > } > > #errorMessage.message { > color: red; > > } > > //-- > > If you really want to make things simple you could do this: > > class AppController extends Controller { > function set($one, $two = null) { > parent::set($one, $two); > if (isset($this->viewVars['errorMessage'])) { > $this->Session->setFlash($this->viewVars['error'], null, > array(), 'error'); > unset($this->viewVars['errorMessage']); > } > } > > } > > then in any controller just do > > $this->set('errorMessage', 'Something went horribly wrong'); return; > > (you'll still have to adjust the layout and css as above) > > On Jan 24, 12:10 pm, Sebastian <[EMAIL PROTECTED]> wrote: > > > Hey, > > > it seems like before 1.2 you were able to send errorMessage from the > > controller to the view by simply setting: > > > $this->set('errorMessage', 'There was an error'); > > > This message was then automatically rendered with the appropriate css > > class from cakePHP's default css file at the top of the page like a > > flash message. > > > However, in 1.2 this doesn't work anymore :-( The only way I get to > > output error messages is by: > > > $this->Session->setFlash('There was an error!'); > > $this->render(); > > $this->exit(); > > > My problem now is, that all these flash messages are rendered with the > > same css class (same background, same font color), which makes it hard > > to differentiate between an information and an error flash message. > > > Is there any way to bring back the traditional way to output error > > messages? If not, is there a way to define css classes for a flash > > message? > > > Regards, > > > Sebastian --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: CakePhp and Extjs tree
Hi! Thanks for your answer, I tried using a function that loads all the children of the tree and puts them, formatted in a particular way, in a textbox. I can read that textbox and parse it to add all the relevant stuff to the db. I'll post a tutorial soon. Thanks On 23 Gen, 19:39, hydra12 <[EMAIL PROTECTED]> wrote: > I haven't tried this yet. You might look here for some basic > information: http://extjs.com/learn/Tutorial:Ext20_Tree_TreeLoader_PHP_MySQL > > The main problem I see with doing this with cake is getting your data > in the correct format. I have some other extjs tutorials; maybe I can > get atreetutorial up sometime. You can find my other stuff > here:http://www.ntatd.org/mark. Maybe some of it will help, since the > datagrids do cover outputting data in json format. > > hydra12 > > On Jan 22, 8:14 am, Paolo <[EMAIL PROTECTED]> wrote: > > > Hi all! > > Hasanyone tried to integrate cake with extjstree? I qould like the > > used to edit the structure of a menu using extjs drag and drop tools > > on atree, and then get the values (for ezample, a sequence of root -> > > node 1, node 2-> node 3 -> node 4 > > and then update the parent in the db fields. > > Any idea? > > thanks --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: css classes for flash messages
//-- In your controller action: $this->Session->setFlash('There was an error', null, array(), 'error'); return; In your layout: // If there's an error, display it - if not, display flash message [if there is one] if (!$session->flash('error')) { $session->flash(); } In your css #flashMessage.message { color: blue; } #errorMessage.message { color: red; } //-- If you really want to make things simple you could do this: class AppController extends Controller { function set($one, $two = null) { parent::set($one, $two); if (isset($this->viewVars['errorMessage'])) { $this->Session->setFlash($this->viewVars['error'], null, array(), 'error'); unset($this->viewVars['errorMessage']); } } } then in any controller just do $this->set('errorMessage', 'Something went horribly wrong'); return; (you'll still have to adjust the layout and css as above) On Jan 24, 12:10 pm, Sebastian <[EMAIL PROTECTED]> wrote: > Hey, > > it seems like before 1.2 you were able to send errorMessage from the > controller to the view by simply setting: > > $this->set('errorMessage', 'There was an error'); > > This message was then automatically rendered with the appropriate css > class from cakePHP's default css file at the top of the page like a > flash message. > > However, in 1.2 this doesn't work anymore :-( The only way I get to > output error messages is by: > > $this->Session->setFlash('There was an error!'); > $this->render(); > $this->exit(); > > My problem now is, that all these flash messages are rendered with the > same css class (same background, same font color), which makes it hard > to differentiate between an information and an error flash message. > > Is there any way to bring back the traditional way to output error > messages? If not, is there a way to define css classes for a flash > message? > > Regards, > > Sebastian --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---