Advanced Installation
Hi guys, I know I'm probably being really really thick, but I can't get my head around something. I've been using Cake for months now - on my own site, and also for sites at work. All the sites at work are set up as just standard installations, with the files unpacked inside htdocs. They work fine, no problems at all. My personal site is installed slightly differently, with htdocs being alongside the other folders (I originally followed the advanced installation tutorials on the Wiki, and wanted to keep the application files out of public access). Now though, I want to move things around. I've recently added a couple of extra domains to my server, so I've done some reorganisation to make them all easier to manage. That's fine, except Cake breaks. This is how I've got it set up at the minute, below that is how I want it to be. NOW: / /app /cake /htdocs /vendors /site_a ---/htdocs /site_b ---/htdocs FUTURE / /site_a/ ---/app ---/cake ---/htdocs ---/vendors /site_b/ ---/app ---/cake ---/htdocs ---/vendors /site_c/ ---/app ---/cake ---/htdocs ---/vendors As you can see I'm intending on using Cake for all the sites. I'll probably at some point want to share the Cake files but I decided to keep them separate for now. What I get at the moment when I attempt to set up Cake in this structure is a whole load of Page Not Found errors. I'm guessing the .htaccess files are redirecting to the wrong places, but I've checked them and I'm not seeing the problem. I've also tried changing the index.php in htdocs (which SHOULD be the one that's getting called, and indeed from my tests it does seem to be). All I get in that case is errors about not being able to find config/core.php, or cake/bootstrap.php. I suspect I may not be changing the paths correctly, or making my changes to the wrong file, because everything I've done seems to be ok. Perhaps it's how my host is handling the redirections internally. Any advice is appreciated! --~--~-~--~~~---~--~~ 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: Auto Complete
2007/5/11, afindie [EMAIL PROTECTED]: var $helpers = array('Html', 'Javascript', 'Ajax'); these are standard helpers, which reside in /cake/cake Take a look also here: http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/ and http://bakery.cakephp.org/articles/view/autocomplete#comment-907 and reading the manual again and again also helps ;) Siegfried -- Siegfried Hirsch hhS - Welserstr. 1 - 81373 München - (089) 5484 3564 - skype:shirsch http://gadgetgui.de / http://www.rss-blogger.de http://www.newsbee.de NewsBee 2 - customized RSS solutions --~--~-~--~~~---~--~~ 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: Reverse Engineer to UML?
mysql workbench (used to be dbdesigner 4) is (afaik) still alpha but can already do this. However, it doesn't know about cakes conventions about key naming, so unless you explicity specify foreign keys in your sql ddl it won't create the associations. http://www.mysql.com/products/tools/workbench/ On May 11, 3:02 am, Tobias Parent [EMAIL PROTECTED] wrote: Hey, all - I've got a Cake app I wrote a while back, and now the client has asked for a UML diagram, to present to their new in-house IT guy. I, however, never generated UML diagrams on it back then, and I need to reverse-engineer one now (I've forgotten some of what I did for them, as I haven't worked on that app in a good long while). Any ideas or suggestions for a quick way of automagically doing something like this? Thanks! -Toby --~--~-~--~~~---~--~~ 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: Reverse Engineer to UML?
On 5/11/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: unless you explicity specify foreign keys in your sql ddl it won't create the associations. http://www.mysql.com/products/tools/workbench/ This is only for the Database - I think Toby also wants it for the classes phpEdit can do the reverse for some years now that is UML to PHP and there were talks about PHP to UML as well... check out http://waterproof.fr (or google if I got the url wrong :) ) Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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: Need help for pushing CakePHP for a high traffic project
Are you using full view cache? U have 12 js, use http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files On May 11, 12:07 am, PD [EMAIL PROTECTED] wrote: Hi Nate, I am a fan of cake and have used it in the following production site that I build last december.www.lowimpactliving.com I am pushing for cake to be used in one very large project which is going to be extremely high traffic. Probably around 50,000 hits at a time. I need some more information regarding the scaling and performance to present my case to the board. Could you also let me know some sample sites that are high traffic? Because the Board likes to see real numbers and real sites. This is a great chance for our community to be proudly involved. Could you please help me out here? Thank you. Regards, Pranav --~--~-~--~~~---~--~~ 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: Advanced Installation
It's ok guys, I was being stupid. Fixed it now, I just needed to pay more attention to the error output PHP was giving me - it was looking in entirely the wrong folders for my config files! On May 11, 7:33 am, MrTufty [EMAIL PROTECTED] wrote: Hi guys, I know I'm probably being really really thick, but I can't get my head around something. I've been using Cake for months now - on my own site, and also for sites at work. All the sites at work are set up as just standard installations, with the files unpacked inside htdocs. They work fine, no problems at all. My personal site is installed slightly differently, with htdocs being alongside the other folders (I originally followed the advanced installation tutorials on the Wiki, and wanted to keep the application files out of public access). Now though, I want to move things around. I've recently added a couple of extra domains to my server, so I've done some reorganisation to make them all easier to manage. That's fine, except Cake breaks. This is how I've got it set up at the minute, below that is how I want it to be. NOW: / /app /cake /htdocs /vendors /site_a ---/htdocs /site_b ---/htdocs FUTURE / /site_a/ ---/app ---/cake ---/htdocs ---/vendors /site_b/ ---/app ---/cake ---/htdocs ---/vendors /site_c/ ---/app ---/cake ---/htdocs ---/vendors As you can see I'm intending on using Cake for all the sites. I'll probably at some point want to share the Cake files but I decided to keep them separate for now. What I get at the moment when I attempt to set up Cake in this structure is a whole load of Page Not Found errors. I'm guessing the .htaccess files are redirecting to the wrong places, but I've checked them and I'm not seeing the problem. I've also tried changing the index.php in htdocs (which SHOULD be the one that's getting called, and indeed from my tests it does seem to be). All I get in that case is errors about not being able to find config/core.php, or cake/bootstrap.php. I suspect I may not be changing the paths correctly, or making my changes to the wrong file, because everything I've done seems to be ok. Perhaps it's how my host is handling the redirections internally. Any advice is appreciated! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
blog tutorial adding post and redirect to the new post id
I am doing the blog tutorial and I want that after the post is saved the page redirects not to the posts index but to the new post added view, so I should change '/posts' with 'posts/view/id' but how can I pass the id of the new post just saved? function add() { if (!empty($this-data)) { if ($this-Post-save($this-data)) { $this-flash('Your post has been saved.','/posts'); } } } --~--~-~--~~~---~--~~ 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: blog tutorial adding post and redirect to the new post id
On 5/11/07, Tonyz [EMAIL PROTECTED] wrote: pass the id of the new post just saved? function add() { if (!empty($this-data)) { if ($this-Post-save($this-data)) { $this-flash('Your post has been saved.','/posts'); Try$this-flash('Your post has been saved.','/posts/view/'.$this-Post-id); T -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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: Reverse Engineer to UML?
Take the UML editor of your choice, add for every model a class, and last but not least add the relations between those models. And you have your UML diagram. HTH -- Daniel Hofstetter http://cakebaker.42dh.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 -~--~~~~--~~--~--~---
? how to join models other than through id ?
hey everybody. i am kind of lost, with how cake wants me to deal with my problem. may be anybody here has some hints or suggestions for me? i want to associate two models through a different field than 'id'. i also want to have this relationship defined in the model itself, of course. the easiest way to describe the relationship would be like this: belongsTo/hasMany: modelA.modelB_field = modelB.field. where modelA belongsTo many modelB and modelB also has many modelA. but i dont think an extra join table is necassary but a simple join query would be enough in sql. thanx for the brainpower. \n --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ? how to join models other than through id ?
On 5/11/07, kzm [EMAIL PROTECTED] wrote: i want to associate two models through a different field than 'id'. i also want to have this relationship defined in the model itself, of course. #foreignKey: the name of the foreign key that points to the associated model. This is here in case you're working with a database that doesn't follow Cake's naming conventions. The above is a quote from somewhere very obvious - Figure out the obvious place and you will get the answer :) Cheers Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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 join models other than through id ?
On 11 mayo, 13:13, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On 5/11/07, kzm [EMAIL PROTECTED] wrote: i want to associate two models through a different field than 'id'. i also want to have this relationship defined in the model itself, of course. #foreignKey: the name of the foreign key that points to the associated model. This is here in case you're working with a database that doesn't follow Cake's naming conventions. /me awaits the revelation that modelB.field isn't a primary key :D --~--~-~--~~~---~--~~ 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: Reverse Engineer to UML?
Tarique, what can I say? I prostrate myself at your feet. Well worth looking into. Thanks!! -Toby Dr. Tarique Sani wrote: On 5/11/07, Tobias Parent [EMAIL PROTECTED] wrote: Any ideas or suggestions for a quick way of automagically doing something like this? http://tech.motion-twin.com/php_php2xmi.html found this as the 5th link at http://www.google.com/search?q=convert+php+to+UML Guess will do the job HTH Tarique --~--~-~--~~~---~--~~ 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: Reverse Engineer to UML?
On 5/11/07, Tobias Parent [EMAIL PROTECTED] wrote: Any ideas or suggestions for a quick way of automagically doing something like this? http://tech.motion-twin.com/php_php2xmi.html found this as the 5th link at http://www.google.com/search?q=convert+php+to+UML Guess will do the job HTH Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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: Reverse Engineer to UML?
Yeah, I get how to make a UML diagram, and I know it's easy - but we're talking a massive number of tables in MySQL, and multiple public/private functions in my controllers. I was actually thinking it'd be trivial to create a meta-app that'd scan my app folder and generate, much like bake.php does, an XML file that I can import into Visio (for example), to automake a UML class diagram. One including the model and controller data. I appreciate the suggestions, but time draws short, so I guess I'll be hand-writing the silly thing. Visio won't even recognize my MySQL connection... ech. Regards! -Toby Daniel Hofstetter wrote: Take the UML editor of your choice, add for every model a class, and last but not least add the relations between those models. And you have your UML diagram. --~--~-~--~~~---~--~~ 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: cPanel folder structure issue with .htaccess solution
your .htacces file must be this : RewriteRule^$ /test/app/webroot/[L] RewriteRule(.*) /test/app/webroot/$1 [L] On May 11, 5:38 am, laptop [EMAIL PROTECTED] wrote: hi all, was just struggling to figure out how to do this in a shared environment with cPanel. subdomain files are placed inside a directory inside where the www domain files are located this means that the subdomain test.example.com will be availablewww.example.com/test placing a .htaccess file for cake to work meant that it applied to test.example.com and i was getting server errors. following is a code snipped which allows you to restrict to just that database RewriteCond %{HTTP_HOST} ^www\.novanate\.com$ RewriteRule^$ app/webroot/[L] RewriteCond %{HTTP_HOST} ^www\.novanate\.com$ RewriteRule(.*) app/webroot/$1 [L] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Ever heard of tags.ini.php ?
Read it many times on many websites, if you want to make some changes in the Helpers' tags, just copy /cake/config/tags.ini.php to /app/ config and adapt it to your needs. Now my problem is simple : I've never found this /cake/config/ tags.ini.php in neither 1.1 or 1.2 freshly downloaded archives. Besides, if I create my own /app/config/tags.ini.php it doesn't seem to affect my Helpers at all :( Any clue, someone ? --~--~-~--~~~---~--~~ 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: advantages of production setup?
I think the most obvious advantage is that your non-view files aren't sitting in your publicly accessible webroot with the prod setup On May 10, 8:21 pm, laptop [EMAIL PROTECTED] wrote: hi all, what are the advantages of a production setup?? is it ok to just leave it in development mode?? craig --~--~-~--~~~---~--~~ 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: advantages of production setup?
Another benefit is when you are running more than 1 cake powered site on your server - it means you can have all your cake app's pointing to the same copy of the core CakePHP files. This means you don't have to change it on each application. Tane On 5/11/07, Sliv [EMAIL PROTECTED] wrote: I think the most obvious advantage is that your non-view files aren't sitting in your publicly accessible webroot with the prod setup On May 10, 8:21 pm, laptop [EMAIL PROTECTED] wrote: hi all, what are the advantages of a production setup?? is it ok to just leave it in development mode?? craig --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Passing Arguments To A Controller Action For Data-Based Permissions
This is my thought on how to use ACL when needing permissions for existing controller actions to be based on specific data elements: -Add more controller actions (i.e. index2, index3, etc.) -set ACL's on those -call the main controller action (index), passing it an argument -check for the argument in the main controller action and get specific data from the model Explanation: ARO, Controller-Action, Perms: Group1, Node-Index, All-Allow Group1, Node-Index2, All-Allow Group1, Node-Index3, All-Allow Group2, Node-Index, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group2, Node-Index2, Add-Allow, Edit-Allow, View-Allow, Index- Allow Group2, Node-Index3, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group3, Node-Index, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group3, Node-Index2, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group3, Node-Index3, Add-Allow, Edit-Allow, View-Allow, Index- Allow Node Controller: function index($i = null) { if(!empty($i)){ // index code } else { switch($i) { case 2: // ask model for data with conditions to return only records related to Area 2 break; case 3: // ask model for data with conditions to return only records related to Area 3 break; } } } function index2() { $this-index(2); } function index3() { $this-index(3); } --- Of course this means hard-coding conditions for the queries...but I don't see another way without modifying the database itself and attempting to set up some database-level permissions, or some other type of approach I just wondered if anyone was working with the same type of requirements in one of their projects that might have a better approach, or some words of advice regarding the approach I've outlined here... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Diskussion zu cake-apps-sites-in-the-wild
here´s another site developed with cake: http://riotcompany.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: Passing Arguments To A Controller Action For Data-Based Permissions
By the way, I left out the code for checking the ACL's, rendering views, etc., so please assume that ACL checking and all that other stuff is implied :P On May 11, 9:26 am, Sliv [EMAIL PROTECTED] wrote: This is my thought on how to use ACL when needing permissions for existing controller actions to be based on specific data elements: -Add more controller actions (i.e. index2, index3, etc.) -set ACL's on those -call the main controller action (index), passing it an argument -check for the argument in the main controller action and get specific data from the model Explanation: ARO, Controller-Action, Perms: Group1, Node-Index, All-Allow Group1, Node-Index2, All-Allow Group1, Node-Index3, All-Allow Group2, Node-Index, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group2, Node-Index2, Add-Allow, Edit-Allow, View-Allow, Index-Allow Group2, Node-Index3, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group3, Node-Index, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group3, Node-Index2, Add-Deny, Edit-Deny, View-Allow, Index-Allow Group3, Node-Index3, Add-Allow, Edit-Allow, View-Allow, Index- Allow Node Controller: function index($i = null) { if(!empty($i)){ // index code } else { switch($i) { case 2: // ask model for data with conditions to return only records related to Area 2 break; case 3: // ask model for data with conditions to return only records related to Area 3 break; } } } function index2() { $this-index(2); } function index3() { $this-index(3); } --- Of course this means hard-coding conditions for the queries...but I don't see another way without modifying the database itself and attempting to set up some database-level permissions, or some other type of approach I just wondered if anyone was working with the same type of requirements in one of their projects that might have a better approach, or some words of advice regarding the approach I've outlined here... --~--~-~--~~~---~--~~ 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: Multiple views inside one Layout
In my opinion, a view is the visible mode of one controller... Showing more controllers in one page is responsability to layout, isn't it? Like, if I need to change the layout (what's going to appear and where in the page), I want to edit only the layout and none of views... That's because I want (and I need) to allow the web-art-designer not touching any web-programming file. But, anyway, thanks for the help. Mauro On May 9, 8:38 am, AD7six [EMAIL PROTECTED] wrote: On 7 mayo, 22:06, MauroEC04 [EMAIL PROTECTED] wrote: Hello people! Well. I'm programming a extreme-large portal and using Cake. I need to include several (about 6 to 8) views in a layout (including the 1st page). I can't just use the requestAction() method in the view classes, it would be very complicated... Why not? See the info on the use of requestAction and elements listed here:http://groups.google.com/group/cake-php/web/frequent-discussions hth, AD --~--~-~--~~~---~--~~ 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 join models other than through id ?
/me awaits the revelation that modelB.field isn't a primary key true. i tried to point out, that modelB.field is not primary or unique. its a value many modelB can share. so its not a n2m relationship but a m2m. modelA has many modelB and vice versa. their relationship is defined through the value of the field in modelB, which lots of modelB can share. i think in sql i would give an inner join a try but i try to avoid writing my query and try to generalize the relationship in the models itself, trying to use cake's infrastructure. \n --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
class object in sessions
When I will store the class object in session works only in the same method like: can not read the object from other methods in the same controller. function index() { $this - Session - write('construct',new TextConstruct($this-params['data']['Email']['body']) ); $this-set('WordsAsStyle', $this-Session-read('construct')-grabWordsAs('Style')); } when I will go to other method blows up function style() { $this-set('WordsAsStyle',$this-Session-read('construct')-grabWordsAs('Style')); } Fatal error EmailController::style() [lt;a href='function.EmailController-style'gt;function.EmailController-stylelt;/agt;]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition amp;quot;TextConstructamp;quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in in code.php I was trying with all types define('CAKE_SESSION_SAVE', ''); cake, php, database, and '', for all this option got the same error Thanks for help --~--~-~--~~~---~--~~ 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: error handling style
On 5/10/07, Greg Cerveny [EMAIL PROTECTED] wrote: Definitely helps. Generally speaking though, do you could an else statement in regardless if it doesn't need the view or message setting just for styles sake? I always put in an else as the saving could fail (and as we all know, anything that can fail, will, as Murphy would say). At least it should store the message in a log somewhere. If you really don't care if the saving fails, then I guess you can omit the else. Regards, Gonzalo. --~--~-~--~~~---~--~~ 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 join models other than through id ?
On 5/11/07, kzm [EMAIL PROTECTED] wrote: /me awaits the revelation that modelB.field isn't a primary key true. i tried to point out, that modelB.field is not primary or Tarique bows his head to Andy's insight into _ -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Tag model: Counting more than one model type
Hey folks, I've got a little dilemma. Using the tagging code from the bakery, I have implemented a tag cloud that fits in with my code, so far so good - but it only does a count on tags that are associated with my Post model as per below: function tagcloud() { return $this-query(SELECT `Tag`.`id`, `Tag`.`tag`, COUNT(posts_tags.post_id) as count FROM `posts_tags` JOIN `tags` as `Tag` ON `posts_tags`.`tag_id` = `Tag`.`id` JOIN `posts` as `Post` ON `posts_tags`.`post_id` = `Post`.`id` WHERE `Post`.`published` = '1' GROUP BY(tag_id) ORDER BY RAND(),`Tag`.`tag` ASC, `Post`.`id` DESC LIMIT 30); } What I would like to do is in the same query, it to also count tags associated with other model types that I tag such as Page, Image, Event, etc. I'm not an expert with MySQL and this is pretty much as far as my knowledge extends. I've had a look on google, but cannot seem to find anything that allows me to do a count with multiple joins. Can anyone please help? Tane --~--~-~--~~~---~--~~ 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: invalidate() - can you set a message?
Right on. Well, this is an app I'm just tinkering, hacking and learning on, so I think I'll build out some other features, and come back to the robust error handling as 1.2 gets built out. Thanks for the info. 2007/5/10, Dr. Tarique Sani [EMAIL PROTECTED]: On 5/11/07, Greg Cerveny [EMAIL PROTECTED] wrote: I've been toying with invalidate to do custom error handling for a password change form and I've run into some confusion. One example in which I'm calling invalidate is... Switch over to version 1.2 if the app is not already live and mission critical. All your wishes will come true :) Not only will you be able to set custom error message with invalidate but you can do away with the $html-tagErrorMsg() thing. It is all automagically managed for you. Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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: error handling style
Right on. Thanks for the input. Style is one of the hardest thing to pickup when coding alone. 2007/5/11, Gonzalo Servat [EMAIL PROTECTED]: On 5/10/07, Greg Cerveny [EMAIL PROTECTED] wrote: Definitely helps. Generally speaking though, do you could an else statement in regardless if it doesn't need the view or message setting just for styles sake? I always put in an else as the saving could fail (and as we all know, anything that can fail, will, as Murphy would say). At least it should store the message in a log somewhere. If you really don't care if the saving fails, then I guess you can omit the else. Regards, Gonzalo. --~--~-~--~~~---~--~~ 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 can I do install xinha to CAKEphp
It's fairly straightforward. Just put the Javascript files (the entire Xinha folder) into the Javascript (js) directory. Link the related Javascript code in your layout file (or at least on those pages which you want the editor function). Finally get the ID names of the fields that you want to Xinha-enable. Add these names to the configuration file for Xinha. Is this clear enough? On May 10, 5:05 pm, tekcorap [EMAIL PROTECTED] wrote: dear masters, I want use xinha text editor in my all textarea. How can install xinha web editor in my project? thanks your helps. tek. --~--~-~--~~~---~--~~ 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 join models other than through id ?
this is somehow the same: http://groups.google.com/group/cake-php/browse_thread/thread/c27ccc93a4a8f1d2 i dont know if anybody ever found a solution on this? (besides rewriting) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cast your vote for CakePHP!
It has been posted already, but lately CI has been catching up. Go ahead and show your love for CakePHP: http://www.php-mag.net/magphpde/magphpde_news/psecom,id,27201,nodeid,5.html -MI --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Suppressing the label in form-select
I'm using 1.2, and I'm trying to suppress labels in my select tag. In my view, I have: echo $form-select('User/organization_id', $orglist, null, array('label' = false), null); but it doesn't work. What's the proper way to do 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: Suppressing the label in form-select
?? FormHelper::select() doesn't issue a label tag, just the select tag. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de nile Enviado el: Viernes, 11 de Mayo de 2007 03:10 p.m. Para: Cake PHP Asunto: Suppressing the label in form-select I'm using 1.2, and I'm trying to suppress labels in my select tag. --~--~-~--~~~---~--~~ 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: Suppressing the label in form-select
Yes, you're right. I found where the label was coming from . . . Thanks! On May 11, 2:19 pm, Mariano Iglesias [EMAIL PROTECTED] wrote: ?? FormHelper::select() doesn't issue a label tag, just the select tag. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog:http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de nile Enviado el: Viernes, 11 de Mayo de 2007 03:10 p.m. Para: Cake PHP Asunto: Suppressing the label in form-select I'm using 1.2, and I'm trying to suppress labels in my select tag. --~--~-~--~~~---~--~~ 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: Cast your vote for CakePHP!
You are grumpy today. Polls are probably the best way of telling what the general sense in the developer community is. Naturally it depends on the poll, its audience, and how easy it is to hack it, but anyway, you get the idea... Still, you are grumpy. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Chris Hartjes Enviado el: Viernes, 11 de Mayo de 2007 03:17 p.m. Para: cake-php@googlegroups.com Asunto: Re: Cast your vote for CakePHP! Maybe I'm just grumpy today, but what is the point of these popularity contests? Who are we actually serving by endlessly voting in polls about what PHP framework is the best? --~--~-~--~~~---~--~~ 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: Cast your vote for CakePHP!
On 5/11/07, Mariano Iglesias [EMAIL PROTECTED] wrote: You are grumpy today. Polls are probably the best way of telling what the general sense in the developer community is. Naturally it depends on the poll, its audience, and how easy it is to hack it, but anyway, you get the idea... Still, you are grumpy. I've never seen Chris in a terribly good mood so it's hard to tell when he is grumpy and when he is not ;-) - Gonzalo --~--~-~--~~~---~--~~ 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: Cast your vote for CakePHP!
On May 11, 2007, at 12:16 PM, Chris Hartjes wrote: On 5/11/07, Mariano Iglesias [EMAIL PROTECTED] wrote: Go ahead and show your love for CakePHP: Maybe I'm just grumpy today, but what is the point of these popularity contests? Who are we actually serving by endlessly voting in polls about what PHP framework is the best? If someone chooses CakePHP because it is the most popular choice on some poll on a web site, well, I have to be honest when I say I doubt their abilities to make any sort of decision. It has nothing to do with frameworks and everything to do with community. Sure, the code itself rocks - but these polls are a fun way to see how awesome the community response is. If you don't want to participate, that's fine. I don't think it's a license to rain on the parade, though. I chose CakePHP because it reflected a lot of what went into Ruby on Rails. Yep. I continue to choose CakePHP because of the awesome people associate with everyday. To me, the active community is a big part of the CakePHP Advantage®. -- 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: Cast your vote for CakePHP!
On 5/11/07, Gonzalo Servat [EMAIL PROTECTED] wrote: On 5/11/07, Mariano Iglesias [EMAIL PROTECTED] wrote: You are grumpy today. Polls are probably the best way of telling what the general sense in the developer community is. Naturally it depends on the poll, its audience, and how easy it is to hack it, but anyway, you get the idea... Still, you are grumpy. I've never seen Chris in a terribly good mood so it's hard to tell when he is grumpy and when he is not ;-) - Gonzalo Bah! All I want is for you no-good kids to get off my lawn! -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark - http://www.littlehart.net/attheballpark @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: Cast your vote for CakePHP!
On 5/11/07, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: It has nothing to do with frameworks and everything to do with community. Sure, the code itself rocks - but these polls are a fun way to see how awesome the community response is. If you don't want to participate, that's fine. I don't think it's a license to rain on the parade, though. I wasn't aware I needed a license to rain on this parade. I should check local bylaws. :) John, you do have a point in that it shows community response, but I wouldn't take too much stock in the results. After all, you could just as easily say all those people voting for CakePHP are fanboys so you should take the results with a grain of salt. I stick by my statement about people's decision making skills, though. I'm a battle-scarred veteran of other people's poorly-thought-out decisions, often made based on how high on google the home page was ranked. The CakePHP community is a good one, and I'm starting to think that the real problem is a lack of organized, relevant documentation. John, send me an email telling me what you're doing on the documentation front because I have some ideas based on yet another read of my (name dropping here) friend Amy Hoy's article about 'Help Vampires' http://slash7.com/pages/ -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark - http://www.littlehart.net/attheballpark @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: Cast your vote for CakePHP!
On 5/11/07, Gonzalo Servat [EMAIL PROTECTED] wrote: On 5/11/07, Mariano Iglesias [EMAIL PROTECTED] wrote: You are grumpy today. Polls are probably the best way of telling what the general sense in the developer community is. Naturally it depends on the poll, its audience, and how easy it is to hack it, but anyway, you get the idea... Still, you are grumpy. I've never seen Chris in a terribly good mood so it's hard to tell when he is grumpy and when he is not ;-) I am the grumpy one pt -- (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/ --~--~-~--~~~---~--~~ 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: Cast your vote for CakePHP!
On May 11, 2007, at 1:42 PM, Chris Hartjes wrote: On 5/11/07, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: It has nothing to do with frameworks and everything to do with community. Sure, the code itself rocks - but these polls are a fun way to see how awesome the community response is. If you don't want to participate, that's fine. I don't think it's a license to rain on the parade, though. I wasn't aware I needed a license to rain on this parade. I should check local bylaws. :) Yeah I think it's illegal to have those kids on your lawn too. :) John, you do have a point in that it shows community response, but I wouldn't take too much stock in the results. After all, you could just as easily say all those people voting for CakePHP are fanboys so you should take the results with a grain of salt. This has nothing to do with results, and everything about having a good time and joking around. Sometimes we do things for fun, not results. Besides, the metric I'm using is from a community perspective, not from an outsider's view. I don't really care if polls bring new users (though its a nice side effect) - but a poll being rocked every month or so is a nice way to keep a pulse on who's active and how much they like us. I stick by my statement about people's decision making skills, though. I'm a battle-scarred veteran of other people's poorly-thought-out decisions, often made based on how high on google the home page was ranked. Well I don't think we're garnering support for vaporware here. SEOmoz doesn't seem to think so, anyway. Again, this isn't about bringing people in. The CakePHP community is a good one, and I'm starting to think that the real problem is a lack of organized, relevant documentation. Before we move forward, I'd like to look back. First, I need to get a handle on the specifics that allow you to make that conclusion (on another thread, preferably). Once we fix what we've got, we'll worry about new ideas. -- 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: Cast your vote for CakePHP!
On May 11, 2007, at 1:56 PM, Samuel DeVore wrote: On 5/11/07, Gonzalo Servat [EMAIL PROTECTED] wrote: On 5/11/07, Mariano Iglesias [EMAIL PROTECTED] wrote: You are grumpy today. Polls are probably the best way of telling what the general sense in the developer community is. Naturally it depends on the poll, its audience, and how easy it is to hack it, but anyway, you get the idea... Still, you are grumpy. I've never seen Chris in a terribly good mood so it's hard to tell when he is grumpy and when he is not ;-) I am the grumpy one pt Which CakePHP veteran is grumpier? [ ] - Sam DeVore [ ] - Chris Hartjes [Vote] ;o) -- 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: Cast your vote for CakePHP!
On 5/11/07, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: The CakePHP community is a good one, and I'm starting to think that the real problem is a lack of organized, relevant documentation. Before we move forward, I'd like to look back. First, I need to get a handle on the specifics that allow you to make that conclusion (on another thread, preferably). Once we fix what we've got, we'll worry about new ideas. Okay, I'll be very brief: right now we point people at the manual, the Bakery or to search the google archives for the group. I think we need a Cake Resources page we can direct people to that will stop us from pointing at specific things. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark - http://www.littlehart.net/attheballpark @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: Cast your vote for CakePHP!
On 5/11/07, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: Which CakePHP veteran is grumpier? [ ] - Sam DeVore [ ] - Chris Hartjes [Vote] HAHAHAH! Vote for Sam. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark - http://www.littlehart.net/attheballpark @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: Cast your vote for CakePHP!
On 5/11/07, Chris Hartjes [EMAIL PROTECTED] wrote: On 5/11/07, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: Which CakePHP veteran is grumpier? [ ] - Sam DeVore [ ] - Chris Hartjes [Vote] HAHAHAH! Vote for Sam. Vote for Chris ;) My moto for 2007 2nd quarter: Shut up and build it, damnit! -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard -- (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/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
(In-site) search with CakePHP -- where to start?
Hi all, I'm preparing including an in-site search feature in my CakePHP-based webapplication. Given the fact that in-site search on most websites sucks bigtime and the fact that using Google for this is not an option (I want full control and there is no budget), I figure I will really have to invest considerable time studying this topic. I'm wondering if anyone can give me some good starting points, like articles or components. Thanks in advance, Tim --~--~-~--~~~---~--~~ 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: Cast your vote for CakePHP!
Chris on Mondays, Wednesdays and Fridays Sam on Tuesdays, Thursdays, and Saturdays Nate on Sundays -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Chris Hartjes Enviado el: Viernes, 11 de Mayo de 2007 05:04 p.m. Para: cake-php@googlegroups.com Asunto: Re: Cast your vote for CakePHP! HAHAHAH! Vote for 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: Suppressing the label in form-select
Where was it coming from so others know... On May 11, 11:27 am, nile [EMAIL PROTECTED] wrote: Yes, you're right. I found where the label was coming from . . . Thanks! On May 11, 2:19 pm, Mariano Iglesias [EMAIL PROTECTED] wrote: ?? FormHelper::select() doesn't issue a label tag, just the select tag. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog:http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de nile Enviado el: Viernes, 11 de Mayo de 2007 03:10 p.m. Para: Cake PHP Asunto: Suppressing the label in form-select I'm using 1.2, and I'm trying to suppress labels in my select tag. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
HABTM...limiting results
Hi All, I've been reading the posts and playing around with HABTM. I thought I was close, but I'm noticing that I'm using a lot of hack code to accomplish something I think should be easier. Just thought I'd check here before I make a mess of my whole app. I've got 3 main tables: conditions, remedies and ratings. There is also an 'association' table, conditions_remedies which just holds two fields (condition_id, remedy_id) to link the conditions remedies. My models are currently setup up as follows: condition 'hasAndBelongsToMany' remedy remedy 'hasAndBelongsToMany' condition rating 'belongsTo' remedy remedy 'hasMany' rating When users are browsing remedies, they get a list of the associated conditions. When they select a condition, I pass the condition id in the url... like /mysite/remedy/view/1?condition=2. That way, I can list all of the ratings that have remedy_id = 1 and condition_id = 2. In my ratings controller, I have a listbyRemedy function that calls: $this-set('rating', $this-Rating-findAll($criteria, null, 'Rating.created DESC', $limit, $page, 3)); So, I'm getting the proper info in $rating, but when I look at $remedy, I am getting results for EVERY row in conditions_remedies that matches the condition_id, when I really just want the single row that matches the condition_id AND remedy_id. Getting so many conditions back is also causing it to select all ratings for those conditions regardless of the remedy. I hope this makes sense to someone. Any help would be greatly appreciated. There is a post here that is almost identical to what I'm looking for, but the link is broken. If anyone knows where to find the info in the link, I would greatly appreciate an updated link. a href=http://groups.google.com/group/cake-php/browse_thread/thread/ 895ad34e2b0ddc76/0c81b15a138238c9?lnk=gstq=habtm +subqueriesrnum=1hl=en#0c81b15a138238c9 Model-findAll() based on conditions for an associated HABTM model - any progress?/a --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
modifying year range in date time dropdown
hi, I am using cake 1.2 for project. I need to change the year range of the datetime drop down menu created by form helper. Presently it shows from 1987-2027, i need it from 1907 - 2007 (i.e. -100 year range) How do I do this? regards suman --~--~-~--~~~---~--~~ 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: HABTM...limiting results
I was able to get it working using bindModel like this: $this-Remedy-bindModel( array ('hasMany' = array ('Rating' = array( 'className' = 'Rating', 'conditions' = 'Rating.condition_id = '.$this- params['url']['condition'], 'order' = 'Rating.created DESC', 'dependent' = true, 'exclusive' = true, 'finderSql' = '', 'foreignKey' = 'remedy_id' ))) ); That'll work for now, but I'd still like to know if there's a better way to do it. On May 11, 9:56 pm, Stacey [EMAIL PROTECTED] wrote: Hi All, I've been reading the posts and playing around with HABTM. I thought I was close, but I'm noticing that I'm using a lot of hack code to accomplish something I think should be easier. Just thought I'd check here before I make a mess of my whole app. I've got 3 main tables: conditions, remedies and ratings. There is also an 'association' table, conditions_remedies which just holds two fields (condition_id, remedy_id) to link the conditions remedies. My models are currently setup up as follows: condition 'hasAndBelongsToMany' remedy remedy 'hasAndBelongsToMany' condition rating 'belongsTo' remedy remedy 'hasMany' rating When users are browsing remedies, they get a list of the associated conditions. When they select a condition, I pass the condition id in the url... like /mysite/remedy/view/1?condition=2. That way, I can list all of the ratings that have remedy_id = 1 and condition_id = 2. In my ratings controller, I have a listbyRemedy function that calls: $this-set('rating', $this-Rating-findAll($criteria, null, 'Rating.created DESC', $limit, $page, 3)); So, I'm getting the proper info in $rating, but when I look at $remedy, I am getting results for EVERY row in conditions_remedies that matches the condition_id, when I really just want the single row that matches the condition_id AND remedy_id. Getting so many conditions back is also causing it to select all ratings for those conditions regardless of the remedy. I hope this makes sense to someone. Any help would be greatly appreciated. There is a post here that is almost identical to what I'm looking for, but the link is broken. If anyone knows where to find the info in the link, I would greatly appreciate an updated link. a href=http://groups.google.com/group/cake-php/browse_thread/thread/ 895ad34e2b0ddc76/0c81b15a138238c9?lnk=gstq=habtm +subqueriesrnum=1hl=en#0c81b15a138238c9 Model-findAll() based on conditions for an associated HABTM model - any progress?/a --~--~-~--~~~---~--~~ 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: can $this-paginate() add some query condition and how
On 5/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: thx a lot $this-paginate() useage is hard to find. Use the source Luke! Quote from somewhere. 00107 /** 00108 * Holds pagination defaults for controller actions. The keys that can be included 00109 * in this array are: 'conditions', 'fields', 'order', 'limit', 'page', and 'recursive', 00110 * similar to the parameters of Model-findAll(). 00111 * 00112 * Pagination defaults can also be supplied in a model-by-model basis by using 00113 * the name of the model as a key for a pagination array: HTH Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---