Do you think this project is possible with CakePHP?
Hi Everyone, I'm really new to cake and was wondering after studying it if this (project) below is possible (i guess, pretty much believe it's possible). :-) Project is divided with sub-projects or modules. MAIN PROJECT SUB-PROJECTS/MODULES - Inventory Management Software - TAR (Technical Action Requests) Solutions = import excel file i think and then when action is confirm it inserts records to the db (data are pulled from the excel file), export documents into excel/ word format. - Document Creator = This is a sub project that will be able to generate a ms.word doc out from a predefined template that we will be making. Some parts of the document created is changeable. I think this is a solution for our prone to error documents we created are too long and thus we came up into our mind that we can make a web- app that could put in data and use that data combined with template and generate a doc file. - Ajax capabilities = This will be my first time developing a project using cakephp and since I'm a newbie with cake, i would like to ask if it's easy to integrate with ajax capabilities and etc.. So sorry about this question. Thanks much to all of you guys. Best Regards, Dorell -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Accessing variables in referenced tables in views
In your threads controller change the recursive value to 2: $this-threads-recursive = 2; $event = $this-Threads-read(null, $id); The recursive property defines how deep CakePHP should go to fetch associated model data via find(), findAll() and read() methods. Then in your view use: $post['User']['username'] I suggest you study the manual: book.cakephp.org/view/1063/recursive -- View this message in context: http://cakephp.1045679.n5.nabble.com/Accessing-variables-in-referenced-tables-in-views-tp2638874p4404922.html Sent from the CakePHP mailing list archive at Nabble.com. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
robots.txt
How do I create a robots.txt for cakephp version 1.3.8? I placed robots.txt in app/webroot. But when I access 'http://myhomepage.com/robots.txt' I get Not Found The requested URL /robots.txt was not found on this server. thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Helper don't work under Plugins folder
Thank you Tilen, the folder of my plugin is: /var/www/app/plugins/menu_builder/views/helpers/ menu_builder.php but it doesn't work on my cakephp 1.38! :( Maybe I have to import the plugins or add some extension of appHelper? Thank you On May 17, 6:07 pm, Tilen Majerle tilen.maje...@gmail.com wrote: put plugin inside app/plugins/menu_builder/views/helpers/menu_builder.php i think you make wrong plugin folderName, MenuBuilder instead of menu_builder correct me if i'm wrong ! :) -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/5/17 Carachi carach...@gmail.com Hello, I try to install a plugin that have an helper. This plugin is : MenuBuilder. In the AppController I add : var $helpers = array('Html','Form','Javascript', 'Session', 'MenuBuilder.MenuBuilder' ); But Cake don't find the Helper Error: The helper file app/views/helpers/menu_builder.php can not be found or does not exist. If I insert the menu_builder.php in /app/views/helpers/ it works! Why? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Helper don't work under Plugins folder
did you clear the cache and do you work with debug 0 ? usually thats the problem On 18 Mai, 10:24, Carachi carach...@gmail.com wrote: Thank you Tilen, the folder of my plugin is: /var/www/app/plugins/menu_builder/views/helpers/ menu_builder.php but it doesn't work on my cakephp 1.38! :( Maybe I have to import the plugins or add some extension of appHelper? Thank you On May 17, 6:07 pm, Tilen Majerle tilen.maje...@gmail.com wrote: put plugin inside app/plugins/menu_builder/views/helpers/menu_builder.php i think you make wrong plugin folderName, MenuBuilder instead of menu_builder correct me if i'm wrong ! :) -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/5/17 Carachi carach...@gmail.com Hello, I try to install a plugin that have an helper. This plugin is : MenuBuilder. In the AppController I add : var $helpers = array('Html','Form','Javascript', 'Session', 'MenuBuilder.MenuBuilder' ); But Cake don't find the Helper Error: The helper file app/views/helpers/menu_builder.php can not be found or does not exist. If I insert the menu_builder.php in /app/views/helpers/ it works! Why? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: robots.txt
if files exists the dispatcher will not interact so your setup seems to be wrong or the file missing On 18 Mai, 06:01, なお 鈴木 naoppe1...@gmail.com wrote: How do I create a robots.txt for cakephp version 1.3.8? I placed robots.txt in app/webroot. But when I access 'http://myhomepage.com/robots.txt' I get Not Found The requested URL /robots.txt was not found on this server. thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: robots.txt
On May 17, 2011, at 23:01, なお 鈴木 wrote: How do I create a robots.txt for cakephp version 1.3.8? I placed robots.txt in app/webroot. That's the correct place to put it. But when I access 'http://myhomepage.com/robots.txt' I get Not Found The requested URL /robots.txt was not found on this server. That suggests your web server's DocumentRoot is not /path/to/app/webroot, so you should fix your DocumentRoot. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
nettuts might be searching for an author for a cakephp from scratch series
Hi. I was just going around net.tutsplus.com and saw this comment from Jeffrey Way: Me, personally? I’m running out of room to remember how to use all these frameworks. :) But I wouldn’t be against a from-scratch series on Cake or Kohana. Just haven’t found the right author yet to create the series yet. http://net.tutsplus.com/tutorials/html-css-techniques/web-design-from-scratch-choosing-an-editor/comment-page-1/#comment-365133 It's paid work, so I'm just letting you know in case you're interested. Oh... and i'm not in any way affiliated with nettuts, just think it would be nice to see it happen. :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
implementing a custom cache for views
Hi I'm still struggling trying to make localization work together with view cache... do you think implementing a custom cache for views might be the solution? For instance, by using a different cache file prefixed with the current language? In that case, should I provide a new cache in the views/helpers location? any suggestion/example of how to provide a custom cache view helper? many thanks in advance Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: implementing a custom cache for views
Hi, I wrote http://www.sanisoft.com/blog/2010/06/21/cakephp-cache-views-by-domain-a-cache-helper/a while back, may help you. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, May 18, 2011 at 2:56 PM, Lorenzo Bettini lorenzo.bett...@gmail.comwrote: Hi I'm still struggling trying to make localization work together with view cache... do you think implementing a custom cache for views might be the solution? For instance, by using a different cache file prefixed with the current language? In that case, should I provide a new cache in the views/helpers location? any suggestion/example of how to provide a custom cache view helper? many thanks in advance Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Helper don't work under Plugins folder
Thank you euromark I clear the cache more times with Cache::clear(); and now works!! Thank you :) On May 18, 10:54 am, euromark dereurom...@googlemail.com wrote: did you clear the cache and do you work with debug 0 ? usually thats the problem On 18 Mai, 10:24, Carachi carach...@gmail.com wrote: Thank you Tilen, the folder of my plugin is: /var/www/app/plugins/menu_builder/views/helpers/ menu_builder.php but it doesn't work on my cakephp 1.38! :( Maybe I have to import the plugins or add some extension of appHelper? Thank you On May 17, 6:07 pm, Tilen Majerle tilen.maje...@gmail.com wrote: put plugin inside app/plugins/menu_builder/views/helpers/menu_builder.php i think you make wrong plugin folderName, MenuBuilder instead of menu_builder correct me if i'm wrong ! :) -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/5/17 Carachi carach...@gmail.com Hello, I try to install a plugin that have an helper. This plugin is : MenuBuilder. In the AppController I add : var $helpers = array('Html','Form','Javascript', 'Session', 'MenuBuilder.MenuBuilder' ); But Cake don't find the Helper Error: The helper file app/views/helpers/menu_builder.php can not be found or does not exist. If I insert the menu_builder.php in /app/views/helpers/ it works! Why? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Earn $1000-$2500 per month
Earn $1000-$2500 per month If you Register your name You Get Sign-up bonus $5 AND Get $.20 cent for each referral. Further details http://www.earnbyforex.com/index.php?id=35678365 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: implementing a custom cache for views
Thanks Amit! I'll take a look at your post cheers Lorenzo On 05/18/2011 11:41 AM, Amit Badkas wrote: Hi, I wrote http://www.sanisoft.com/blog/2010/06/21/cakephp-cache-views-by-domain-a-cache-helper/ a while back, may help you. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, May 18, 2011 at 2:56 PM, Lorenzo Bettini lorenzo.bett...@gmail.com mailto:lorenzo.bett...@gmail.com wrote: Hi I'm still struggling trying to make localization work together with view cache... do you think implementing a custom cache for views might be the solution? For instance, by using a different cache file prefixed with the current language? In that case, should I provide a new cache in the views/helpers location? any suggestion/example of how to provide a custom cache view helper? many thanks in advance Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: user signup auth component stopped working
Data type of the id field is int, with a length of 11. I have not hit max. If I run a php sql insert like the following it works fine //manually add the data mysql_query(INSERT INTO users (username, password, email) VALUES ('$username', '$password', '$email')); But obviously since this is a cakephp application I shouldn't be doing that. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: user signup auth component stopped working
It appears that the problem is related to David Persson's media plugin. https://github.com/davidpersson/media In my model I commented out the call to his plugin and I can again add a user Previous code var $actsAs = array('Containable','Media.Transfer', 'Media.Coupler','Media.Generator'); New code var $actsAs = array('Containable' /* ,'Media.Transfer', 'Media.Coupler','Media.Generator'*/); I am using the same plugin successfully on different model and my $actAs array is exactly the same in both models. Does anyone know a reason why this plugin would work on one model and not another? Thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Accessing variables in referenced tables in views
And look at the Containable behaviour. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 17 May 2011, at 23:06, mmlunjwa wrote: In your threads controller change the recursive value to 2: $this-threads-recursive = 2; $event = $this-Threads-read(null, $id); The recursive property defines how deep CakePHP should go to fetch associated model data via find(), findAll() and read() methods. Then in your view use: $post['User']['username'] I suggest you study the manual: book.cakephp.org/view/1063/recursive -- View this message in context: http://cakephp.1045679.n5.nabble.com/Accessing-variables-in-referenced-tables-in-views-tp2638874p4404922.html Sent from the CakePHP mailing list archive at Nabble.com. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
How to cake bake in Linux environment - Cakephp?
How to cake bake in Linux environment - Cakephp? I download the latest version from cakephp website. created some tables and trying to bake process but its not working. I try to run cake bake inside cake/console but nothing happens but in windows we need to set the environment variables like that any settings need for LINUX.. Thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: How to cake bake in Linux environment - Cakephp?
U no need to bake like windows in linux. just extract the file from zip and copy it to the htdocs folder, create database for trial application like blogs and take trial. U will get that definitely. Do me one faver will u please mail me details of baking cake in windows? please. my email id joy.ana...@gmail.com best regards Anand On May 18, 7:12 pm, CakePHP.Saint thetesting.t...@gmail.com wrote: How to cake bake in Linux environment - Cakephp? I download the latest version from cakephp website. created some tables and trying to bake process but its not working. I try to run cake bake inside cake/console but nothing happens but in windows we need to set the environment variables like that any settings need for LINUX.. Thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: How to cake bake in Linux environment - Cakephp?
but in windows we need to set the environment variables like that any settings need for LINUX.. In linux you also must set the path: export PATH =$PATH:fullPathToTheCakeConsoleDir I've put it in a .profile file on the home dir, but I think it might be different depending on the shell you're using. more info http://tv.cakephp.org/video/gwoo/2010/12/24/setting_up_the_cakephp_console_on_nix -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: How to cake bake in Linux environment - Cakephp?
1. cd cake/console/ 2. ./cake bake all You need to see this: Welcome to CakePHP v1.3.8 Console --- App : app Path: /home/zaky/Ubuntu One/initech/initech/valuebets/trunk/app --- --- Bake All --- Use Database Config: (default/test) [default] What do you get? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Am I Violating MVC?
I have in a controller an array containing data used on the view to populate a drop down. I put it on the controller, so the array could be used by multiple views associated with that controller (create, edit). Additionally, it means that if I do ever have to change it, I just have to change it once (yup, lazy). Because the data is relatively static, and is used in only isolated instances, it didn't seem to be worth the effort of creating a model for that data, and establishing a relationship between models. And, putting it on the controller, worked. Admittedly, I'm new to MVC, but this really doesn't seem to jive definition. Am I doing something wrong? If so, how would one but this on the model, short of some sort of association with another model? -- J. Mitchell -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
setFlash issue in 1.3?
This line no longer seems to output a message nor does any other use of setFlash. $this-Session-setFlash('Cookie created. It will expire '.$this-Time-niceTime($cookie['expire'])); So when I was using 1.2 my code seemed to work out ok. Since migrating to 1.3, I have made sure that Session was defined in my component and helper arrays within my app_controller. Using setFlash used to display a message in the next page. Is this still the proper way to use it? Any help on this would be greatly appreciated. ~Michael -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Am I Violating MVC?
I guess it depends what the options array is used for? If it is never associated with a model, than you can create a helper. $this-Helper-getOptions(); On May 18, 11:46 am, Jason Mitchell jason.a.mitch...@gmail.com wrote: I have in a controller an array containing data used on the view to populate a drop down. I put it on the controller, so the array could be used by multiple views associated with that controller (create, edit). Additionally, it means that if I do ever have to change it, I just have to change it once (yup, lazy). Because the data is relatively static, and is used in only isolated instances, it didn't seem to be worth the effort of creating a model for that data, and establishing a relationship between models. And, putting it on the controller, worked. Admittedly, I'm new to MVC, but this really doesn't seem to jive definition. Am I doing something wrong? If so, how would one but this on the model, short of some sort of association with another model? -- J. Mitchell -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Am I Violating MVC?
Doesn't that just move it? If it's that static (e.g. 'm' = 'Male', 'f' = 'Female') putting it in an array variable seems fine to me. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 18 May 2011, at 20:41, Miles J wrote: I guess it depends what the options array is used for? If it is never associated with a model, than you can create a helper. $this-Helper-getOptions(); On May 18, 11:46 am, Jason Mitchell jason.a.mitch...@gmail.com wrote: I have in a controller an array containing data used on the view to populate a drop down. I put it on the controller, so the array could be used by multiple views associated with that controller (create, edit). Additionally, it means that if I do ever have to change it, I just have to change it once (yup, lazy). Because the data is relatively static, and is used in only isolated instances, it didn't seem to be worth the effort of creating a model for that data, and establishing a relationship between models. And, putting it on the controller, worked. Admittedly, I'm new to MVC, but this really doesn't seem to jive definition. Am I doing something wrong? If so, how would one but this on the model, short of some sort of association with another model? -- J. Mitchell -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Am I Violating MVC?
I suppose the only upside of a helper is not having to place it everywhere its needed in the controllers, just call the helper :P On May 18, 1:01 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Doesn't that just move it? If it's that static (e.g. 'm' = 'Male', 'f' = 'Female') putting it in an array variable seems fine to me. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 18 May 2011, at 20:41, Miles J wrote: I guess it depends what the options array is used for? If it is never associated with a model, than you can create a helper. $this-Helper-getOptions(); On May 18, 11:46 am, Jason Mitchell jason.a.mitch...@gmail.com wrote: I have in a controller an array containing data used on the view to populate a drop down. I put it on the controller, so the array could be used by multiple views associated with that controller (create, edit). Additionally, it means that if I do ever have to change it, I just have to change it once (yup, lazy). Because the data is relatively static, and is used in only isolated instances, it didn't seem to be worth the effort of creating a model for that data, and establishing a relationship between models. And, putting it on the controller, worked. Admittedly, I'm new to MVC, but this really doesn't seem to jive definition. Am I doing something wrong? If so, how would one but this on the model, short of some sort of association with another model? -- J. Mitchell -- Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Problems with default actions on a custom route
Hi all, I'm trying to setup a custom route that allows me to serve content based on a customer's unique ID in the URL... http://example.com/c-customer-id/action I have setup this in the routes.php as follows... Router::connect('/c-:clientId/:action/*', array( 'controller' = 'clients', 'action' = 'index'), array( 'pass' = array('clientId'), 'clientId' = '[0-9]+' ) ); I based this on the example in the manual... Router::connect( '/cooks/:action/*', array('controller' = 'users', 'action' = 'index') ); However, when I don't include an action in the URL I get the error that the controller C-cient-id does not exist. Can anyone advise why my default action (index) is not used when no other action is given? Thanks in advance, T -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
How to query hasAndBelongsToMany-Models?
Hey guys, i'm just wondering how you can do a ordinary hasAndBelongsToMany query with cake without all these dynamic bindings and stuff. I'm having a gallery to galleryImages relationship but i can't search for images in a specific gallery over this relationship. This is maybe because i don't know how because i can't find a documentation or it's because CakePHP is not able to do it. Either one or the other way there is a question: How can i do it? or Why is CakePHP not able to do such queries? Greetings func0der -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Am I Violating MVC?
i dont like using helpers for that it usually restricts the access to the view libs, components or model methods are more generically usable especially if you think about it: isnt't it almost always(!) related to at least one model? like jeremy's example with genders to the user model i simply put them in the corresponding models http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/ but if its just SOME array not related to anyone you could use libs or components to keep it dry while still being able to use it in model (for validation maybe) or any controller method as well. On 18 Mai, 22:20, Miles J mileswjohn...@gmail.com wrote: I suppose the only upside of a helper is not having to place it everywhere its needed in the controllers, just call the helper :P On May 18, 1:01 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Doesn't that just move it? If it's that static (e.g. 'm' = 'Male', 'f' = 'Female') putting it in an array variable seems fine to me. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 18 May 2011, at 20:41, Miles J wrote: I guess it depends what the options array is used for? If it is never associated with a model, than you can create a helper. $this-Helper-getOptions(); On May 18, 11:46 am, Jason Mitchell jason.a.mitch...@gmail.com wrote: I have in a controller an array containing data used on the view to populate a drop down. I put it on the controller, so the array could be used by multiple views associated with that controller (create, edit). Additionally, it means that if I do ever have to change it, I just have to change it once (yup, lazy). Because the data is relatively static, and is used in only isolated instances, it didn't seem to be worth the effort of creating a model for that data, and establishing a relationship between models. And, putting it on the controller, worked. Admittedly, I'm new to MVC, but this really doesn't seem to jive definition. Am I doing something wrong? If so, how would one but this on the model, short of some sort of association with another model? -- J. Mitchell -- Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Newb question - not as long a question as it looks, I promise.
I'm using the advice www.jamesfairhurst.co.uk/posts/view/uploading_files_and_images_with_cakephp to handle uploading images. The function uploads the files to the appropriate folder and then returns a url which I add to $this-data so the location of the image is saved in the database To call the function: $fileOK = $this-uploadFiles('img/files/campaigns', $this- data['File']); Then add the url to the array to be saved $this-data['User']['image_url'] = $fileOK['urls'][0]; image_url would end up looking like: files/campaigns/userphoto.jpg After I've done this, I want to resize the image a couple of times so I have a large thumbnail and a smaller one as well as the original. I'm using the advice at bakery.cakephp.org/articles/Perkster/ 2008/04/12/image-resizer-crop to call the function I have to do $this-PImage-resizeImage('resize', 'myimage.jpg', WWW_ROOT . 'img' . DS, false, false, 480) in the above the myimage.jpg bit I'd obviously want to replace with userphoto.jpg and the WWW_ROOT . 'img' . DS bit (which is supposed to be the folder where the image is) I'd want to presumably put files/ campaigns. My question simply is, how can I get from : $this-data['User']['image_url'] To having two vars, one with just the userphoto.jpg and the other with just the folder the image is in? I hope that makes sense, I'm new. I did try changing the PImage function so it only needed the value in $this-data['User'] ['image_url'] but that just caused lots of errors unsurprisingly. thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Newb question - not as long a question as it looks, I promise.
You could try dropping it into parse_url() http://us.php.net/manual/en/function.parse-url.php and see what you get. Don On May 18, 4:23 pm, MeatSandwich i...@babyclothingcentral.co.uk wrote: I'm using the advicewww.jamesfairhurst.co.uk/posts/view/uploading_files_and_images_with_c... to handle uploading images. The function uploads the files to the appropriate folder and then returns a url which I add to $this-data so the location of the image is saved in the database To call the function: $fileOK = $this-uploadFiles('img/files/campaigns', $this- data['File']); Then add the url to the array to be saved $this-data['User']['image_url'] = $fileOK['urls'][0]; image_url would end up looking like: files/campaigns/userphoto.jpg After I've done this, I want to resize the image a couple of times so I have a large thumbnail and a smaller one as well as the original. I'm using the advice at bakery.cakephp.org/articles/Perkster/ 2008/04/12/image-resizer-crop to call the function I have to do $this-PImage-resizeImage('resize', 'myimage.jpg', WWW_ROOT . 'img' . DS, false, false, 480) in the above the myimage.jpg bit I'd obviously want to replace with userphoto.jpg and the WWW_ROOT . 'img' . DS bit (which is supposed to be the folder where the image is) I'd want to presumably put files/ campaigns. My question simply is, how can I get from : $this-data['User']['image_url'] To having two vars, one with just the userphoto.jpg and the other with just the folder the image is in? I hope that makes sense, I'm new. I did try changing the PImage function so it only needed the value in $this-data['User'] ['image_url'] but that just caused lots of errors unsurprisingly. thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: How to query hasAndBelongsToMany-Models?
I have a habtm Image-GalleryImage-Gallery set up and can do what you are looking for with this: $this-Image-Gallery-find('all', array('conditions'=array('Gallery.name' = 'seascapes'))); Regards, Don On May 18, 3:15 pm, func0der funco...@web.de wrote: Hey guys, i'm just wondering how you can do a ordinary hasAndBelongsToMany query with cake without all these dynamic bindings and stuff. I'm having a gallery to galleryImages relationship but i can't search for images in a specific gallery over this relationship. This is maybe because i don't know how because i can't find a documentation or it's because CakePHP is not able to do it. Either one or the other way there is a question: How can i do it? or Why is CakePHP not able to do such queries? Greetings func0der -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Am I Violating MVC?
I agree with the helper approach if its a helper array. But there is not enough info about the array nature. As you know maintaining the code is also somthing you should think about so if the nature of the array is pure data nature I'll advice even writing a table and a model ... Its easy to maintain an application when you know that all your data is in the database for example and you don't need to start looking for data arrays all over code. Maybe putting the array in the appModel. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Cake vs other frameworks benchmarks
Hi guys, Lately, I came across another benchmark of popular PHP frameworks: http://www.devshed.com/c/a/PHP/7-PHP-Frameworks-Tested-For-Speed/2/ This is approx. 3rd or 4th benchmark of this type that I came across during last couple of month and in every benchmark Cake shows pretty poor results. As a head of a company that specializes in CakePHP, I am very worried about Cake's future. Because even all of these benchmarks are wrong / have incorrect results, our customers still trust them and I start hearing Anything, but not Cake, please, look at this benchmark seems it's not a good piece of software from our customers. Something should be done, even if there is no opportunity to increase the speed, I guess Cake should apply some kind of PR actions :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php