2.0 is pretty awesome
Thanks guys :)! I love the consistency. The docs are awesome (although it is easier to setup on linux than on windows. I did it on both.). I especially like that you allow email settings to be entered in like database settings. Converting http://letswoosh.com to it now trying out the new testing tools at the same time. -- 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
Is there any good documentation on $form-inputs()?
Everytime I use it (and I really love using it), I need to look up info about it. It is no problem with datatime, text, textfields, and checkboxes; however, on off change I need a select or upload field, I need to do some work. Furthermore, if I want to change the label I need to experiment a million times, and figure out what it is looking for... Has this function been documented in more detail anywhere? The API doc is pretty useless for this function. It isn't even in the book anymore. Thanks, Parris -- 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: Is there any good documentation on $form-inputs()?
Not input singular... inputs, plural. On Mar 18, 12:52 pm, euromark dereurom...@googlemail.com wrote: i think there is pretty much everything covered...http://book.cakephp.org/view/1390/Automagic-Form-Elements On 18 Mrz., 20:19, Parris presid...@parrisstudios.com wrote: Everytime I use it (and I really love using it), I need to look up info about it. It is no problem with datatime, text, textfields, and checkboxes; however, on off change I need a select or upload field, I need to do some work. Furthermore, if I want to change the label I need to experiment a million times, and figure out what it is looking for... Has this function been documented in more detail anywhere? The API doc is pretty useless for this function. It isn't even in the book anymore. Thanks, Parris -- 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: Is there any good documentation on $form-inputs()?
http://api13.cakephp.org/class/form-helper#method-FormHelperinputs On Mar 18, 12:52 pm, euromark dereurom...@googlemail.com wrote: i think there is pretty much everything covered...http://book.cakephp.org/view/1390/Automagic-Form-Elements On 18 Mrz., 20:19, Parris presid...@parrisstudios.com wrote: Everytime I use it (and I really love using it), I need to look up info about it. It is no problem with datatime, text, textfields, and checkboxes; however, on off change I need a select or upload field, I need to do some work. Furthermore, if I want to change the label I need to experiment a million times, and figure out what it is looking for... Has this function been documented in more detail anywhere? The API doc is pretty useless for this function. It isn't even in the book anymore. Thanks, Parris -- 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: Is there any good documentation on $form-inputs()?
Nevermind, figured it out! Thanks! On Mar 18, 1:27 pm, Parris presid...@parrisstudios.com wrote: Not input singular... inputs, plural. On Mar 18, 12:52 pm, euromark dereurom...@googlemail.com wrote: i think there is pretty much everything covered...http://book.cakephp.org/view/1390/Automagic-Form-Elements On 18 Mrz., 20:19, Parris presid...@parrisstudios.com wrote: Everytime I use it (and I really love using it), I need to look up info about it. It is no problem with datatime, text, textfields, and checkboxes; however, on off change I need a select or upload field, I need to do some work. Furthermore, if I want to change the label I need to experiment a million times, and figure out what it is looking for... Has this function been documented in more detail anywhere? The API doc is pretty useless for this function. It isn't even in the book anymore. Thanks, Parris -- 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: Plugin tutorial in the book
I was using an example... It has this: // /app/plugins/pizza/models/example_model.php: class ExampleModel extends PizzaAppModel { var $name = 'ExampleModel'; var $hasMany = array('Pizza.PizzaOrder'); } ? Buttt, which breaks some automagic stuff. I've found that changing the above to: // /app/plugins/pizza/models/example_model.php: class Example extends PizzaAppModel { var $name = 'Example'; var $hasMany = array('Pizza.PizzaOrder'); } ? Just dropping the word model, just like how they are in the main app it fixes everything. Thanks... On Jan 10, 7:57 pm, Amit Badkas amit.sanis...@gmail.com wrote: Hi, http://book.cakephp.org/view/1114/Plugin-Modelsdoesn't have what you mentioned. It uses model name as 'PizzaOrder' and not 'PizzaOrderModel'. Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Tue, Jan 11, 2011 at 5:42 AM, Parris presid...@parrisstudios.com wrote: Hi All, I was wondering why the plugin tutorial names models like: PizzaOrderModel. I understand Pizza is the name of the plugin, and am fine with that, but the word model throws off the convention. Plus it breaks a few other things like validation. It also forces you to use: var $uses in your controllers. When I take the word model out of the name everything works as expected and should. Thanks, Parris Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Plugin tutorial in the book
Hi All, I was wondering why the plugin tutorial names models like: PizzaOrderModel. I understand Pizza is the name of the plugin, and am fine with that, but the word model throws off the convention. Plus it breaks a few other things like validation. It also forces you to use: var $uses in your controllers. When I take the word model out of the name everything works as expected and should. Thanks, Parris Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Site Wide SMTP Email?
Is there a way to force SMTP to be used for all email going through email component? In other words can I make one change and have it take effect everywhere? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Agile Stories Project Management Internal Web App for CakePHP?
Hello, I was wondering if anyone knows of a project management app written in cakephp. Trying to setup projects, divide them out into stories, etc etc... Thanks!!! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
CakePHP plugin in Wordpress or Wordpress as my admin section?
Hi All, I am working on a project right now that involves CakePHP and Wordpress. I know tons of questions have been asked about this topic, but I was wondering how I could use wordpress as the main admin user interface, and sort of develop plugins for wordpress using cakephp. I would assume that wordpress needs to be inside of cakephp's webroot and some how almost everything gets routed to wordpress. Maybe I am wrong. I guess if that isn't exactly possible maybe I can simply develop a plugin for wordpress in cakephp. Let me know what you guys think? Thanks!!! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: CakePHP HABTM Plugin table naming conventions (for 1.3)
Would that not cause namespace issues if there were more than one controller with the same name in the entire app? Doesn't the model need to be named PollPoll not just Poll? On Jan 12, 12:32 am, Grzegorz Pawlik grzegorzpaw...@gmail.com wrote: In 1.2 I would name model Poll, and Tag, and in PollAppModel set $tablePrefix = poll_ So You would have poll_polls, poll_tags and poll_posts_tags. As fas as I remember - that worked :) Btw, when You define relations It would be for Poll model var $habtm = array(Poll.Tag); Good luck I'm not familiar with 1.3 On 12 Sty, 04:39, Parris presid...@parrisstudios.com wrote: I posted this on stackoverflow, but didn't really get the response I was looking for Hi everyone, I know naming conventions for tables used by plugins generally start with the name of the plugin and then the model pluralized. For example lets say I had a plugin called Poll, with a model also called PollPoll and another model called PollTag then the resulting table names would be poll_polls and poll_tags. They would also have a habtm relationship so what is the convention for that table name? I believe it would poll_poll_polls_poll_tags, although it is a little redundant it makes sense since the first poll_ represents the name of the plugin, while poll_polls and poll_tags relates to the models. Also have any naming conventions changed for plugins in 1.3? Is the above stated correct? Thanks! By the way, just to make this clear, no other models would really access this plugin's tables, which would make it suitable as a plugin. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
CakePHP HABTM Plugin table naming conventions (for 1.3)
I posted this on stackoverflow, but didn't really get the response I was looking for Hi everyone, I know naming conventions for tables used by plugins generally start with the name of the plugin and then the model pluralized. For example lets say I had a plugin called Poll, with a model also called PollPoll and another model called PollTag then the resulting table names would be poll_polls and poll_tags. They would also have a habtm relationship so what is the convention for that table name? I believe it would poll_poll_polls_poll_tags, although it is a little redundant it makes sense since the first poll_ represents the name of the plugin, while poll_polls and poll_tags relates to the models. Also have any naming conventions changed for plugins in 1.3? Is the above stated correct? Thanks! By the way, just to make this clear, no other models would really access this plugin's tables, which would make it suitable as a plugin. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
weird unserialize issue in 1.3 alpha
Notice: unserialize() [function.unserialize]: Error at offset 6 of 1051 bytes in C:\xampp\htdocs\projects\courses\cake\libs\cache \file.php on line 189 anyone seen that before? I have 5 similar warnings all because the same line. I am on a windows machine running xampp. when i click notice the error reads: Code | Context $key= cake_core_file_map $time = 1262723833 $cachetime = 1262723843 $data = a:6:{s:4:\Core\;a:6:{s:6:\Router\;s:53:\C:\xampp\htdocs \projects\courses\cake\libs\router.php\;s:13:\ClassRegistry\;s: 61:\C:\xampp\htdocs\projects\courses\cake\libs\class_registry.php\;s: 12:\Overloadable\;s:59:\C:\xampp\htdocs\projects\courses\cake\libs \overloadable.php\;s:8:\Security\;s:55:\C:\xampp\htdocs\projects \courses\cake\libs\security.php\;s:4:\l10n\;s:51:\C:\xampp\htdocs \projects\courses\cake\libs\l10n.php\;s:4:\i18n\;s:51:\C:\xampp \htdocs\projects\courses\cake\libs\i18n.php\;}s:10:\Controller\;a:4: {s:9:\Component\;s:67:\C:\xampp\htdocs\projects\courses\cake\libs \controller\component.php\;s:10:\Controller\;s:68:\C:\xampp\htdocs \projects\courses\cake\libs\controller\controller.php\;s: 13:\AppController\;s:72:\C:\xampp\htdocs\projects\courses\cake\libs \controller\app_controller.php\;s:15:\PagesController\;s:74:\C: \xampp\htdocs\projects\courses\cake\libs\controller \pages_controller.php\;}s:4:\View\;a:2:{s:6:\Helper\;s:58:\C: \xampp\htdocs\projects\courses\cake\libs\view\helper.php\;s:4:\View \;s:56:\C:\xampp\htdocs\projects\courses\cake\libs\view\view.php\;} s:9:\Component\;a:1:{s:16:\SessionComponent\;s:76:\C:\xampp\htdocs \projects\courses\cake\libs\controller\components\session.php\;}s: 6:\Helper\;a:4:{s:9:\AppHelper\;s:70:\C:\xampp\htdocs\projects \courses\cake\libs\view\helpers\app_helper.php\;s:10:\HtmlHelper\;s: 64:\C:\xampp\htdocs\projects\courses\cake\libs\view\helpers\html.php \;s:10:\FormHelper\;s:64:\C:\xampp\htdocs\projects\courses\cake \libs\view\helpers\form.php\;s:13:\SessionHelper\;s:67:\C:\xampp \htdocs\projects\courses\cake\libs\view\helpers\session.php\;}s: 10:\Datasource\;a:2:{s:9:\DboSource\;s:75:\C:\xampp\htdocs \projects\courses\cake\libs\model\datasources\dbo_source.php\;s: 8:\DboMysql\;s:78:\C:\xampp\htdocs\projects\courses\cake\libs\model \datasources\dbo\dbo_mysql.php\;}} unserialize - [internal], line ?? FileEngine::read() - CORE\cake\libs\cache\file.php, line 189 Cache::read() - CORE\cake\libs\cache.php, line 306 App::getInstance() - CORE\cake\libs\configure.php, line 967 App::path() - CORE\cake\libs\configure.php, line 621 Configure::__loadBootstrap() - CORE\cake\libs\configure.php, line 416 Configure::getInstance() - CORE\cake\libs\configure.php, line 60 include - CORE\cake\bootstrap.php, line 38 [main] - APP\webroot\index.php, line 76 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: CakeFest IV - America - Help us pick a location!
San Jose!! it is silicon valley and I don't need to travel hahaha. San Francisco would work better probably though! :) On Jan 4, 9:47 am, drpark webmas...@attractionland.com wrote: Hi all! Miami, Orlando, Wilmington NC, Las Vegas, Chicago, Seattle for the USA in order of preference Cancun for Mexico, Vancouver for Canada But east coast is better for us (we are from France) On 4 jan, 09:21, Primeminister cvdkerk...@gmail.com wrote: New York! On Nov 14 2009, 5:19 am, BrendonKoz brendon...@hotmail.com wrote: Although I live east coast, I'd be more apt to go if it was some place warm/tropical. Once you're in DC, it's not bad, but getting there if you don't fly is a pain. Chicago's airport's pretty cool, but I've never been outside of it. How is Texas's night life? Safe? Anyway, nice of the Cake team to ask! Thanks! On Nov 13, 11:02 pm, Miles J mileswjohn...@gmail.com wrote: Chicago seems cheap and cold, also one of the worse major cities in the US, why there? I vote for New York, or Seattle, or Boston, or something. On Nov 13, 7:36 pm, Renan Gonçalves renan.sad...@gmail.com wrote: Looks like Chicago is a nice place to host. On Fri, Nov 13, 2009 at 1:43 AM, Graham Weldon gra...@grahamweldon.comwrote: Hi all, The CakePHP team has been considering the location for the next upcoming CakeFest. We've decided to bring it back home to the United Sates of America. Thus far we haven't chosen a location for the event, but to ensure we reach as many people as possible, we'd like your opinion on where we should host the event. Essentially, our choices are: - USA East Coast - USA West Coast - USA Central If I have missed another location that you feel might be more popular or accessible to interested attendees, feel free to suggest it. We're keen to hear peoples thoughts on it. Cheers, Graham Weldon (AKA: Predominant) e. gra...@grahamweldon.com w.http://grahamweldon.com -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/cake-php?hl=. -- Renan Gonçalves aka renan.saddam CakeDC Software Engineer CakePHP Core Developer Website: renangoncalves dot com Extrema, MG, Brazil- Hide quoted text - - Show quoted text - Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
HABTM with one Tag Model and 2 or more Other Models
Hi All, So I have a habtm with Tags and Posts, now I want to add more tables that have HABTM relationships with Tags is this possible? Should I create a separated table? It does not seem neccesary to do so but I seem mistaken. I suppose I would just need to create a new table called othermodel_tags to link each other model to a tag. Then just say do things as normal in my models. Is there are different way I should be doing this? Is there anything else I should know. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: CakePHP (and other leading php frameworks) vs. Drupal custom modules
As i understand it... drupal isn't so much of a framework and more of a cms. Of course it probably does have an api. I have worked with drupal once. I got frustrated and moved on. It is really hard to create a theme in it, if you ask me. Cake is a framework much like ruby on rails. If you don't want to create a full on cms in cake, you may want to check out jake for joomla. I am sure there is something similar for drupal also. On Aug 9, 9:14 am, Josh joshs.silver...@gmail.com wrote: Does anyone have CakePHP experience and Drupal custom module experience? If so, what is your opinion of the Drupal API for writing custom modules? I have a friend that is about to do a re-design for his Drupal app and is considering changing frameworks. They would have to design 3-4 custom modules. Any thoughts? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
access cakephp sessions outside of cake
Hi everyone, I was wondering if anyone has been able to successfully get cakephp sessions to work outside of the framework? I had seen that article in the bakery, but that didn't turn out to be very helpful. Any guidance would be much appreciated... Right now I am trying to access session vars with: session_name(CAKEPHP); //Same as the value you have for 'Session.cookie' in core.php session_start(); print_r($_SESSION); which outputs Array( ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Fckeditor and or ckfinder server error issues
Hi Everyone, I know this only partially applies here, but I was wondering if anyone was able to get the file/image loader working with fckeditor and hopefully with ckfinder. I think the same internal server error 500 xml is happening with both. Without ckeditor i get a similar message. Fckeditor other than this is working fine for me... Standalone mode does not work for ckeditor. Same error. I set auth check to return true for now. I believe my paths are right. Any insight would be much appreciated... Other alternatives, of any sort are also welcome. I just want a file uploader + fck or tinymce editor type thing. Also image uploading/ thumbnailing is also highly desired. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Multi-Level Menu
Hi Guys, So my team is working on making a menu system with sub-menus and such. We have a few different proposed methods, and are trying to figure out the best solution. One is more database driven and the other is xml driven. The proposed database way in my mind could require way to many calls, and recursively adding into an array of items. then actually go through the array to display it. We would need to cache it also because i feel this process is way too slow. Then we have xml which can be read in and out easily, and it is already in a usable array structure. Then again it is kind of out of the cake framework. I have also seen this article: http://bakery.cakephp.org/articles/view/threaded-lists which could make our lives easier haha. I want to hear what others have done. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
ahh. yea i never thought of it that way; however, the issue goes beyond that. How about for the purposes of SSL. If SSL is enabled on www.x.com then it will not work on x.com. So in some cases you have no choice. Unless you want to change your SSL. Also if sessions/cookies understood that there are no differences between www.x.com and x.com then this routing issue would not even be important. Also a counter to your argument. If we are always specifying a subdomain then shouldn't we always specify www. ? The format is always sub.domain.com, but now you are saying JUST for the main domain we should change that. I understand the stance you described though and agree with it; however, I am playing devils advocate here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: New Paypal NVP Component in the Bakery
Well not yet! It is still pending approval haha. On Feb 6, 3:10 am, Parris presid...@parrisstudios.com wrote: Enjoy:http://bakery.cakephp.org/articles/view/paypal-direct-payment-compone... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
New Paypal NVP Component in the Bakery
Enjoy: http://bakery.cakephp.org/articles/view/paypal-direct-payment-component-using-curl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Performing a Query using a curdate as condition, help asap?
Hi Everyone, I am just trying to perform a simple query using cakephp. In the conditions array I am trying to filter by dates. The results should be all 'events' that will be today or greater (in other words, any date in the future). $this-Event-find('all',array( 'conditions' =array ('event_category_id'=$catId,'DATE(Event.event_date)'='getdate ()'),'order'=array('Event.event_date ASC','Event.event_time ASC') ) ) ; That is what i have so far. The first condition is just to filter by category. The part I need help with is 'DATE (Event.event_date)'='getdate()'). There are no errors. So i guess its kind of working. Also how can i adjust 'today' by 4 hours ? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
How can I force www. to always be in my domain name?
For example if my website were awesome.com. When the user gets there it should automatically forward them to http://www.awesome.com. Also this should happen always (unless SSL is involved then the there should be an s after http (I already have that working)). I suppose I could create a component and then add it to every controller that does this; however, that seems like a bad approach (if i am doing it everywhere then it should only be stated once in one spot). Whats the best way to do this? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
Ok got it: IfModule mod_rewrite.c RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] RewriteCond %{HTTPS}s ^on(s)|off RewriteRule ^(.*)$ http%1://www.domain.com/$1 [R=301,QSA,L] RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] /IfModule On Jan 20, 2:42 pm, Parris presid...@parrisstudios.com wrote: For example if my website were awesome.com. When the user gets there it should automatically forward them tohttp://www.awesome.com. Also this should happen always (unless SSL is involved then the there should be an s after http (I already have that working)). I suppose I could create a component and then add it to every controller that does this; however, that seems like a bad approach (if i am doing it everywhere then it should only be stated once in one spot). Whats the best way to do this? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: How can I force www. to always be in my domain name?
I think it would be nice to optimize this for any domain, with any folder, or possibly any subdomain, or any combo of all of that... Anyone have ideas? On Jan 20, 3:25 pm, Parris presid...@parrisstudios.com wrote: Ok got it: IfModule mod_rewrite.c RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] RewriteCond %{HTTPS}s ^on(s)|off RewriteRule ^(.*)$ http%1://www.domain.com/$1[R=301,QSA,L] RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] /IfModule On Jan 20, 2:42 pm, Parris presid...@parrisstudios.com wrote: For example if my website were awesome.com. When the user gets there it should automatically forward them tohttp://www.awesome.com. Also this should happen always (unless SSL is involved then the there should be an s after http (I already have that working)). I suppose I could create a component and then add it to every controller that does this; however, that seems like a bad approach (if i am doing it everywhere then it should only be stated once in one spot). Whats the best way to do this? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Trying to update a controller from a different model...
I know this has been posted about before, but the answer has always been obscure. My controller: ?php class OrdersController extends AppController { var $name = 'Orders'; var $components = array('Ssl'); var $helpers = array('Html','Javascript','Ajax','Time','Form'); function stepOne() { $this-Ssl-force(); $this-set('data',$this-Session-read('Order')); if (!empty($this-data)){ $this-Order-Member-set('id',$this-Session-read('Member.id')); $this-Order-Member-save($this-data); /* I update session data here */ //$this-redirect('stepTwo'); } } } ? The name of each item in the form is data[Order][Member][fieldname] I did it this way to match the idea of the associations. Namely $this- Order-Member-save(); I wasn't sure if this was necessary... The data is being updated in the session but not in the DB. No validation errors (I think I have heard that this always happens? I am not sure). Thanks for the help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: Trying to update a controller from a different model...
come on... someone has to know the answer to this... are you all just using request action or something along those lines? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: Trying to update a controller from a different model...
Ok, ill do that. I am just trying to update a row in my Member model, from my Orders controller. On Jan 20, 6:42 pm, Nate nate.ab...@gmail.com wrote: Not exactly sure what you're trying to do here, but I'd wrap that save () call in an if block, because right now it looks like you have no way of knowing if the save fails. On Jan 20, 9:25 pm, Parris presid...@parrisstudios.com wrote: come on... someone has to know the answer to this... are you all just using request action or something along those lines? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: Trying to update a controller from a different model...
Yea it just fails to save... Not sure why... No sql errors --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: Trying to update a controller from a different model...
AH... So in my model, I was trying to validate items that were not in my table. This was originally used to validate items during sign up (such as email and password confirmation). I removed these items, and I can update now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Sessions, phpThumb, SwfUpload, Cake 1.2
Hi Everyone, So here is my issue. I have gotten the phpThumb and SWFupload components working. They upload, create thumbnails and using an ajax call will even post the thumbnails back on the page. There is an issue though. When I went back to only allow people logged in to upload pictures cake would drop my sessions. I tried many different things. I even deleted everything in the view, but my session still did not appear. Finally I decided to restore everything and simply delete: var $components = array('Thumb','SwfUpload'); Once this line was removed my sessions were working. However, at this point nothing else was. The other interesting thing is that the session would end with pages that didn't use either of these components (but use the same controller). Here are the important parts of my controller: (I tried using that before filter thing, but its pointless because my session ends in the component...,) ?php class GalleryPhotosController extends AppController { var $name = 'GalleryPhotos'; var $components = array('Thumb','SwfUpload'); var $helpers = array('Form','Javascript'); function beforeFilter() { if ($this-action == 'add'||$this-action == 'modify') { $this-Session-id($this-params['pass'][0]); $this-Session-start(); } parent::beforeFilter(); } function add($galleryCatId=0){ if ($this-requestAction('/members/isLoggedIn/')){ $memberId =$this-requestAction('/gallery_categories/findMemberId/'. $galleryCatId); if ($memberId==$this-Session-read('Member.id')){ $this-set('galleryCatId',$galleryCatId); $eventId =$this-requestAction('/gallery_categories/findEventId/'. $galleryCatId); $this-set('eventId',$eventId); $this-set('error',false); } else { $this-set('error',true); } } else { $this-set('error',true); } } function upload($galleryCatId,$sessionId,$overwrite=false){ if (isset($this-params['form']['Filedata'])) { // upload the file // use these to configure the upload path, web path, and overwrite settings if necessary $this-SwfUpload-uploadpath = 'fileupload'.DS. $galleryCatId.DS; $this-SwfUpload-webpath = '/fileupload/'. $galleryCatId.'/'; $this-SwfUpload-overwrite = $overwrite; //by default, SwfUploadComponent does NOT overwrite files // if ($this-SwfUpload-upload()) { $this-data['GalleryPhoto']['gallery_category_id'] = $galleryCatId; if (!($file = $this-GalleryPhoto-save($this-data))){ $this-Session-setFlash('Database save failed'); } else { $this-data['GalleryPhoto']['id'] = $this- GalleryPhoto-getLastInsertId(); $this-data['GalleryPhoto']['photo_caption'] = ; $this-data['GalleryPhoto']['photo_filename'] = $galleryCatId.DS.$this-SwfUpload-filename; $this-GalleryPhoto-save($this-data); if(!$this-Thumb-generateThumbnail($this-SwfUpload- uploadpath.$this-SwfUpload-filename,$this-SwfUpload- uploadpath.'tb_'.$this-SwfUpload-filename)){ pr($this-Thumb-errors); } } } else { $this-Session-setFlash($this-SwfUpload- errorMessage); } } } } ? I could also add the components they actually may be useful. I am sure most of you have them though. I didn't include the view because completely deleting everything from it had no effect. My security settings are medium, I have turned off checkUserAgent. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: Sessions, phpThumb, SwfUpload, Cake 1.2
Graham, Thanks for the response; however, that did not fix the situation. I know the session is dead because when I look at the login area it tells me to log in. The strange thing is that when i go to a different page the session is alive again. It seems that the session just temporarily goes away whenever I include the phpThumb and swfupload components. I don't know why it would even happen with phpThumb. (yea I remove all components, and the session is alive. Leaving only swfupload or thumb will kill it, and yes normal components and other components do work. my captcha component works fine). I may try to use an iframe and just pass all the information into it, but that is causing more problems for sure. Plus it is rather hackish. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: Sessions, phpThumb, SwfUpload, Cake 1.2
I am happy to report that the iframe work around did work; however, it did cause a significant amount of grief! There is a security hole now. I could solve it with some round about magic I suppose. Possibly manually creating some sort of checking mechanism. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Re: For Some Reason My Controllers and Views Are Being Cached...
I solved the solution by upgrading to the newest version and clearing the tmp folder in app (well replacing it with the default in the new version of cake) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
For Some Reason My Controllers and Views Are Being Cached...
So every now and then this occurs. I will update file x and the cakephp won't see it as updated. One way around this has been to rename the files; however, that seems very round about... I think there is some strange caching issue afoot. I am using 1.2 RC2 I have disabled caching in Cake's core.php file. Also I have disable caching in my browser (plus i test using different machines, so IMHO it is an issue with Cake's caching) Any input would be greatly appreciated... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en -~--~~~~--~~--~--~---
Trouble Viewing Dynamically Created Images...
So I have a few classes that dynamically create images. One of which works on the same server, but not in the directory that I have cake currently installed, and the other is one I am trying to get to work with cake php. When I view the one that works, simply as a url... It generates the image just fine. When i load i through img src=url_to_php_generated_image it works fine when not using cake. When I try to load this image in my cake environment it does not appear at all (the src as a simple url still works though). I became of this after messing around with all the different captcha components in the bakery. They all work but give me the same result. The result being that the image does not display when using img src=url_to_php_generated_image, and when going directly to url_to_php_generated_image will display scrambled text which seems to me like binary? So I guess the image is being created; however, it isn't being parsed correctly by cake some how? I am not quite sure what is happening. It seems others are having this problem since in all the captcha bakery stuff people are complaining. I did try turning off debug mode. However, that simply removed the header errors when trying to view the image using the url. I also used a blank layout to try and view the image without the rest of the site, but that had no effect either I am stuck... Any help would be much appreciated! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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: Trouble Viewing Dynamically Created Images...
Just a side note... I am using RC2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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: Trouble Viewing Dynamically Created Images...
Ok thanks for the non-replies everyone! I just solved it! Everyone who has this issue in the future, please check for any extra spaces or returns at the end of files!!! This is definitely your culprit if you see that there is an extra space randomly at the beginning of your data output! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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 -~--~~~~--~~--~--~---
Form helper issues...
I think there may be a bug with the form helper? Can anyone confirm or tell me if I am doing something wrong? I made a simple view page: ?php if ($error): ? pEmail and Password do not match. Please try again./p ?php endif; ? form action=?php echo $html-url('/members/login'); ? method=post style=width:250px; div Email: br / ?php echo $form-input('Member/email', array('size' = 60)); ? /div div Password: br / ?php echo $form-password('Member/password', array('size' = 60)); ? /div div ?php echo $form-submit('Login'); ? /div /form The password field shows up fine, but for me the input field showed up slightly indented and slightly shorter and then it had the word Email above the field twice (once for the time I typed it and once for the time it generated it). The password field didn't do this though. It just showed the field alone with no indent or or shortening of the field. My page layout is still the default cake layout. I am using 1.2. Also another thing I have noticed is that when the page becomes wider as the result of an error I can not scroll horizontally but rather highlight drag the entire page over to see what is going on. I am using firefox 3. I made my own work around fix for the label issue on the email field though. I simply went into the form helper file and changed the output of the function label(...) to return ; I know this kills all labels on the site, but i don't really use them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP belongsTo, associations, need help getting data from another table
Ok I fixed it! All conventions need to be followed or it won't work. Related table ids need to be labeled the singularly followed by id. For example if the table is called event_categories. In events i need to have the related id for the column field called event_category_id. Also all primary keys should be called id. All tables should be plural. All model file names are singular, but controller file names are plural. Model class and variable names are singular. Controller class and variable names are plural. I think i got everything in there :). Just so anyone who has this issue in the future will know what to do! Basically associations break down if all conventions of tables and classes for cakePHP aren't followed. Thats how it was for me at least. On Jul 18, 9:49 am, Parris [EMAIL PROTECTED] wrote: That didn't seem to make a difference... I closed my other post about cake not letting me make my controller name plural and reposted it here. I feel like this is a related issue. I have another model and controller that Event belongsTo and that seems to work fine. I think there is something wrong with the way I created something. To make this all work right now I have to call my model event.php (Event) and my controller event_controller.php(Event_Controller) or else cake will tell me the following: Missing Controller Error: EventController could not be found. Error: Create the class EventController below in file: app/ controllers/ event_controller.php ?php class EventController extends AppController { var $name = 'Event'; } ? My Event Model (event.php in /models): ?php class Event extends AppModel { var $name = 'Event'; var $useTable = 'events'; var $belongsTo = array( 'GalleryCategory' = array( 'className' = 'GalleryCategory', 'foreignKey' = 'id', 'associationForeignKey' = 'gallery_id', 'joinTable' = 'gallery_categories' ), 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id', 'associationForeignKey' = 'cat_id', 'joinTable' = 'event_categories' ) ); } ? Events Controllers (events_controller.php in /controllers): ?php class EventsController extends AppController { var $name = 'Events'; function index() { $this-set('events', $this-Event-findAll()); } } ? Look to my previous post for the info on event_categories. I was able to rename that controller and make it plural; however, it wont let me with the event controller. I have made soo many searches on this. Read and reread all the conventions. I have no idea where to turn. On Jul 18, 1:07 am, grigri [EMAIL PROTECTED] wrote: Use a `belongsTo`, not a `hasOne`. On Jul 18, 3:52 am, Parris [EMAIL PROTECTED] wrote: So I have a MVC for Events and Event Categories. I am trying to have the name of the category appear on the event page. I am associating events as belonging to event categories with a field called cat_id. I am able the retrieve the tables, but for some reason the event category part of the array ends up empty. Visually I am trying to make it look something like: Concert: Annual Event Where Concert is equal to a cat_name which is associated by cat_id(in the event table) = id(in the event categories table) and Annual Event is the event_title (in the event table). Also the word concert would be linked to show a category view Getting data from the event table is no problem. I used print_r($event[0]) to show data from the first entry: [code]Array ( [Event] = Array ( [id] = 6 [cat_id] = 1 [gallery_id] = 6 [event_title] = Test [event_date] = 2008-02-09 [event_hour] = 6 [event_minute] = 0 [event_ampm] = 1 [event_price] = 10.00 [event_tickets] = 6 [event_venue] = Venue [event_address] = Address [event_city] = San Jose [event_state] = CA [event_zip] = 95123 ) [EventCategory] = Array ( [id] = [cat_name] = [cat_description] = ) ) [/code] If you notice the EventCategory part of the array is empty for some reason Event Model: [code]?php class Event extends AppModel { var $name = 'Event'; var $hasOne = array( 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id' ) );} ? [/code] Event Category Model: [code] ?php class EventCategory extends AppModel { var $name = 'EventCategory'; var $hasMany = array( 'Event' = array( 'className
Quick help?
?php if ($error): ? pLogin Credentials do not match. Please try again./p ?php endif; ? form action=?php echo $html-url('/members/login'); ? method=post style=width:250px; div ?php echo $form-input('Member/email'); ? /div div ?php echo $form-password('Member/password'); ? /div div ?php echo $form-submit('Login'); ? /div /form A label gets output for input, but not for password. Also some style problems exist. This is with firefox 3, and I have cakePHP 1.2.0.7296 RC2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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: Quick help?
Ahhh, yea thanks for the help. Yea the cakebook was down for 1.2. Ok so here is what I came up with for 1.2. This is all you need for a login form. ?php if ($error): ? pThe login credentials you supplied could not be recognized. Please try again./p ?php endif; ? ?php echo $form-create('Member',array('type' = 'post')); ? ?php echo $form-input('Member/email'); ? ?php echo $form-input('Member/password'); ? ?php echo $form-end('Login'); ? 7 lines?!?! This is madeness! hahaha On Jul 19, 10:32 am, Sam Sherlock [EMAIL PROTECTED] wrote: use input to generate labels with inputs (AFAIK if the name is password the type is automajically set to password) ?php echo $form-input('password', array('class' = 'required', 'tabindex' = '4')); ? $form-text, $form-password, $form-textarea are used when you don't want the label to be generated // a confirm password can be made setting the type in the options array ?php echo $form-input('confirm_password', array('type' = 'password', 'class' = 'required', 'tabindex' = '5')); ? also you can use $form-create('Member', Array('class' = 'hfrom', 'url' = '/members/login')) then you can just pass 'email' 'password' to the inputs more info athttp://book.cakephp.org/view/182/formhttp://api.cakephp.org/class_form_helper.htmlhttp://www.donutczar.com/cake1point2/donuts/form_helper 2008/7/19 Parris [EMAIL PROTECTED]: ?php if ($error): ? pLogin Credentials do not match. Please try again./p ?php endif; ? form action=?php echo $html-url('/members/login'); ? method=post style=width:250px; div ?php echo $form-input('Member/email'); ? /div div ?php echo $form-password('Member/password'); ? /div div ?php echo $form-submit('Login'); ? /div /form A label gets output for input, but not for password. Also some style problems exist. This is with firefox 3, and I have cakePHP 1.2.0.7296 RC2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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: Quick help?
Wow thanks for the help. Yea the cake book was down (it just came back up) for 1.2. This is what I came up with for a login form: ?php if ($error): echo pLogin denied. Please try again./p; endif; echo $form-create('Member',array('type' = 'post', 'action' = 'login')); echo $form-input('Member/email'); echo $form-input('Member/password'); echo $form-end('Login'); ? 7 lines of code for a login form? I could make a pun about how easy this is right now. On Jul 19, 10:32 am, Sam Sherlock [EMAIL PROTECTED] wrote: use input to generate labels with inputs (AFAIK if the name is password the type is automajically set to password) ?php echo $form-input('password', array('class' = 'required', 'tabindex' = '4')); ? $form-text, $form-password, $form-textarea are used when you don't want the label to be generated // a confirm password can be made setting the type in the options array ?php echo $form-input('confirm_password', array('type' = 'password', 'class' = 'required', 'tabindex' = '5')); ? also you can use $form-create('Member', Array('class' = 'hfrom', 'url' = '/members/login')) then you can just pass 'email' 'password' to the inputs more info athttp://book.cakephp.org/view/182/formhttp://api.cakephp.org/class_form_helper.htmlhttp://www.donutczar.com/cake1point2/donuts/form_helper 2008/7/19 Parris [EMAIL PROTECTED]: ?php if ($error): ? pLogin Credentials do not match. Please try again./p ?php endif; ? form action=?php echo $html-url('/members/login'); ? method=post style=width:250px; div ?php echo $form-input('Member/email'); ? /div div ?php echo $form-password('Member/password'); ? /div div ?php echo $form-submit('Login'); ? /div /form A label gets output for input, but not for password. Also some style problems exist. This is with firefox 3, and I have cakePHP 1.2.0.7296 RC2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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: Quick help?
Oh that looks a lot better. It also adds a legend in there. I need to set it though, or for some reason I guess it was automatically becoming New Member. echo $form-inputs(array('Member.email','Member.password','legend' = 'Member Login')); On Jul 19, 11:28 am, Dardo Sordi Bogado [EMAIL PROTECTED] wrote: In 1.2 the new syntax for the model/form fields is Model.field ?php if ($error): ?;pLogin denied. Please try again./p?php endif; ? ?php echo $form-create('Member', array('type' = 'post', 'action' = 'login')); echo $form-input('Member.email'); echo $form-input('Member.password'); echo $form-end('Login'); ? Also if you are looking for a way to reduce lines... ?php echo $form-create('Member', array('type' = 'post', 'action' = 'login')), $form-inputs(array('email', 'password')), $form-end('Login'); ? On Sat, Jul 19, 2008 at 2:47 PM, Parris [EMAIL PROTECTED] wrote: Wow thanks for the help. Yea the cake book was down (it just came back up) for 1.2. This is what I came up with for a login form: ?php if ($error): echo pLogin denied. Please try again./p; endif; echo $form-create('Member',array('type' = 'post', 'action' = 'login')); echo $form-input('Member/email'); echo $form-input('Member/password'); echo $form-end('Login'); ? 7 lines of code for a login form? I could make a pun about how easy this is right now. On Jul 19, 10:32 am, Sam Sherlock [EMAIL PROTECTED] wrote: use input to generate labels with inputs (AFAIK if the name is password the type is automajically set to password) ?php echo $form-input('password', array('class' = 'required', 'tabindex' = '4')); ? $form-text, $form-password, $form-textarea are used when you don't want the label to be generated // a confirm password can be made setting the type in the options array ?php echo $form-input('confirm_password', array('type' = 'password', 'class' = 'required', 'tabindex' = '5')); ? also you can use $form-create('Member', Array('class' = 'hfrom', 'url' = '/members/login')) then you can just pass 'email' 'password' to the inputs more info athttp://book.cakephp.org/view/182/formhttp://api.cakephp.org/class_for... 2008/7/19 Parris [EMAIL PROTECTED]: ?php if ($error): ? pLogin Credentials do not match. Please try again./p ?php endif; ? form action=?php echo $html-url('/members/login'); ? method=post style=width:250px; div ?php echo $form-input('Member/email'); ? /div div ?php echo $form-password('Member/password'); ? /div div ?php echo $form-submit('Login'); ? /div /form A label gets output for input, but not for password. Also some style problems exist. This is with firefox 3, and I have cakePHP 1.2.0.7296 RC2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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 -~--~~~~--~~--~--~---
Question about associations, trying to retrieve table entries from another model
So I have a MVC for Events and Event Categories. I am trying to have the name of the category appear on the event page. I am associating events as belonging to event categories with a field called cat_id. I am able the retrieve the tables, but for some reason the event category part of the array ends up empty. Visually I am trying to make it look something like: Concert: Annual Event Where Concert is equal to a cat_name which is associated by cat_id(in the event table) = id(in the event categories table) and Annual Event is the event_title (in the event table). Also the word concert would be linked to show a category view Getting data from the event table is no problem. I used print_r($event[0]) to show data from the first entry: [code]Array ( [Event] = Array ( [id] = 6 [cat_id] = 1 [gallery_id] = 6 [event_title] = Test [event_date] = 2008-02-09 [event_hour] = 6 [event_minute] = 0 [event_ampm] = 1 [event_price] = 10.00 [event_tickets] = 6 [event_venue] = Venue [event_address] = Address [event_city] = San Jose [event_state] = CA [event_zip] = 95123 ) [EventCategory] = Array ( [id] = [cat_name] = [cat_description] = ) ) [/code] If you notice the EventCategory part of the array is empty for some reason Event Model: [code]?php class Event extends AppModel { var $name = 'Event'; var $hasOne = array( 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id' ) ); } ? [/code] Event Category Model: [code] ?php class EventCategory extends AppModel { var $name = 'EventCategory'; var $hasMany = array( 'Event' = array( 'className' = 'Recipe', 'order' = 'Reciped } ? [/code] Event Controller: [code] ?php class EventController extends AppController { var $name = 'Event'; function index() { $this-set('event', $this-Event-findAll()); } } ? [/code] Event Category Controller: [code] ?php class EventCategoryController extends AppController { var $name = 'EventCategory'; function index() { $this-set('eventcategory', $this-EventCategory-findAll()); } } ? [/code] Sorry, I know this is a bit lengthy, but I figured I would give a bunch of details rather than be vague. Hope someone can help. Also I don't thing their is a [code] tag here, but it separates things nicely anyways. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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 -~--~~~~--~~--~--~---
CakePHP belongsTo, associations, need help getting data from another table
So I have a MVC for Events and Event Categories. I am trying to have the name of the category appear on the event page. I am associating events as belonging to event categories with a field called cat_id. I am able the retrieve the tables, but for some reason the event category part of the array ends up empty. Visually I am trying to make it look something like: Concert: Annual Event Where Concert is equal to a cat_name which is associated by cat_id(in the event table) = id(in the event categories table) and Annual Event is the event_title (in the event table). Also the word concert would be linked to show a category view Getting data from the event table is no problem. I used print_r($event[0]) to show data from the first entry: [code]Array ( [Event] = Array ( [id] = 6 [cat_id] = 1 [gallery_id] = 6 [event_title] = Test [event_date] = 2008-02-09 [event_hour] = 6 [event_minute] = 0 [event_ampm] = 1 [event_price] = 10.00 [event_tickets] = 6 [event_venue] = Venue [event_address] = Address [event_city] = San Jose [event_state] = CA [event_zip] = 95123 ) [EventCategory] = Array ( [id] = [cat_name] = [cat_description] = ) ) [/code] If you notice the EventCategory part of the array is empty for some reason Event Model: [code]?php class Event extends AppModel { var $name = 'Event'; var $hasOne = array( 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id' ) ); } ? [/code] Event Category Model: [code] ?php class EventCategory extends AppModel { var $name = 'EventCategory'; var $hasMany = array( 'Event' = array( 'className' = 'Recipe', 'order' = 'Reciped } ? [/code] Event Controller: [code] ?php class EventController extends AppController { var $name = 'Event'; function index() { $this-set('event', $this-Event-findAll()); } } ? [/code] Event Category Controller: [code] ?php class EventCategoryController extends AppController { var $name = 'EventCategory'; function index() { $this-set('eventcategory', $this-EventCategory-findAll()); } } ? [/code] Sorry, I know this is a bit lengthy, but I figured I would give a bunch of details rather than be vague. Hope someone can help. Also I don't thing their is a [code] tag here, but it separates things nicely anyways. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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 -~--~~~~--~~--~--~---
CakePHP belongsTo, associations, need help getting data from another table
So I have a MVC for Events and Event Categories. I am trying to have the name of the category appear on the event page. I am associating events as belonging to event categories with a field called cat_id. I am able the retrieve the tables, but for some reason the event category part of the array ends up empty. Visually I am trying to make it look something like: Concert: Annual Event Where Concert is equal to a cat_name which is associated by cat_id(in the event table) = id(in the event categories table) and Annual Event is the event_title (in the event table). Also the word concert would be linked to show a category view Getting data from the event table is no problem. I used print_r($event[0]) to show data from the first entry: [code]Array ( [Event] = Array ( [id] = 6 [cat_id] = 1 [gallery_id] = 6 [event_title] = Test [event_date] = 2008-02-09 [event_hour] = 6 [event_minute] = 0 [event_ampm] = 1 [event_price] = 10.00 [event_tickets] = 6 [event_venue] = Venue [event_address] = Address [event_city] = San Jose [event_state] = CA [event_zip] = 95123 ) [EventCategory] = Array ( [id] = [cat_name] = [cat_description] = ) ) [/code] If you notice the EventCategory part of the array is empty for some reason Event Model: [code]?php class Event extends AppModel { var $name = 'Event'; var $hasOne = array( 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id' ) ); } ? [/code] Event Category Model: [code] ?php class EventCategory extends AppModel { var $name = 'EventCategory'; var $hasMany = array( 'Event' = array( 'className' = 'Recipe', 'order' = 'Reciped } ? [/code] Event Controller: [code] ?php class EventController extends AppController { var $name = 'Event'; function index() { $this-set('event', $this-Event-findAll()); } } ? [/code] Event Category Controller: [code] ?php class EventCategoryController extends AppController { var $name = 'EventCategory'; function index() { $this-set('eventcategory', $this-EventCategory-findAll()); } } ? [/code] Sorry, I know this is a bit lengthy, but I figured I would give a bunch of details rather than be vague. Hope someone can help. Also I don't thing their is a [code] tag here, but it separates things nicely anyways. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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 -~--~~~~--~~--~--~---
CakePHP belongsTo, associations, need help getting data from another table
So I have a MVC for Events and Event Categories. I am trying to have the name of the category appear on the event page. I am associating events as belonging to event categories with a field called cat_id. I am able the retrieve the tables, but for some reason the event category part of the array ends up empty. Visually I am trying to make it look something like: Concert: Annual Event Where Concert is equal to a cat_name which is associated by cat_id(in the event table) = id(in the event categories table) and Annual Event is the event_title (in the event table). Also the word concert would be linked to show a category view Getting data from the event table is no problem. I used print_r($event[0]) to show data from the first entry: [code]Array ( [Event] = Array ( [id] = 6 [cat_id] = 1 [gallery_id] = 6 [event_title] = Test [event_date] = 2008-02-09 [event_hour] = 6 [event_minute] = 0 [event_ampm] = 1 [event_price] = 10.00 [event_tickets] = 6 [event_venue] = Venue [event_address] = Address [event_city] = San Jose [event_state] = CA [event_zip] = 95123 ) [EventCategory] = Array ( [id] = [cat_name] = [cat_description] = ) ) [/code] If you notice the EventCategory part of the array is empty for some reason Event Model: [code]?php class Event extends AppModel { var $name = 'Event'; var $hasOne = array( 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id' ) ); } ? [/code] Event Category Model: [code] ?php class EventCategory extends AppModel { var $name = 'EventCategory'; var $hasMany = array( 'Event' = array( 'className' = 'Recipe', 'order' = 'Reciped } ? [/code] Event Controller: [code] ?php class EventController extends AppController { var $name = 'Event'; function index() { $this-set('event', $this-Event-findAll()); } } ? [/code] Event Category Controller: [code] ?php class EventCategoryController extends AppController { var $name = 'EventCategory'; function index() { $this-set('eventcategory', $this-EventCategory-findAll()); } } ? [/code] Sorry, I know this is a bit lengthy, but I figured I would give a bunch of details rather than be vague. Hope someone can help. Also I don't thing their is a [code] tag here, but it separates things nicely anyways. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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: The First CakePHP Book is out!
Woo I just bought it online. So far it seems pretty cool :)! On Jul 16, 2:47 am, Ahsan [EMAIL PROTECTED] wrote: Hi guys, its not much that I write in this group lately, but couldn't stop myself from sharing a good news. Packt Pub has published a book named CakePHP Application Development. It has been co-authored by Anupom and me. http://www.packtpub.com/cakephp-application-development/book Basically, its a good book for beginners in CakePHP. I am eager to know what you guys think about it. I would like to thank the whole CakePHP community for helping us (both directly and indirectly) in writing this book. Thanks -- Ahsanul Bari Web Programmer Trippert Labs, Inc. Blog: [http://ahsanity.com] LinkedIn Profile: [http://www.linkedin.com/in/ahsanulbari] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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 -~--~~~~--~~--~--~---
For some reason cake does not like this controller name to be plural?
Cake is telling me: Missing Controller Error: EventController could not be found. Error: Create the class EventController below in file: app/controllers/ event_controller.php ?php class EventController extends AppController { var $name = 'Event'; } ? My Event Model (event.php in /models): ?php class Event extends AppModel { var $name = 'Event'; var $useTable = 'events'; var $hasOne = array( 'GalleryCategory' = array( 'className' = 'GalleryCategory', 'foreignKey' = 'id', 'associationForeignKey' = 'gallery_id', 'joinTable' = 'gallery_categories' ), 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id', 'associationForeignKey' = 'cat_id', 'joinTable' = 'event_categories' ) ); } ? Events Controllers (events_controller.php in /controllers): ?php class EventsController extends AppController { var $name = 'Events'; function index() { $this-set('events', $this-Event-findAll()); } } ? When I make it singular it works for the most part; however, the association event_categories doesn't work quite right. It will display the name of each column within the array, but the values for those items end up blank. I think for some reason it is steming from this singular plural issue. Even if it isn't, I really need to fix this problem before i go on. The most interesting thing is that the association with GalleryCategory works just fine and all the values in the array work perfectly. I have been stuck along all of these issues for the past couple days. I have made soo many searches on this. Read and reread all the conventions. I have no idea where to turn. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP belongsTo, associations, need help getting data from another table
That didn't seem to make a difference... I closed my other post about cake not letting me make my controller name plural and reposted it here. I feel like this is a related issue. I have another model and controller that Event belongsTo and that seems to work fine. I think there is something wrong with the way I created something. To make this all work right now I have to call my model event.php (Event) and my controller event_controller.php(Event_Controller) or else cake will tell me the following: Missing Controller Error: EventController could not be found. Error: Create the class EventController below in file: app/ controllers/ event_controller.php ?php class EventController extends AppController { var $name = 'Event'; } ? My Event Model (event.php in /models): ?php class Event extends AppModel { var $name = 'Event'; var $useTable = 'events'; var $belongsTo = array( 'GalleryCategory' = array( 'className' = 'GalleryCategory', 'foreignKey' = 'id', 'associationForeignKey' = 'gallery_id', 'joinTable' = 'gallery_categories' ), 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id', 'associationForeignKey' = 'cat_id', 'joinTable' = 'event_categories' ) ); } ? Events Controllers (events_controller.php in /controllers): ?php class EventsController extends AppController { var $name = 'Events'; function index() { $this-set('events', $this-Event-findAll()); } } ? Look to my previous post for the info on event_categories. I was able to rename that controller and make it plural; however, it wont let me with the event controller. I have made soo many searches on this. Read and reread all the conventions. I have no idea where to turn. On Jul 18, 1:07 am, grigri [EMAIL PROTECTED] wrote: Use a `belongsTo`, not a `hasOne`. On Jul 18, 3:52 am, Parris [EMAIL PROTECTED] wrote: So I have a MVC for Events and Event Categories. I am trying to have the name of the category appear on the event page. I am associating events as belonging to event categories with a field called cat_id. I am able the retrieve the tables, but for some reason the event category part of the array ends up empty. Visually I am trying to make it look something like: Concert: Annual Event Where Concert is equal to a cat_name which is associated by cat_id(in the event table) = id(in the event categories table) and Annual Event is the event_title (in the event table). Also the word concert would be linked to show a category view Getting data from the event table is no problem. I used print_r($event[0]) to show data from the first entry: [code]Array ( [Event] = Array ( [id] = 6 [cat_id] = 1 [gallery_id] = 6 [event_title] = Test [event_date] = 2008-02-09 [event_hour] = 6 [event_minute] = 0 [event_ampm] = 1 [event_price] = 10.00 [event_tickets] = 6 [event_venue] = Venue [event_address] = Address [event_city] = San Jose [event_state] = CA [event_zip] = 95123 ) [EventCategory] = Array ( [id] = [cat_name] = [cat_description] = ) ) [/code] If you notice the EventCategory part of the array is empty for some reason Event Model: [code]?php class Event extends AppModel { var $name = 'Event'; var $hasOne = array( 'EventCategory' = array( 'className' = 'EventCategory', 'foreignKey' = 'id' ) );} ? [/code] Event Category Model: [code] ?php class EventCategory extends AppModel { var $name = 'EventCategory'; var $hasMany = array( 'Event' = array( 'className' = 'Recipe', 'order' = 'Reciped} ? [/code] Event Controller: [code] ?php class EventController extends AppController { var $name = 'Event'; function index() { $this-set('event', $this-Event-findAll()); }} ? [/code] Event Category Controller: [code] ?php class EventCategoryController extends AppController { var $name = 'EventCategory'; function index() { $this-set('eventcategory', $this-EventCategory-findAll()); }} ? [/code] Sorry, I know this is a bit lengthy, but I figured I would give a bunch of details rather than be vague. Hope someone can help. Also I don't thing their is a [code] tag here, but it separates things nicely anyways. --~--~-~--~~~---~--~~ You received
Re: The First CakePHP Book is out!
I love the book it helped me out a lot and it solved some of my issues that I was having. I found some typos though. In chapter 6 when you talk about $belongsTo and different associations you name the model files plurally. This won't work and the association will break. I'll make more notes. On Jul 16, 2:47 am, Ahsan [EMAIL PROTECTED] wrote: Hi guys, its not much that I write in this group lately, but couldn't stop myself from sharing a good news. Packt Pub has published a book named CakePHP Application Development. It has been co-authored by Anupom and me. http://www.packtpub.com/cakephp-application-development/book Basically, its a good book for beginners in CakePHP. I am eager to know what you guys think about it. I would like to thank the whole CakePHP community for helping us (both directly and indirectly) in writing this book. Thanks -- Ahsanul Bari Web Programmer Trippert Labs, Inc. Blog: [http://ahsanity.com] LinkedIn Profile: [http://www.linkedin.com/in/ahsanulbari] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP 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 -~--~~~~--~~--~--~---