Re: CakeAdvent 2014
Here's part 7 of the CakeAdvent Calendar, where I cover the new AppView class and building a simple MarkdownHelper: - Parsing markdown comments and using the AppView class http://bit.ly/cakeadvent-2014-7 On Sat, Dec 6, 2014 at 7:49 PM, Jose Diaz-Gonzalez j...@savant.be wrote: My previous email had the wrong link for the first post, it is actually this http://bit.ly/cakeadvent-2014-05. Sorry about that. On Sat, Dec 6, 2014 at 7:48 PM, Jose Diaz-Gonzalez j...@savant.be wrote: Here are parts 4 and 5 of the CakePHP 3 CakeAdvent Calendar! - Creating Table Callback events and making HTTP request http://bit.ly/cakeadvent-2014-6 - Emailing users when a new comment is posted http://bit.ly/cakeadvent-2014-6 On Thu, Dec 4, 2014 at 6:22 PM, Jose Diaz-Gonzalez j...@savant.be wrote: For those following allowing, here is the third post in our 7-part tutorial series: - Schema Migrations with CakePHP 3 http://bit.ly/cakeadvent-2014-4 Let me know in the comments or here what parts of CakePHP you'd like me to cover, and enjoy! On Thu, Dec 4, 2014 at 6:04 AM, Leandro Machado Pereira llperei...@gmail.com wrote: Thank you José, it's awesome! Em qui, 4 de dez de 2014 01:17, Jose Diaz-Gonzalez j...@savant.be escreveu: Hi All! My name is Jose Diaz-Gonzalez, one of the core developers of CakePHP. You may have seen me in some of your codebases (especially if you use cakephp-upload) or from homebrew-php. But I'm not here about that. Like last year http://josediazgonzalez.com/2013/12/01/testing-your-cakephp-plugins-with-travis/, we're having a CakePHP Advent Calendar. 25 posts about CakePHP in the month of December. But unlike last years - which were self-contained tutorials - this years is a series of 3 tutorials where we will build fully working applications. If you've bought my CakePHP 2 book http://josediazgonzalez.com/cakephp-book/, it's in the same style of writing with a bit less hand-holding. These three tutorials will be 7 posts each, and completely free. Wanted to use bake but found it hard? Need to know how to implement events in a production application? Confused about how to integrate payment processing in your application? Do you want to build api's but are having a bad time? These tutorials are for you. Consider them a present from the core developers to the CakePHP community. I'll be posting a new post each day, and will be updating this thread with each one. Since I forget sometimes about google groups, feel free to beat me to the punch. Here are the first three in the series: - Introducing the CakePHP Advent Calendar 2014 http://bit.ly/cakeadvent-2014-1 - Designing an anonymous issue tracker in CakePHP http://bit.ly/cakeadvent-2014-2 - Customizing Bake in CakePHP 3 http://bit.ly/cakeadvent-2014-3 Let me know how you like the tutorials - or not - and how I can improve in comments on the posts or in this thread. Happy holidays! Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: CakeAdvent 2014
Here are parts 4 and 5 of the CakePHP 3 CakeAdvent Calendar! - Creating Table Callback events and making HTTP request http://bit.ly/cakeadvent-2014-6 - Emailing users when a new comment is posted http://bit.ly/cakeadvent-2014-6 On Thu, Dec 4, 2014 at 6:22 PM, Jose Diaz-Gonzalez j...@savant.be wrote: For those following allowing, here is the third post in our 7-part tutorial series: - Schema Migrations with CakePHP 3 http://bit.ly/cakeadvent-2014-4 Let me know in the comments or here what parts of CakePHP you'd like me to cover, and enjoy! On Thu, Dec 4, 2014 at 6:04 AM, Leandro Machado Pereira llperei...@gmail.com wrote: Thank you José, it's awesome! Em qui, 4 de dez de 2014 01:17, Jose Diaz-Gonzalez j...@savant.be escreveu: Hi All! My name is Jose Diaz-Gonzalez, one of the core developers of CakePHP. You may have seen me in some of your codebases (especially if you use cakephp-upload) or from homebrew-php. But I'm not here about that. Like last year http://josediazgonzalez.com/2013/12/01/testing-your-cakephp-plugins-with-travis/, we're having a CakePHP Advent Calendar. 25 posts about CakePHP in the month of December. But unlike last years - which were self-contained tutorials - this years is a series of 3 tutorials where we will build fully working applications. If you've bought my CakePHP 2 book http://josediazgonzalez.com/cakephp-book/, it's in the same style of writing with a bit less hand-holding. These three tutorials will be 7 posts each, and completely free. Wanted to use bake but found it hard? Need to know how to implement events in a production application? Confused about how to integrate payment processing in your application? Do you want to build api's but are having a bad time? These tutorials are for you. Consider them a present from the core developers to the CakePHP community. I'll be posting a new post each day, and will be updating this thread with each one. Since I forget sometimes about google groups, feel free to beat me to the punch. Here are the first three in the series: - Introducing the CakePHP Advent Calendar 2014 http://bit.ly/cakeadvent-2014-1 - Designing an anonymous issue tracker in CakePHP http://bit.ly/cakeadvent-2014-2 - Customizing Bake in CakePHP 3 http://bit.ly/cakeadvent-2014-3 Let me know how you like the tutorials - or not - and how I can improve in comments on the posts or in this thread. Happy holidays! Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: CakeAdvent 2014
My previous email had the wrong link for the first post, it is actually this http://bit.ly/cakeadvent-2014-05. Sorry about that. On Sat, Dec 6, 2014 at 7:48 PM, Jose Diaz-Gonzalez j...@savant.be wrote: Here are parts 4 and 5 of the CakePHP 3 CakeAdvent Calendar! - Creating Table Callback events and making HTTP request http://bit.ly/cakeadvent-2014-6 - Emailing users when a new comment is posted http://bit.ly/cakeadvent-2014-6 On Thu, Dec 4, 2014 at 6:22 PM, Jose Diaz-Gonzalez j...@savant.be wrote: For those following allowing, here is the third post in our 7-part tutorial series: - Schema Migrations with CakePHP 3 http://bit.ly/cakeadvent-2014-4 Let me know in the comments or here what parts of CakePHP you'd like me to cover, and enjoy! On Thu, Dec 4, 2014 at 6:04 AM, Leandro Machado Pereira llperei...@gmail.com wrote: Thank you José, it's awesome! Em qui, 4 de dez de 2014 01:17, Jose Diaz-Gonzalez j...@savant.be escreveu: Hi All! My name is Jose Diaz-Gonzalez, one of the core developers of CakePHP. You may have seen me in some of your codebases (especially if you use cakephp-upload) or from homebrew-php. But I'm not here about that. Like last year http://josediazgonzalez.com/2013/12/01/testing-your-cakephp-plugins-with-travis/, we're having a CakePHP Advent Calendar. 25 posts about CakePHP in the month of December. But unlike last years - which were self-contained tutorials - this years is a series of 3 tutorials where we will build fully working applications. If you've bought my CakePHP 2 book http://josediazgonzalez.com/cakephp-book/, it's in the same style of writing with a bit less hand-holding. These three tutorials will be 7 posts each, and completely free. Wanted to use bake but found it hard? Need to know how to implement events in a production application? Confused about how to integrate payment processing in your application? Do you want to build api's but are having a bad time? These tutorials are for you. Consider them a present from the core developers to the CakePHP community. I'll be posting a new post each day, and will be updating this thread with each one. Since I forget sometimes about google groups, feel free to beat me to the punch. Here are the first three in the series: - Introducing the CakePHP Advent Calendar 2014 http://bit.ly/cakeadvent-2014-1 - Designing an anonymous issue tracker in CakePHP http://bit.ly/cakeadvent-2014-2 - Customizing Bake in CakePHP 3 http://bit.ly/cakeadvent-2014-3 Let me know how you like the tutorials - or not - and how I can improve in comments on the posts or in this thread. Happy holidays! Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: CakeAdvent 2014
For those following allowing, here is the third post in our 7-part tutorial series: - Schema Migrations with CakePHP 3 http://bit.ly/cakeadvent-2014-4 Let me know in the comments or here what parts of CakePHP you'd like me to cover, and enjoy! On Thu, Dec 4, 2014 at 6:04 AM, Leandro Machado Pereira llperei...@gmail.com wrote: Thank you José, it's awesome! Em qui, 4 de dez de 2014 01:17, Jose Diaz-Gonzalez j...@savant.be escreveu: Hi All! My name is Jose Diaz-Gonzalez, one of the core developers of CakePHP. You may have seen me in some of your codebases (especially if you use cakephp-upload) or from homebrew-php. But I'm not here about that. Like last year http://josediazgonzalez.com/2013/12/01/testing-your-cakephp-plugins-with-travis/, we're having a CakePHP Advent Calendar. 25 posts about CakePHP in the month of December. But unlike last years - which were self-contained tutorials - this years is a series of 3 tutorials where we will build fully working applications. If you've bought my CakePHP 2 book http://josediazgonzalez.com/cakephp-book/, it's in the same style of writing with a bit less hand-holding. These three tutorials will be 7 posts each, and completely free. Wanted to use bake but found it hard? Need to know how to implement events in a production application? Confused about how to integrate payment processing in your application? Do you want to build api's but are having a bad time? These tutorials are for you. Consider them a present from the core developers to the CakePHP community. I'll be posting a new post each day, and will be updating this thread with each one. Since I forget sometimes about google groups, feel free to beat me to the punch. Here are the first three in the series: - Introducing the CakePHP Advent Calendar 2014 http://bit.ly/cakeadvent-2014-1 - Designing an anonymous issue tracker in CakePHP http://bit.ly/cakeadvent-2014-2 - Customizing Bake in CakePHP 3 http://bit.ly/cakeadvent-2014-3 Let me know how you like the tutorials - or not - and how I can improve in comments on the posts or in this thread. Happy holidays! Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
CakeAdvent 2014
Hi All! My name is Jose Diaz-Gonzalez, one of the core developers of CakePHP. You may have seen me in some of your codebases (especially if you use cakephp-upload) or from homebrew-php. But I'm not here about that. Like last year http://josediazgonzalez.com/2013/12/01/testing-your-cakephp-plugins-with-travis/, we're having a CakePHP Advent Calendar. 25 posts about CakePHP in the month of December. But unlike last years - which were self-contained tutorials - this years is a series of 3 tutorials where we will build fully working applications. If you've bought my CakePHP 2 book http://josediazgonzalez.com/cakephp-book/, it's in the same style of writing with a bit less hand-holding. These three tutorials will be 7 posts each, and completely free. Wanted to use bake but found it hard? Need to know how to implement events in a production application? Confused about how to integrate payment processing in your application? Do you want to build api's but are having a bad time? These tutorials are for you. Consider them a present from the core developers to the CakePHP community. I'll be posting a new post each day, and will be updating this thread with each one. Since I forget sometimes about google groups, feel free to beat me to the punch. Here are the first three in the series: - Introducing the CakePHP Advent Calendar 2014 http://bit.ly/cakeadvent-2014-1 - Designing an anonymous issue tracker in CakePHP http://bit.ly/cakeadvent-2014-2 - Customizing Bake in CakePHP 3 http://bit.ly/cakeadvent-2014-3 Let me know how you like the tutorials - or not - and how I can improve in comments on the posts or in this thread. Happy holidays! Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Plugin login problem
The Form::create() call was done incorrectly, it should be: $this-Form-create('User', array('url' = array('admin' = false, 'plugin' = null, 'controller' = 'users', 'action' = 'login'))); On Thursday, November 6, 2014 5:11:36 AM UTC-5, Lucky1968 wrote: Hi, I'm using CakePHP 2.3.10 and I have a problem with a login form in my header. When the login form is used from within a plugin view it sends the form to /plugin_name/users/login instead of to /users/login. I have found numerous posts on this topic and all state the same: I need to add *'plugin' = null* or *'plugin' = false* at some places. But that I did already from the beginning and I still have the problem. Can anyone tell me what's wrong with my code? Here's my code: AppController.php public function beforeFilter() { ... $this-Auth-loginAction = array(*'plugin' = null*, 'controller' = 'users', 'action' = 'login'); ... } UsersController.php public function beforeFilter() { parent::beforeFilter(); ... } PluginAppController.php public function beforeFilter() { parent::beforeFilter(); } In the element used by the selected layout: ?php echo $this-Form-create('User', array('admin' = false, *'plugin' = null*, 'controller' = 'users', 'action' = 'login')); ? I also tried with *'plugin' = false* but the results are the same. Thanks for any help. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Error: Class 'SimplePasswordHasher' not found
Hi all, I am receiving this message * Error:Class 'SimplePasswordHasher' not found *I am following the tutorial http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html for Simple Authentication and Authorization. I found this thread https://groups.google.com/forum/#!topic/cake-php/wL6f3MG_M8c but it doesn't have an answer for me . Any suggestions? I have this at top of User.php is models App::uses('SimplePasswordHasher','Controlller/Component/Auth'); -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out. attachment: User.php
CakeAdvent Day 15 and 16: Payment Processing and Hacking the Event System
CakeAdvent Day 15 integrates CakePHP with Stripe, a popular payment processor, in an easy to follow way: http://josediazgonzalez.com/2013/12/15/payment-processing-using-stripe/ CakeAdvent Day 16 sets up annotations and more for use with the CakePHP Event System. Many of you may be familiar with annotations from other frameworks and languages, and they work no differently here :) http://josediazgonzalez.com/2013/12/15/simpler-cakephp-events/ As always, comments and sharing welcome! Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
CakeAdvent: Dispatch filters, Asset Compression, Composer, OAuth and more!
Hi all! I'm here to remind you all to read the CakeAdvent series! There have been quite a few new posts, covering a few interesting topics: - Asset compression - Composer usage and composer app templates - OAuth integration - Background queuing systems - Custom Exception handlers - Dispatch filters - Class aliasing Here is a quick listing: Part 6 - Building Service Classeshttp://josediazgonzalez.com/2013/12/06/building-service-classes/ Part 7 - A quick rundown on Asset Compressionhttp://josediazgonzalez.com/2013/12/07/a-quick-rundown-on-asset-compression/ Part 8 - Composing your applications from pluginshttp://josediazgonzalez.com/2013/12/08/composing-your-applications-from-plugins/ Part 9 - Simplifying OAuth integrationhttp://josediazgonzalez.com/2013/12/09/simplifying-oauth-integration/ Part 10 - Queue in scalable applicationshttp://josediazgonzalez.com/2013/12/10/queue-in-scalable-applications/ Part 11 - Giving the gift of CakePHP to the Communityhttp://josediazgonzalez.com/2013/12/11/giving-the-gift-of-cakephp-to-the-community/ Part 12 - Abusing Exceptions to provide model-layer redirectionhttp://josediazgonzalez.com/2013/12/12/abusing-exceptions-to-provide-model-layer-redirection/ Part 13 - Simple application maintenance modehttp://josediazgonzalez.com/2013/12/13/simple-application-maintenance-mode/ Part 14 - Creating a custom session flash handlerhttp://josediazgonzalez.com/2013/12/14/creating-a-custom-session-flash-handler/ I'll be sending the posts in to the google groups more often now. There will be 12 more posts, covering a similarly wide-range of topics. Here's to 12 more days of Advent Calendar! Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Cakephp Website Project
The whole codebase can be written in CakePHP, and CakePHP can be used with any Javascript framework you'd like to use. On Tue, Dec 10, 2013 at 2:34 PM, Dean Haines vbpu...@gmail.com wrote: hi guys, im just about to embark on a new project whereby my custoer requires a backen which will allow administrators to add and manage a large product catalog which will feed a website shop front end. I am new to cakephp and after some research would like to build the project using cakephp. am I right in thinking that only the backend can be written using cakephp? im assuming it is and the front end would be written by hand. I would ver much be interested to her what others have done. Thanks in advance. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
CakeAdvent Day 5: Using Model Objects in your CakePHP 2.0 Applications
CakeAdvent Day 5: Late, but still good. Covers using Objects in CakePHP 2.x applications, with a sneak-peak as to what we'll be seeing in the 3.x ORM. http://josediazgonzalez.com/2013/12/05/objectifying-cakephp-2-0-applications/ If we have any redditors out there, please upvote my post in the CakePHP subreddit! Some activity there is *always* welcome :) As always, questions and comments welcome. Feel free to ask about something specific and it may show up in an upcoming CakePHP Advent Calendar post! - Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
CakeAdvent Day 4: Interactive command-line REPL for CakePHP
http://josediazgonzalez.com/2013/12/04/interactive-command-line-repl/ The latest post is up, and I write briefly about how to setup 3 different command-line interfaces for interactively running CakePHP code. If you are familiar with *irb* from Ruby, or *ipython* in the Python world, then this is something that may interest you! If you've missed the lineup thus far, here it is: - Part 1 - Testing your CakePHP Plugins with Travishttp://josediazgonzalez.com/2013/12/01/testing-your-cakephp-plugins-with-travis/ - Part 2 - Fun with CakePHP Viewshttp://josediazgonzalez.com/2013/12/02/fun-with-cakephp-views/ - Part 3 - Hacking the CakePHP Dispatch Systemhttp://josediazgonzalez.com/2013/12/03/hacking-the-cakephp-dispatch-system/ - Part 4 - Interactive command-line REPL for CakePHPhttp://josediazgonzalez.com/2013/12/04/interactive-command-line-repl/ As always, feel free to comment here or there :) Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
CakeAdvent: Hacking the CakePHP Dispatch System
Hi all! I'm Jose Diaz-Gonzalez (@savant on twitter https://twitter.com/savant and irc, josegonzalez on github https://github.com/josegonzalez/). I'm a core developer on the CakePHP framework and a long-time open source contributor. I am not to be confused with Jose Lorenzo (jose_zap), as I'm at least twice as handsome with 3x the hair. I've been writing a series of posts for CakeAdvent, the CakePHP Advent calendar. I'll be taking apart various bits of the CakePHP framework. Sometimes it'll be for something useful, and sometimes you'll wish you never knew this was possible. Hopefully it's useful information! I'm on post number three, Hacking the CakePHP Dispatch System. Please read it if you are interested in micro-frameworks or in creating custom dispatch filters. If anyone has any questions, feel free to comment on the posts on my blog. Also feel free to respond to this email with suggestions for posts, as I am more than happy to tear CakePHP to shreds in search of answers! Link to post: http://josediazgonzalez.com/2013/12/03/hacking-the-cakephp-dispatch-system/ - (little) Jose -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Problem with install cakephp 2.3.8 in System OS/400 Power 7
Hi all, please help with error in cakephp 2.3.8 my default page into a fresh instalation of cakephp in a System OS/400 Power7 report the next error: FileEngine Object [_File:protected]= SplFileObject Object error complete here: http://bin.cakephp.org/saved/106039 PHP VERSION: 5.4.16 APACHE VERSION: 2.2.11 CAKEPHP VERSION: 2.3.8 The owner the directory app/tmp is the owner the apache server, the permisions the tmp is correct. Thank for your time!! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Error try to run Cake interactive Console (not bake)
Hi bakers, I am trying to run the interactive cake console, for play with my models, but I get the follow message https://lh3.googleusercontent.com/-n2hFGG2QQzA/Ue7lN1ANYJI/DAM/LXmPePwb--A/s1600/cake-console.gif CakePHP 2.3.7 Windows 7 PHP 5.4.3 Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Hi I am new here and I need some assistance
Hi Jeet, I dont have public_html/app/Vendors, this is why I put the php_sdk folder inside the vendors folder, outside the app folder, because I dont have it. I am sending you an screen shot: http://prntscr.com/18yung These are my public_html files. El martes, 4 de junio de 2013 04:54:27 UTC-5, jeet bajaj escribió: Brother you have to move php_sdk folder from public-html/vendors/php_sdk/ to public-html/app/Vendors/php_sdk/, i think you have put the php_sdk folder inside the vendors folder outside of app folder. try this, it will work...:-) On Tue, Jun 4, 2013 at 3:00 PM, Jose Antonio Amuchastegui cju...@gmail.com javascript: wrote: Hi Jeet I am sorry disturbing again. I have done the following: 1.- Create a folder on: public_html/vendors/php_sdk This folder contains: src folder (files downloaded from facebook php sdk) Screenshot: http://prntscr.com/187ag0 Screenshot: http://prntscr.com/187ahv 2.- I make a function at appcontroller.php (public_html/controllers/app_controller.php The original file was: ?php class AppController extends Controller { var $helpers = array( 'Skitter' ); } ? And after my function is: ?php class AppController extends Controller { var $helpers = array( 'Skitter' ); } public function fbConnect() { App::import('Vendor', 'src/facebook'); $config = array( 'appId' = '291063454361392', 'secret' = 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? return $facebook; } ? Now, in the page I want to set the multi friend request dialog I set this: html xmlns=http://www.w3.org/1999/xhtml; xmlns:fb=https://www.facebook.com/2008/fbml; head titleInvita a tus amigos/title /head body p nbsp;/p div id=fb-root nbsp;/div script src=http://connect.facebook.net/es_ES/all.js; /script h1 style=margin-left: 40px; Invita a tus amigos en Facebook/h1 p style=margin-left: 40px; button class=btn id=send-to-manyInvitalos/button script FB.init({ appId : '291063454361392', frictionlessRequests: true }); function sendRequestViaMultiFriendSelector() { FB.ui({method: 'apprequests', message: 'My Great Request' }, requestCallback); } function requestCallback(response) { // Handle callback here } /script Well, the result is this: http://prntscr.com/187ayc But, this button neither call the facebook appi: The result i am looking is something like this: http://prntscr.com/187b13 Can you guide me a little more please. El martes, 28 de mayo de 2013 23:38:36 UTC-5, jeet bajaj escribió: Hey Jose! As you said your website is made up on CAKEPHP, then i will suggest to instead to placing the file you download from github public_htm directory. You put those files in \app\Vendor folder. and remove the code whatever you have written in index.php. Beside this i will suggest to make a function in AppController.php file like public function fbConnect() { App::import('Vendor', 'src/facebook'); $config = array( 'appId' = '291063454361392', 'secret' = '**a2cf7f82bb6e18bece7eef282d9f9c**e7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? return $facebook; } I must help you. On Tue, May 28, 2013 at 4:26 AM, Jose Antonio Amuchastegui cju...@gmail.com wrote: HI I am not a developer, I am trying to learn php and cakephp and now I am trying to set a facebook appi, multi friend request dialog. I have read dozens of tutorials, pages, facebook wiki, facebook documentation, so I am trying to follow the instructions I have gathered. 1.- I have registered my facebook appi and get my appId and secret key. 2.- Downloaded the github files: My site is based on cakephp, so everything is at public_html directory in my server. 3.- Inside this public_html I create a directory named: php-sdk 4.- Inside I uploaded (ftp) the src file I downloaded from github 5.- Inside I created an index.php file: ?php require_once(src/facebook.**php); $config = array( 'appId' = '291063454361392', 'secret' = '**a2cf7f82bb6e18bece7eef282d9f9c**e7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? As I understood, this should let me use facebook sdk, so I went to my software. Inside the page of my software (template_page_facebook) where I want to enable the Multi Friend Selector Dialog, I wrote this: HTML xmlns = http://www.w3.org/1999/xhtml; xmlns: fb = INVITA A TODOS TUS AMIGOS EN FACEBOOK head title INVITA A TODOS TUS AMIGOS EN FACEBOOK /title /head body div id=fb-root /div script src=http://connect.facebook
Re: Hi I am new here and I need some assistance
Hi Jeet I am sorry disturbing again. I have done the following: 1.- Create a folder on: public_html/vendors/php_sdk This folder contains: src folder (files downloaded from facebook php sdk) Screenshot: http://prntscr.com/187ag0 Screenshot: http://prntscr.com/187ahv 2.- I make a function at appcontroller.php (public_html/controllers/app_controller.php The original file was: ?php class AppController extends Controller { var $helpers = array( 'Skitter' ); } ? And after my function is: ?php class AppController extends Controller { var $helpers = array( 'Skitter' ); } public function fbConnect() { App::import('Vendor', 'src/facebook'); $config = array( 'appId' = '291063454361392', 'secret' = 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? return $facebook; } ? Now, in the page I want to set the multi friend request dialog I set this: html xmlns=http://www.w3.org/1999/xhtml; xmlns:fb=https://www.facebook.com/2008/fbml; head titleInvita a tus amigos/title /head body p nbsp;/p div id=fb-root nbsp;/div script src=http://connect.facebook.net/es_ES/all.js; /script h1 style=margin-left: 40px; Invita a tus amigos en Facebook/h1 p style=margin-left: 40px; button class=btn id=send-to-manyInvitalos/button script FB.init({ appId : '291063454361392', frictionlessRequests: true }); function sendRequestViaMultiFriendSelector() { FB.ui({method: 'apprequests', message: 'My Great Request' }, requestCallback); } function requestCallback(response) { // Handle callback here } /script Well, the result is this: http://prntscr.com/187ayc But, this button neither call the facebook appi: The result i am looking is something like this: http://prntscr.com/187b13 Can you guide me a little more please. El martes, 28 de mayo de 2013 23:38:36 UTC-5, jeet bajaj escribió: Hey Jose! As you said your website is made up on CAKEPHP, then i will suggest to instead to placing the file you download from github public_htm directory. You put those files in \app\Vendor folder. and remove the code whatever you have written in index.php. Beside this i will suggest to make a function in AppController.php file like public function fbConnect() { App::import('Vendor', 'src/facebook'); $config = array( 'appId' = '291063454361392', 'secret' = 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? return $facebook; } I must help you. On Tue, May 28, 2013 at 4:26 AM, Jose Antonio Amuchastegui cju...@gmail.com javascript: wrote: HI I am not a developer, I am trying to learn php and cakephp and now I am trying to set a facebook appi, multi friend request dialog. I have read dozens of tutorials, pages, facebook wiki, facebook documentation, so I am trying to follow the instructions I have gathered. 1.- I have registered my facebook appi and get my appId and secret key. 2.- Downloaded the github files: My site is based on cakephp, so everything is at public_html directory in my server. 3.- Inside this public_html I create a directory named: php-sdk 4.- Inside I uploaded (ftp) the src file I downloaded from github 5.- Inside I created an index.php file: ?php require_once(src/facebook.php); $config = array( 'appId' = '291063454361392', 'secret' = 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? As I understood, this should let me use facebook sdk, so I went to my software. Inside the page of my software (template_page_facebook) where I want to enable the Multi Friend Selector Dialog, I wrote this: HTML xmlns = http://www.w3.org/1999/xhtml; xmlns: fb = INVITA A TODOS TUS AMIGOS EN FACEBOOK head title INVITA A TODOS TUS AMIGOS EN FACEBOOK /title /head body div id=fb-root /div script src=http://connect.facebook.net/es_ES/all.js; /script h1INVITA A TODOS TUS AMIGOS EN FACEBOOK/h1 button class=btn id=send-to-manyInvitalos/button script sendRequestToRecipients function () { var user_ids = document.getElementsByName (user_ids) [0] Valor.; FB.ui ({method: 'apprequests', message: 'Mi gran solicitud.' a: 'user_ids', }, Log.info.bind('send-to-many callback')); } FB.init ({ Id de aplicación: '291063454361392 ', status: true, // comprobar estado de login cookie: true, // habilitar cookies para permitir al servidor acceder a la sesión sfbml: true, // ejecutar código XFBML channel: true, channelURL : 'http://www.mywebsite.com/channel.html', // fichero
Re: Hi I am new here and I need some assistance
Hi Really thanks, I will attempt this and I will keep you informed. Too many thanks El martes, 28 de mayo de 2013 23:38:36 UTC-5, jeet bajaj escribió: Hey Jose! As you said your website is made up on CAKEPHP, then i will suggest to instead to placing the file you download from github public_htm directory. You put those files in \app\Vendor folder. and remove the code whatever you have written in index.php. Beside this i will suggest to make a function in AppController.php file like public function fbConnect() { App::import('Vendor', 'src/facebook'); $config = array( 'appId' = '291063454361392', 'secret' = 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? return $facebook; } I must help you. On Tue, May 28, 2013 at 4:26 AM, Jose Antonio Amuchastegui cju...@gmail.com javascript: wrote: HI I am not a developer, I am trying to learn php and cakephp and now I am trying to set a facebook appi, multi friend request dialog. I have read dozens of tutorials, pages, facebook wiki, facebook documentation, so I am trying to follow the instructions I have gathered. 1.- I have registered my facebook appi and get my appId and secret key. 2.- Downloaded the github files: My site is based on cakephp, so everything is at public_html directory in my server. 3.- Inside this public_html I create a directory named: php-sdk 4.- Inside I uploaded (ftp) the src file I downloaded from github 5.- Inside I created an index.php file: ?php require_once(src/facebook.php); $config = array( 'appId' = '291063454361392', 'secret' = 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? As I understood, this should let me use facebook sdk, so I went to my software. Inside the page of my software (template_page_facebook) where I want to enable the Multi Friend Selector Dialog, I wrote this: HTML xmlns = http://www.w3.org/1999/xhtml; xmlns: fb = INVITA A TODOS TUS AMIGOS EN FACEBOOK head title INVITA A TODOS TUS AMIGOS EN FACEBOOK /title /head body div id=fb-root /div script src=http://connect.facebook.net/es_ES/all.js; /script h1INVITA A TODOS TUS AMIGOS EN FACEBOOK/h1 button class=btn id=send-to-manyInvitalos/button script sendRequestToRecipients function () { var user_ids = document.getElementsByName (user_ids) [0] Valor.; FB.ui ({method: 'apprequests', message: 'Mi gran solicitud.' a: 'user_ids', }, Log.info.bind('send-to-many callback')); } FB.init ({ Id de aplicación: '291063454361392 ', status: true, // comprobar estado de login cookie: true, // habilitar cookies para permitir al servidor acceder a la sesión sfbml: true, // ejecutar código XFBML channel: true, channelURL : 'http://www.mywebsite.com/channel.html', // fichero channel.html oauth: true, frictionlessRequests: true init: true, level: debug, signedRequest: null, trace: false, version: mu, viewmode: website, autorun: true }); /script /body /Html Then, I created the channel diretory at public_html and inside is a file channel.html The result is error I have read everything, but as i am not developer I think there are multiple things I am doing wrong. I also have read: https://developers.facebook.com/blog/post/464/: So, any body please can describe me what do I shall do?? Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+u...@googlegroups.com javascript:. To post to this group, send email to cake...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Hi I am new here and I need some assistance
HI I am not a developer, I am trying to learn php and cakephp and now I am trying to set a facebook appi, multi friend request dialog. I have read dozens of tutorials, pages, facebook wiki, facebook documentation, so I am trying to follow the instructions I have gathered. 1.- I have registered my facebook appi and get my appId and secret key. 2.- Downloaded the github files: My site is based on cakephp, so everything is at public_html directory in my server. 3.- Inside this public_html I create a directory named: php-sdk 4.- Inside I uploaded (ftp) the src file I downloaded from github 5.- Inside I created an index.php file: ?php require_once(src/facebook.php); $config = array( 'appId' = '291063454361392', 'secret' = 'a2cf7f82bb6e18bece7eef282d9f9ce7', 'fileUpload' = false, // opcional ); $facebook = new Facebook($config); ? As I understood, this should let me use facebook sdk, so I went to my software. Inside the page of my software (template_page_facebook) where I want to enable the Multi Friend Selector Dialog, I wrote this: HTML xmlns = http://www.w3.org/1999/xhtml; xmlns: fb = INVITA A TODOS TUS AMIGOS EN FACEBOOK head title INVITA A TODOS TUS AMIGOS EN FACEBOOK /title /head body div id=fb-root /div script src=http://connect.facebook.net/es_ES/all.js; /script h1INVITA A TODOS TUS AMIGOS EN FACEBOOK/h1 button class=btn id=send-to-manyInvitalos/button script sendRequestToRecipients function () { var user_ids = document.getElementsByName (user_ids) [0] Valor.; FB.ui ({method: 'apprequests', message: 'Mi gran solicitud.' a: 'user_ids', }, Log.info.bind('send-to-many callback')); } FB.init ({ Id de aplicación: '291063454361392 ', status: true, // comprobar estado de login cookie: true, // habilitar cookies para permitir al servidor acceder a la sesión sfbml: true, // ejecutar código XFBML channel: true, channelURL : 'http://www.mywebsite.com/channel.html', // fichero channel.html oauth: true, frictionlessRequests: true init: true, level: debug, signedRequest: null, trace: false, version: mu, viewmode: website, autorun: true }); /script /body /Html Then, I created the channel diretory at public_html and inside is a file channel.html The result is error I have read everything, but as i am not developer I think there are multiple things I am doing wrong. I also have read: https://developers.facebook.com/blog/post/464/: So, any body please can describe me what do I shall do?? Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Plantilla Artisteer para CakePhp
Sería bueno que alguien con experiencia en CakePhp pudiera explicar cómo convertir una plantilla generada con Artisteer, utilizando Elements de Cake, etc., de esa manería se contaría con una interfaz de más calidad. Sería ideal desarrollar un convertidor. -- 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
Authentication like the one implemented in Yii Framework
Is it dificult to implement such Auth like the one Yii uses???. I think Cake's continues to be hard to understand. -- 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: cake forge down?
If it helps, here are the smarty-related CakePHP projects I am aware of: http://cakepackages.com/packages/index/query:smarty Jose On Dec 26, 11:10 am, Alida whitetigre...@gmail.com wrote: Is cakeforge.org down? trying to dowload the smartyhelper and the server is not responding -- 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
page creation time
Hi All I noticed when using debug=3, before the sqls and time, I get a !-- 0.1905s -- for the page creation time. Is there a way I can echo that value in my footer so I can see it in the page? 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: working cakephp-filter-plugin for CakePHP 1.3 ?
Hello. I'm one of the developers of the Filter Plugin (the developer who unified all those hacks was one of my junior devs). An updated version is here (all versions work with CakePHP 1.3): http://github.com/josegonzalez/cakephp-filter-plugin ?php PostsController extends AppController { var $components = array('Filter.Filter'); // Also configurable via array options. See component var $paginate = array(); // Set your default pagination stuff here, you can leave this out if you want function index() { $this-paginate = $this-Filter-paginate; // if you want action specific pagination, do array_merge($this-Filter-paginate, array()), where the second array is the set of action specific pagination rules $posts = $this-paginate(); $this-set(compact('posts')); } } ? Works out of the box as I've outlined. You don't even need to modify your PaginatorHelper unless you override the PaginatorHelper::options() configuration :) Post issues in that repository if you have any. Good luck. Jose Diaz-Gonzalez On Jun 24, 4:40 am, Charles Bueche cbli...@bueche.ch wrote: Hi, I'm writing a small CakePHP front-end to a DB. I'm using CakePHP 1.3.x, and would like to use some kind of filter on top of my views, so the user can restrict the shown results. I have triedhttp://github.com/jmroth/cakephp-filter-plugin, but it apparently doesn't work with 1.3. Any other recommendation, or is J.M. Roth on line to provide on a possible update / patch ? Thanks, Charles 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
Two application same path
hi how to can have a application into / y other /proyectos the first with cakephp1.3 y the other with cakephp1.2 Thank!! PD. subdomain not is a solution 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
Pagination Sort
Hi guys, I have this model Structure - Model 1 - Union var $belongsTo = array( 'Address' = array( 'className' = 'Address', 'foreignKey' = 'address_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); Model 2 - Address var $belongsTo = array( 'District' = array( 'className' = 'District', 'foreignKey' = 'district_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); Model 3 District. with fields name and code both varchar. Now I would like to paginate the Unions which should be ordered in ASC by Union.Address.District.name ASC Is that possible and if so how should i write the paginate. Urgent help need. I am stuck here. Regards, -- Sijo Jose Chakramakkil 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: Pagination Sort
Well thanks for the prompt reply I have this model Structure - Model 1 - Union var $belongsTo = array( 'Address' = array( 'className' = 'Address', 'foreignKey' = 'address_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); Model 2 - Address var $belongsTo = array( 'District' = array( 'className' = 'District', 'foreignKey' = 'district_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); Model 3 District. with fields name and code both varchar. Now when I paginate UNION like this $this-paginate = array( 'order' = array('Address.street' = 'ASC'), ); it works fine. What I need is the next level that is District which is related to Address, but not to UNION On Tue, May 4, 2010 at 1:39 PM, Andrei Mita andrei.m...@gmail.com wrote: Check out the 2 links below: http://book.cakephp.org/view/164/Pagination http://book.cakephp.org/view/858/Using-Containable-with-pagination On Tue, May 4, 2010 at 11:07 AM, Andrei Mita andrei.m...@gmail.comwrote: I believe paginate documentation in the book has a similar example. On Tue, May 4, 2010 at 9:48 AM, sijo jose jose.s...@gmail.com wrote: Hi guys, I have this model Structure - Model 1 - Union var $belongsTo = array( 'Address' = array( 'className' = 'Address', 'foreignKey' = 'address_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); Model 2 - Address var $belongsTo = array( 'District' = array( 'className' = 'District', 'foreignKey' = 'district_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); Model 3 District. with fields name and code both varchar. Now I would like to paginate the Unions which should be ordered in ASC by Union.Address.District.name ASC Is that possible and if so how should i write the paginate. Urgent help need. I am stuck here. Regards, -- Sijo Jose Chakramakkil 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.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.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Sijo Jose Chakramakkil 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: VALIDATION
Hi Anand, If you are trying to Save both user and user_phone u might be using saveAll. So for validating just use $this-User-saveAll('User',array('validation'='first')); This will validate both your models. On Mon, Dec 7, 2009 at 5:31 PM, anand angadi anuang...@gmail.com wrote: Hi all, I have 2 model called User,user_phone...I have imported user_phone in User model...and I have done basic Add,Edit,Delete functionality... Now the problem is... In my view page I have input fields as username,password which belongs to user table and one more input field as number which belongs to user_phone... I am getting validation for username and password but not getting the validation for number as it is in different table and model... How can I solve this...? Cheers: Anand 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.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Sijo Jose Chakramakkil 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
Email Validation
Hi folks, I have a email field which is not mandatory. But i would like it to b validated if at all it is entered. Please suggest. -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: Data Validation
I have a small problem with the validation of some fields in a model The particular problem is that the system validates the data if the model but I painted the error messages in sight and it is not possible and have tried some things but nothing and I'm desperate. This is the code I have VISTA echo $form-create('usuariosaplicacion',array('url' = '/clientes/add_acceso_aplicacion'))."\n"; echo "div id=\"div_usuario\"\n"; echo "labelAplicacin/label\n"; echo $form-input('usuariosaplicacion.id_aplicacion', array('label'=false,'div'=false,'empty'=true,'options'=$lista_aplicaciones))."\n"; echo "/div\n"; echo $form-input('sm_precio_sms', array('label'=Precio SMS,'size' = '5','maxlength'='4','div'=false))."\n"; echo $form-input('usuariosaplicacion.id_usuario', array('type'='hidden', 'value' = $id_cliente)); echo $form-end('Submit'); MODELO var $validate = array( 'id_aplicacion' = array( 'required' = array('rule' = array('notEmpty'),'message' = 'Debe Seleccionar una aplicacin') ) ); CONTROLADOR if (!empty($this-data)) { if ($this-usuariosaplicacion-save($this-data)) { $this-Session-setFlash(__('Se ha aadido el acceso a esta aplicacion correctamente', true)); //$this-redirect(array('action'='index')); } else { $this-Session-setFlash(__('No se ha podido dar el acceso a esta aplicacion.', true)); } } Do not know if this table will have something to do with this table is the table MIDDLE HABT a Relationship. A greeting and thank you very much --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
SaveAll problem?
']; $this-data['Registration']['primary_email'] =$lead['Contact']['primary_email']; $this-data['Registration']['secondary_email'] =$lead['Contact']['secondary_email']; $this-data['Registration']['mobile_number'] =$lead['Contact']['mobile_number']; $this-data['Registration']['home_phone'] =$lead['Contact']['home_phone']; $this-data['Registration']['office_phone'] =$lead['Contact']['office_phone']; $this-set('leadID',$lead['Lead']['id']); $this-set($this-data); } $this-Country-recursive = -1; $this-set('countryList', $this-Country-myGenerateList(null, null, null,'{n}.Country.id', '{n}.Country.name')); } } My view is dynamic view : I am just pasting the form elements. ?php echo $form-create('Registration', array('action' = 'studyabroadregistration','url'=array('controller' = 'registrations')));? table class=tabform style=border-top:none cellspacing=1 cellpadding=0 border=0 width=100% tr style=height:25px th align=left colspan=8 h4Personal Information/h4/th /tr tr tddiv class=formLabel First Name span class=required*/span/div/td td?php echo $form-input('first_name', array('label' = '','className'='formInput')); echo $form-hidden('id'); ?/td tddiv class=formLabel Middle Name/div/td td?php echo $form-input('middle_name', array('label' = '','className'='formInput'));?/td tddiv class=formLabel Last Name span class=required*/span/div/td td?php echo $form-input('last_name', array('label' = '','className'='formInput'));?/td /tr tr tddiv class=formLabel Gender/div/td td input name=data[Registration][gender] id=Male value=Male type=radio checked Male input name=data[Registration][gender] id=Female value=Female type=radio Female /td tddiv class=formLabel Marital Status /div/td td?php echo $form-input('marital_status', array('label' = '','type'='select','empty'='Select','options'=array( 'married' ='Married', 'single' = 'Single', 'divorced' = 'Divorced'),'className'='formInput'));?/td /tr tr tddiv class=formLabel Date Of Birth span class=required*/span/div/td td colspan=2?php echo $form-input('dob', array('label' = '','className'='formInput','timeFormat'=''));?/td /tr /table table class=tabform cellspacing=1 cellpadding=0 border=0 width=100% tr style=height:25px th align=left colspan=9 h4Educational Summary/h4/th /tr tr td table border=1 cellspacing=1 width=100% style=border:1px solid #c0c0c0; th class=eligibility_thCourse Name/th th class=eligibility_thStream/th th class=eligibility_thYear Of Passing/th th class=eligibility_thUniversity/th th class=eligibility_th/th tr td style=width:25%;text-align:left;?php echo $form-input('EducationDetail.0.course_name',array('label'='','size'='30')); ?/td td style=width:25%;text-align:left;?php echo $form-input('EducationDetail.0.stream',array('label'='','size'='30')); ?/td td style=width:25%;text-align:left;?php echo $form-input('EducationDetail.0.year_of_passing',array('label'='')); ?/td td style=width:22%;text-align:left;?php echo $form-input('EducationDetail.0.university_name',array('label'='','size'='30')); ?/td td style=width:3%;text-align:center;a href=javascript:addEducationalDetails();img src=../img/plus_inline1.gif width=10 height=10/a/td /tr tr td colspan=5 style=padding:0pxdiv id=parentDiv style=width:100% /div/td /tr /table /td /tr /table The javascript function here adds rows of educational details row by row with perfect numbering. Well this part has been troubling me for some part. What I have done wrong ? . Please help. -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: file validation
Well Kaushik I have done my part of validation in controller. The following site would be helpful in that matter http://www.keithmedlin.com/2008/01/cakephp-12-file-upload/ http://cakebaker.wordpress.com/2006/04/15/file-upload-with-cakephp/ http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/ Regarding Model validation check this site but I have not work with this. http://www.jonnyreeves.co.uk/2008/06/cakephp-uploaded-file-validation-in-models/ Regards Sijo Jose C On Tue, Mar 3, 2009 at 3:35 PM, kaushik kaushikwo...@gmail.com wrote: I want to set a system where file uploading is must and i also want to check the extension of file. Is it possible to arrange the validation from model or I have to check from controller. Can anyone give any idea? --~--~-~--~~~---~--~~ 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 Newbie about dropdown
Hi All, I have two controllers: courses and providers defined as: class CoursesController extends AppController { var $name='Courses'; var $uses=array('Courses','Providers'); var $belongsTo = array('Provider' = array('className'= 'Provider', 'conditions' = '', 'order'= '', 'foreignKey' = 'provider_id' )); class ProvidersController extends AppController { var $name='Providers'; var $hasMany=array('Course'); in the add function at the CoursesController I have: function add() { if (!empty($this-data)) { if ($this-Course-save($this-data)) { $this-flash('Your Course has been saved.', '/courses'); } } else { $this-set('providers', $this-Course-Provider-generateList()); $this-render(); } } and at the view for the add I have: echo $form-create('Course'); echo $form-input('name'); echo $form-input('provider_id'); $html-selectTag('Course/provider_id', $providers, $html-tagValue ('Course/provider_id'), array(), array(),false, true))); echo $form-end('Save Post'); The problem then getting into the /add is: Notice (8): Undefined property: CoursesController::$Course [APP \controllers\courses_controller.php, line 32] Notice (8): Trying to get property of non-object [APP\controllers \courses_controller.php, line 32] Fatal error: Call to a member function generateList() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\app \controllers\courses_controller.php on line 32 the line 32 is: $this-set('providers', $this-Course-Provider- generateList()); I have read several samples and it looks I am doing the right thing, but something it's missing! --~--~-~--~~~---~--~~ 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 Newbie about dropdown
I forgot to mention I am looking to get a dropdown in the add form... On Feb 26, 6:00 pm, Jose jfe...@gmail.com wrote: Hi All, I have two controllers: courses and providers defined as: class CoursesController extends AppController { var $name='Courses'; var $uses=array('Courses','Providers'); var $belongsTo = array('Provider' = array('className' = 'Provider', 'conditions' = '', 'order' = '', 'foreignKey' = 'provider_id' )); class ProvidersController extends AppController { var $name='Providers'; var $hasMany=array('Course'); in the add function at the CoursesController I have: function add() { if (!empty($this-data)) { if ($this-Course-save($this-data)) { $this-flash('Your Course has been saved.', '/courses'); } } else { $this-set('providers', $this-Course-Provider-generateList()); $this-render(); } } and at the view for the add I have: echo $form-create('Course'); echo $form-input('name'); echo $form-input('provider_id'); $html-selectTag('Course/provider_id', $providers, $html-tagValue ('Course/provider_id'), array(), array(),false, true))); echo $form-end('Save Post'); The problem then getting into the /add is: Notice (8): Undefined property: CoursesController::$Course [APP \controllers\courses_controller.php, line 32] Notice (8): Trying to get property of non-object [APP\controllers \courses_controller.php, line 32] Fatal error: Call to a member function generateList() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\app \controllers\courses_controller.php on line 32 the line 32 is: $this-set('providers', $this-Course-Provider- generateList()); I have read several samples and it looks I am doing the right thing, but something it's missing! --~--~-~--~~~---~--~~ 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 Newbie about dropdown
Thanks for the correction, but I am still getting the same error... I am using version 1.2.1.8004 On Feb 26, 6:27 pm, dr. Hannibal Lecter lecter...@gmail.com wrote: Hmmm...which version of cake are you using? The error you're getting is because your model names should be singular, not plural. So instead: var $uses=array('Courses','Providers'); try var $uses = array('Course', 'Provider'); And see if that helps. On Feb 26, 11:00 pm, Jose jfe...@gmail.com wrote: Hi All, I have two controllers: courses and providers defined as: class CoursesController extends AppController { var $name='Courses'; var $uses=array('Courses','Providers'); var $belongsTo = array('Provider' = array('className' = 'Provider', 'conditions' = '', 'order' = '', 'foreignKey' = 'provider_id' )); class ProvidersController extends AppController { var $name='Providers'; var $hasMany=array('Course'); in the add function at the CoursesController I have: function add() { if (!empty($this-data)) { if ($this-Course-save($this-data)) { $this-flash('Your Course has been saved.', '/courses'); } } else { $this-set('providers', $this-Course-Provider-generateList()); $this-render(); } } and at the view for the add I have: echo $form-create('Course'); echo $form-input('name'); echo $form-input('provider_id'); $html-selectTag('Course/provider_id', $providers, $html-tagValue ('Course/provider_id'), array(), array(),false, true))); echo $form-end('Save Post'); The problem then getting into the /add is: Notice (8): Undefined property: CoursesController::$Course [APP \controllers\courses_controller.php, line 32] Notice (8): Trying to get property of non-object [APP\controllers \courses_controller.php, line 32] Fatal error: Call to a member function generateList() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\app \controllers\courses_controller.php on line 32 the line 32 is: $this-set('providers', $this-Course-Provider- generateList()); I have read several samples and it looks I am doing the right thing, but something it's missing! --~--~-~--~~~---~--~~ 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 Newbie about dropdown
Hi, Thanks for the correction about the singular nouns in $uses, but I still getting the same error... I have version 1.2.1.8004 of cakephp I also have a foreign_key defined at the courses table relating the provider_id field to the providers table... On Feb 26, 6:27 pm, dr. Hannibal Lecter lecter...@gmail.com wrote: Hmmm...which version of cake are you using? The error you're getting is because your model names should be singular, not plural. So instead: var $uses=array('Courses','Providers'); try var $uses = array('Course', 'Provider'); And see if that helps. On Feb 26, 11:00 pm, Jose jfe...@gmail.com wrote: Hi All, I have two controllers: courses and providers defined as: class CoursesController extends AppController { var $name='Courses'; var $uses=array('Courses','Providers'); var $belongsTo = array('Provider' = array('className' = 'Provider', 'conditions' = '', 'order' = '', 'foreignKey' = 'provider_id' )); class ProvidersController extends AppController { var $name='Providers'; var $hasMany=array('Course'); in the add function at the CoursesController I have: function add() { if (!empty($this-data)) { if ($this-Course-save($this-data)) { $this-flash('Your Course has been saved.', '/courses'); } } else { $this-set('providers', $this-Course-Provider-generateList()); $this-render(); } } and at the view for the add I have: echo $form-create('Course'); echo $form-input('name'); echo $form-input('provider_id'); $html-selectTag('Course/provider_id', $providers, $html-tagValue ('Course/provider_id'), array(), array(),false, true))); echo $form-end('Save Post'); The problem then getting into the /add is: Notice (8): Undefined property: CoursesController::$Course [APP \controllers\courses_controller.php, line 32] Notice (8): Trying to get property of non-object [APP\controllers \courses_controller.php, line 32] Fatal error: Call to a member function generateList() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\app \controllers\courses_controller.php on line 32 the line 32 is: $this-set('providers', $this-Course-Provider- generateList()); I have read several samples and it looks I am doing the right thing, but something it's missing! --~--~-~--~~~---~--~~ 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 Newbie about dropdown
thanks for the help! the problem was the use of model attributes in controllers... --~--~-~--~~~---~--~~ 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: Session
Hi majna, Thx for the tip. It was helpful and it works. Regards Sijo Jose C On Thu, Feb 5, 2009 at 2:40 PM, majna majna...@gmail.com wrote: try with Configure::write('Session.checkAgent', false); Configure::write('Security.level', 'medium'); On Feb 5, 9:26 am, Cjo jose.s...@gmail.com wrote: Hi all, I have peculiar issue right now. When ever i double click on a link or a button, I get session out and thrown out. Is this my configuration issue and is there any remedies. Can I get some help.?? Regards Sijo Jose C -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Updating AROS for USER when changing the User Group.
Hi all, I have been stuck at two places. 1. This is regarding User and his corresponding. Actually I have a User who is assigned a Group 'xx' while he is created. But at a later stage I would like to regroup him to a Group 'yy'. Simply changing the User group is not working sice I think the corresponding AROS is not getting updated. How would I update the AROS regarding this. 2. I would like to populate the database with some Users when my site gets to production. This is also because AROS is not being populated. Any help regarding this would be of great help. Regards Sijo Jose C --~--~-~--~~~---~--~~ 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: Updating AROS for USER when changing the User Group.
Thanks Alexandru... Regards Sijo Jose C On Wed, Jan 14, 2009 at 9:22 PM, Alexandru Ciobanu ics.cake...@gmail.comwrote: sijo jose wrote: Hi all, I have been stuck at two places. 1. This is regarding User and his corresponding. Actually I have a User who is assigned a Group 'xx' while he is created. But at a later stage I would like to regroup him to a Group 'yy'. Simply changing the User group is not working sice I think the corresponding AROS is not getting updated. How would I update the AROS regarding this. 2. I would like to populate the database with some Users when my site gets to production. This is also because AROS is not being populated. http://book.cakephp.org/view/641/Simple-Acl-controlled-Application Everything you need it's right here. Acl behavior will help you with the updates: http://book.cakephp.org/view/645/Acts-As-a-Requester -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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 to validate 2 linked models created from one form?
Hi, Since u have created the form for the model Order, The field title should be referred like $form-input(Customer.title); directly. Now when u r saving use saveAll $this-Order-saveAll($this-data,array('validate' = 'first')); All the validation rules can be in ur model itself. The array('validate' = 'first') specifies that all the models must be validated first before saving recursively. Also u have to take into consideration that at present cakePHP supports recursive saving for first level only. Think I was helpful. Regards Sijo On Mon, Dec 22, 2008 at 2:42 PM, Hipnotik pork...@gmail.com wrote: Hello again ;) I have 2 models: Order: hasOne = Customer Customer: belongsTo = Order var $validate = array(lot of rules) I would like to create a form to provide data for Customer object then send form to OrdersController and validate. How to create proper form? I have this: $form-create(Order, array(action = send)); $form-input(Order.Customer.title); // more fileds $form-end(Send) It sends data to send action of OrdersController, but how to create Customer object, validate and display errors on the form if occur? Thanks for help -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: Error Messages Not Displaying in View or in Validations Array
hi, As earlier said u are sending the form data to a different page... function thank_you() { if( !empty($this-data) ) { $this-User-create(); if( $this-User-save($this-data) ) { } else { $this-redirect(array('action' = 'index'),null,true); } } else { // we're at this place because a form was not filled in $this-redirect(array('action' = 'index'),null,true); } } Now in cakePHP the validation works when u call save. so if if( $this-User-save($this-data) ) is false it means that ur form has errors So what u r doing is that u are redirecting the page when there are form erros. So give any redirect page in the else condition it will automatically come to ur form page. Also there is no need for $this-User-create(); Think u got the point. Regards Sijo Jose C On Fri, Dec 19, 2008 at 7:24 PM, Smelly_Eddie ollit...@gmail.com wrote: Just a guess but it looks like your sending the form data to a different page... Validation was intended to display on the same model in a circular manner. i.e. empty user/add form is shown - data submitted to user/ add action - user/add validates data - form is repeated if invalid OR redirect user to secondary page. On Dec 18, 3:51 pm, Tony t3proje...@gmail.com wrote: For some reason I can't get my error messages for validations to work. I tried outputting the validations by doing: pr($this-validationErrors); But all I get is an empty array. What do you guys see that I'm doing wrong? Thanks, Tony Here's my model: class User extends AppModel { var $name = 'User'; // This model is a self-join var $belongsTo = array( 'ParentMember' = array( 'className' = 'User', 'foreignKey' = 'parent_id'), ); var $hasMany= array( 'ChildMember' = array( 'className' = 'User', 'foreignKey' = 'parent_id'), ); // Place the validation rules here: var $validate = array( 'first_name' = array( 'rule' = 'alphaNumeric', 'required' = true, 'message' = 'Name is required. Please enter your first name.', 'last' = true ), 'email' = array( 'rule' = array('email', true), 'required' = true, 'message' = 'Email is required. Please enter your email address.', 'last' = true ), 'phone' = array( 'rule' = array('phone', null, 'us'), 'message' = 'Phone number is not valid. Please enter valid phone number.', 'last' = true ) ); } Here's my controller with the method action it's being submitted to: function thank_you() { $member = $this-Session-read('teamMember'); $this-set('pageTitle', 'Before you leave TriVita Cooperative Marketing\'s website'); $this-set('bigTitle', 'BEFORE YOU LEAVEbr /A SPECIAL THANK YOUbr / FROM ME...'); $this-set('member', $member); if( !empty($this-data) ) { $this-User-create(); if( $this-User-save($this-data) ) { $tony = $this-User-findByAffiliateNumber ('11167706'); $prospect = $this-User-findById($this-User-id); $this-set('prospectName', $prospect['User'] ['first_name']); $this-set('tonyEmail', $tony); if( $prospect['User']['email'] != '' || $prospect['User'] ['email'] != null ) { $this-_sendThankYouEmail($prospect, $member); } /* if( $member['User']['affiliate_number'] != '11167706') { $this-_sendMemberNotificationEmail($prospect, $member, $tony); } */ $this-_sendMemberNotificationEmail($prospect, $member, $tony); $this-_sendTonyEmail($prospect, $member, $tony); } else { $this-redirect(array('action' = 'index'),null,true
Re: form helper - inputs - textarea - cols?
Hey why cant u try the $form-input option. Its quiet easy. ?php echo $form-input('SamplingDetail.sampling_address', array('error'='Sampling Address cannot be left empty','div' = 'mandatory','type'='textarea','label' = 'Sampling Address', 'rows' = 3, 'cols' = 35)); ? Regards Sijo On Fri, Dec 12, 2008 at 7:31 PM, leberle leberkne...@gmx.de wrote: hi all :) one simple (i guess) question: i'm using the inputs method for creating several input-elements in my view. i want one field to be a textarea, i used $html-inputs( [...bunchofotherinputs], 'mytextfield' = array('type' = 'textarea', 'cols' = 2), [...]); The generated input gets the textarea-option but fails to get the number of cols i definied...so i got a textarea thats way to largs. Someone can help me with that? -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: Cake Developers in Chennai, TamilNadu, India?
Yah i have been working for past 4 months. Regards Sijo On Thu, Dec 11, 2008 at 11:15 PM, ravindranathbe ravindranat...@gmail.comwrote: Hi I am Ravindranath. Experienced in CakePHP for the past 10 months. Able to create highly professional, high quality website on Cakephp. You can contact me thro, 1. email - ravindranat...@gmail.com 2. mobile - 9380567762 Regards, Ravindranath. On Nov 5, 11:04 am, Selva revol...@gmail.com wrote: Hello Guys, I apologize in advance if this is not the appropriate forum to ask this question, but I am interested in finding a Cake Developer to work on a new project. Thanks, Selva -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: Saving Multiple Models in one save
Well sorry for not being prompt, Presently cakePHP supports saving models upto level one only. So I have changed my code accordingly. Thanks for your reply which was helpfull. Regards Sijo On Wed, Dec 10, 2008 at 2:52 PM, WebbedIT p...@webbedit.co.uk wrote: I haven't gotten around to using saveAll() as yet, but I did spot that you haven't created a belongsTo relation from SamplingDetail to Intimation to close the hasOne/belongsTo relationship between the two models. Similarly best practice dictates you should create hasOne relationships for Processor-SamplingDetail Contact-Processor Not that I think this will necessarily solve your saleAll issue but it is good practice to do so. Without using the saveAll function myserlf I can only hazard guesses at what you can look at. I tried looking for a recursive property to try and tell the function to go more than 1 level deep, but that doesn't exist. What happens if you change the fields from ?php echo $form-input('SamplingDetail.package_description'); ? ?php echo $form-input('SamplingDetail.lot_number'); ? ?php echo $form-input('SamplingDetail.invoice_number'); ? ?php echo $form-input ('SamplingDetail.Processor.Contact.firstName'); ? ?php echo $form-input ('SamplingDetail.Processor.Contact.address'); ? to ?php echo $form-input('SamplingDetail.package_description'); ? ?php echo $form-input('SamplingDetail.lot_number'); ? ?php echo $form-input('SamplingDetail.invoice_number'); ? ?php echo $form-input ('Contact.firstName'); ? ?php echo $form-input ('Contact.address'); ? The fact that Intimation model fields will save from ?php echo $form-input('Intimiation.field1'); ? And SamplingDetail fields will save from ?php echo $form-input('SamplingDetail.field2'); ? Means other related fields should save from ?php echo $form-input('Processor.field3'); ? ?php echo $form-input('Contact.field4'); ? Hopefully someone else can join in and clear this up ;) -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: Newbie - multiple model instances in one form and validation
Hi , If the model associations are correct and the for is created using User just user $this-User-saveAll($this-data,array('validation'='first')) will validate all the Models, well as I said the model associations must be perfect. Regards Sijo Jose C On Wed, Dec 24, 2008 at 4:25 PM, Nature Lover nature_lover1...@yahoo.co.inwrote: Hi! I am new to CakePHP and currently working on an e-commerce site having three models: User( id, name, joined) UserProfile( id, user_id, title, age, email ) UserContacts( id, user_id, name, address) Currently receiving data from a form as below: $this-data['User']['name'] $this-data['UserProfile']['title'] $this-data['UserProfile']['age'] $this-data['UserProfile']['email'] $this-data['UserContact']['0']['name'] $this-data['UserContact']['0']['address'] $this-data['UserContact']['1']['name'] $this-data['UserContact']['1']['address'] tried to validate data in User controller as: $this-User-set($this-data); $this-User-UserProfile-set($this-data); $this-User-UserContact-set($this-data); if($this-User-validates()) { if($this-User-UserProfile-validates()) { if($this-User-UserContact-validates()) { $this-set('status','valid'); } } } else {$this-set('status','invalid');} Here proper validation fails for UserContacts although showing errors as $this-validationErrors['UserContact']['fieldname'] instead of $this-validationErrors['UserContact']['0']['fieldname'] and $this-validationErrors['UserContact']['1']['fieldname'] Also tried to use saveAll with validate=only, but failed due to foreign key constrains as getting error: 'This field cannot be left blank' for $this-validationErrors['UserProfile']['user_id'] and $this-validationErrors['UserContact']['0']['user_id'] $this-validationErrors['UserContact']['1']['user_id'] Please help me to get out of this hurdle. Thanks! -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: Saving a Model with belongsTo association
Hi, Thanks dude, My naming conventions was all correct just that I forgot to use saveAll() Regards Sijo On Tue, Nov 18, 2008 at 10:16 PM, thatsgreat2345 [EMAIL PROTECTED]wrote: It is all about how you name your forms and it will return the proper structure that a simple save can handle. Check out this link http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo On Nov 18, 3:32 am, Cjo [EMAIL PROTECTED] wrote: Hi, I am new to cake php and have been playing around for some time. First of all thanks for all the replies for earlier queries. Regarding this post. I have 2 Models Exporter which belong to User. I am doing a page for creating a New Exporter. But for creating a Exporter I would have to save the corresponding User. All I need is that all the information regarding the Exporter and its corresponding User be taken from the same form. Can anybody help me with this. I would like to have a example regarding this. How would be the form be looking and it naming conventions for User fields. Validation also required for the User fields. Regards. -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: CSS formatting not appearing
I agree with ROD. If it is CSS, firebug rocks. On Sun, Nov 23, 2008 at 2:22 AM, Rob [EMAIL PROTECTED] wrote: First, I would suggest you get a copy of Firebug - it rocks when trying to debug CSS issues. What exactly do you mean 'none of my CSS formats were applied'? If you left off the punctuation when you modified the #content, that would break things, but if all you did was to change the first element in the padding from 0px to 10px, that would only fail if another CSS tag prevented the change from being applied. On Nov 21, 12:05 pm, CJL [EMAIL PROTECTED] wrote: (sorry I hit send by accident) Below is my original style.css: #content { clear:both; margin-left: auto; margin-right: auto; padding: 0px 40px 10px 40px; background-color: #fff; color: #333; text-align: left; width: 100%; Then I just changed the padding to: padding: 20px 40px 10px 40px After that, none of my CSS formats were applied. I went back to the style.css file and changed the padding back to the original settings, but still none of my CSS formats are appearing. Any help would be greatly appreciated. Thanks! On Nov 21, 11:51 am, CJL [EMAIL PROTECTED] wrote: Hello, First off, I'm new to CakePHP and web development in general, so I apologize in advance if my question is a stupid one or has been asked already. I've read up to chapter 7 in the cookbook, and I'd say I understand it on a high level, but can figure out the details if I know where to look. I've installed CakePHP 1.1 and I am using MAMP. Problem: My CSS formatting is not appearing, but what's strange is that it worked at first, then I made a tiny change to a padding argument, and now all my formatting is gone. Below is my app/views/ layouts/default.thtml: !doctype html public -//W3C//DTD HTML 4.01 Transitional//EN html head titleMy Page -- ?php echo $title_for_layout ?/title link rel=stylesheet type=text/css href=/css/style.css !--[if IE 7]link rel=stylesheet type=text/css href=/css/ ie7_style.css![endif]-- script type=text/javascript src=/js/prototype.js/script script type=text/javascript src=/js/scriptaculous.js/script /head body div id=container div id=content div id=logo ?php echo $html-image('logo.jpg')? /div div ?php echo $this-renderElement('menu', array('key'='val'))? /div div id=header ?php $session-flash();? /div div ?php echo $content_for_layout? /div /div div id=footer/div /div /body /html So initially, like I said, my CSS worked. I wanted to mess around and change my #content in the CSS file. Below is the original style.css: -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: File List in a particular Directory
Thx dude On Tue, Nov 4, 2008 at 8:23 PM, AD7six [EMAIL PROTECTED] wrote: On Nov 4, 2:30 pm, Cjo [EMAIL PROTECTED] wrote: Hi, I have to show all the files that I have uploaded through my application. Please help me with this. Regards Cjo http://api.cakephp.org/class_folder.html#cae6a10175cdf45d5e303edbe6432dfc -- Sijo Jose Chakramakkil --~--~-~--~~~---~--~~ 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: tiny MCE editor issue
Please, see http://bakery.cakephp.org/articles/view/using-tinymce-with-cakephp, it helped me a lot. In your model, just define the field as text and in the view use $form-input('YourModel/yourfield'). TinyMCE script replace textareas with the editor. On Wed, May 21, 2008 at 9:06 AM, vishal [EMAIL PROTECTED] wrote: Hi friends, I want to bulit a page from my cms, in that I would like to place a tinymce editor to fill the content that will dispay on front end after save publish. I reuest you to please send me few lines of code or help to save the content in database that will fill in the editor. thanks always in advance..!! vishal --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
saveAll with three levels
Hi all, does anybody know if I can save a model with a hasMany relation and each of the related models has a hasMany relation? Hi have a model called Trivia with a 'hasMany' relation to model Pregunta and model Pregunta has a 'hasMany' relation to model Opcion. But when I call $this-Trivia-saveAll($this-data) in my controller, it only saves Trivia and their related Pregunta, but not Opcion Please help me! --~--~-~--~~~---~--~~ 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: version 1.2 scaffolding drop down.
That did it. Thanks so much! On 4/25/08, Samuel DeVore [EMAIL PROTECTED] wrote: I wonder if it might be that Model/ Models are reserved words Sam D On Fri, Apr 25, 2008 at 9:37 AM, JoC [EMAIL PROTECTED] wrote: Hello All, before I get yelled at I tried all the solutions I found on here before posting none of them worked. I have the following structure and I can't get scaffolding to generate a drop down of Manufacturers instead a get a text box. tables CREATE TABLE manufacturers ( id smallint(6) NOT NULL auto_increment, title varchar(50) NOT NULL, PRIMARY KEY (id), UNIQUE KEY `name` (title) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE models ( id smallint(6) NOT NULL auto_increment, manufacturer_id smallint(11) NOT NULL, model varchar(50) NOT NULL, voltage set('A/C','D/C') NOT NULL, kw varchar(20) NOT NULL, PRIMARY KEY (id), KEY manufacturer_id (manufacturer_id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; models ?php class Model extends AppModel { var $name = 'Model'; var $useTable = 'models'; var $displayField = 'title'; var $belongsTo = array( 'Manufacturer' = array('className' = 'Manufacturer', 'foreignKey' = 'manufacturer_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); } ? ?php class Manufacturer extends AppModel { var $name = 'Manufacturer'; var $useTable = 'manufacturers'; var $displayField = 'title'; var $hasMany = array( 'Model' = array('className' = 'Model', 'foreignKey' = 'manufacturer_id', 'order' = '' ) ); } ? controler: ? class ModelsController extends AppController { var $scaffold; } ? -- -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/ http://blog.samdevore.com/cakephp-pages/i-cant-bake/ -- Jose C Gomez Phone: 904-635-1996 E-Mail: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: Ajax request loads my default layout !
Hi, try this: if($this-RequestHandler-isAjax()) { $this-render('admin_index', 'ajax'); *$this-layout = '';* } On Tue, Apr 22, 2008 at 8:16 AM, Neveldo [EMAIL PROTECTED] wrote: Hi all, I've an issue with Ajax requests. I'm trying to add Ajax pagination for some data by following this tutorial : http://bakery.cakephp.org/articles/view/advanced-pagination-1-2. The pagination works fine but cake loads my entire default layout everytime I request a new page ! To resolve it, I add the code bellow in my controller action : if($this-RequestHandler-isAjax()) { $this-render('admin_index', 'ajax'); } and now It load the correct ajax layout but I think I've something wront, no ? thank ! Cordially, Neveldo : http://www.neveldo.fr -- Lic. Jose Selesan Desarrollador Gold Cinco Estrellas http://jose-selesan.blogspot.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routing question
Hi people, I have another question. I need to acces a controller action through a subdomain. I mean, if the user browse to jose.domain.com, it needs to be the same as www.domail.com/profiles/view/jose (where controller=profiles, action=view, param1=jose) Somebody can helpme with route rules? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Proposition: Community created forums powered by cakePHP
make it simple. forum members just register with email and something, and keep the model simple. On Mon, Apr 7, 2008 at 7:50 AM, Sliv [EMAIL PROTECTED] wrote: I would recommend checking cakeforge.org for such a project and if there isn't one, starting one up... -- Jose Achmad V. Palala Web Developer Kaisa Webteam, Kaisa Consulting [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Paginate com Ordenação em campos obtidos através de COUNT() GROUP
Opa Thiago, Para quem conhece a funcionalidade VIEW de SQL a solução é muito simples. Para quem não conhece, o conceito também á simples: São tabelas virtuais ou temporárias que os dados são adquiridos de outras tabelas. As funções principais de uma VIEW são segurança e otimização. Podemos utilizar para segurança quando temos um banco de dados para sistemas paralelos e queremos determinar quais são os campos das tabelas que um determinado usuário pode acessar. Já otimização é no caso de querermos armazenar o resultado de uma grande consulta ou uma stored procedure em uma tabela no banco... fazendo com que o acesso ao resultado seja muito mais simples. Lembrando que o banco de dados realiza as verificações de INSERÇÃO e ATUALIZAÇÃO de forma transparente. Realmente é algo muito bom de se usar. Bem, não sei se expliquei bem mas é mais ou menos isso que VIEW é, espero contribuições de outros usuários caso tenha errado ou esquecido de alguma coisa. Voltando na explicação do meu problema, o sistema é uma variação de um e-commerce, possui navegação por categoria, descrição do produto e listagem de produtos entre outros. No listagem de produtos há um requisito de ordenação por quantidade de vendas. As informações sobre o número de Vendas está armazenado numa tabela separada, uma relação $hasMany de Produto - Venda. Na verdade, a tabela vendas armazena as transações realizadas, porem com um simples COUNT() é possível saber quantas vendas foram realizadas. Estou utilizando o Paginate do Cake 1.2 e quando fui desenvolver esse requisito, fiquei na dúvida de como utilizar. Em SQL isso é muito fácil: SELECT Produto.id, COUNT(Venda.*) AS num_vendas FROM Produto LEFT JOIN Venda ON Produto.id = Venda.produto_id GROUP BY Produto.id ORDER BY num_vendas DESC Agora, como fazer isso no Cake que eu simplesmente não descobri. Tentei de várias maneiras e pesquisei bastante. Só que não consegui uma solução através do Cake. A solução foi muito mais simples que eu imaginava, armazenei esta mesma SQL em uma VIEW e criei uma relação $hasOne do produto com a tabela VIEW. Depois disso fica simples. Um comentário: Nunca trabalhei com uma plataforma de desenvolvimento completa como o Cake, e geralmente, quando quero resolver um problema, penso na solução mais baixo nível possível. Quando comecei a utilizar o Cake, venho me policiando para sempre utilizar as funcionalidades do framework para não querer reinventar a roda. Só que este policiamento tem seus lados ruins, nem sempre o framework nos dará todas as soluções prontas, e nem é o objetivo dele, neste caso fiquei horas, gastando tempo de dois funcionários para procurar uma solução pronta que aparentemente não existe. E até pode existir, mas como ainda penso em soluções baixo níveis, não consegui achar. Mas fica a dica de que nem sempre temos que utilizar somente o que o framework nos fornece. E para quem tiver algum sistema com comportamento parecido, fica ai a solução. Abraços 2008/1/30 Thiago Paes [EMAIL PROTECTED]: Parece ter sido uma ótima solução João, você poderia compartilhar com a galera com mais detalhes? Abs, Thiago -- 2008/1/30 Joao Jose Pedrini [EMAIL PROTECTED]: Olá galera, Hoje passei um aperto danado para resolver um problema de ordenação com o CakePHP 1.2. Eu tenho um campo $hasMany que necessita ter um agrupamento para obter o resultado. O sistema necessita de uma ordenação de acordo com o numero de vendas, no SQL faria normalmente com COUNT() e GROUP BY, mas tive dificuldade. Depois de MUITAS horas, obtive somente uma solução. (as vezes nós não pensamos direito pois ficamos com a ilusão de que framework vai fazer tudo pra nós). Resolvi através de VIEW em SQL (Mysql 5.0), depois criei uma associação $hasOne no model do Produto, e pronto... solução feita. Estou contando minha experiência pois não desejo essa perda de tempo para ninguém... acredito que outros sistemas possam utilizar essa solução, como sistemas de Votos, Rankings, etc. Aquele abraço! -- Joao Jose Pedrini [EMAIL PROTECTED] Consultor - COP-JR http://blog.copjr.info/ -- Thiago Paes - www.thiagopaes.com.br - Linuxer: #224062 -- Joao Jose Pedrini [EMAIL PROTECTED] Consultor - COP-JR http://blog.copjr.info/ --~--~-~--~~~---~--~~ Você recebeu esta mensagem porque está inscrito no Grupo Cake PHP Português em Grupos do Google. Para postar neste grupo, envie um e-mail para cake-php-pt@googlegroups.com Para cancelar a sua inscrição neste grupo, envie um e-mail para [EMAIL PROTECTED] Para ver mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-BR -~--~~~~--~~--~--~---
Paginate com Ordenação em campos obtidos através de COUNT() GROUP
Olá galera, Hoje passei um aperto danado para resolver um problema de ordenação com o CakePHP 1.2. Eu tenho um campo $hasMany que necessita ter um agrupamento para obter o resultado. O sistema necessita de uma ordenação de acordo com o numero de vendas, no SQL faria normalmente com COUNT() e GROUP BY, mas tive dificuldade. Depois de MUITAS horas, obtive somente uma solução. (as vezes nós não pensamos direito pois ficamos com a ilusão de que framework vai fazer tudo pra nós). Resolvi através de VIEW em SQL (Mysql 5.0), depois criei uma associação $hasOne no model do Produto, e pronto... solução feita. Estou contando minha experiência pois não desejo essa perda de tempo para ninguém... acredito que outros sistemas possam utilizar essa solução, como sistemas de Votos, Rankings, etc. Aquele abraço! -- Joao Jose Pedrini [EMAIL PROTECTED] Consultor - COP-JR http://blog.copjr.info/ --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Ordenação do Paginator do Cake1.2
Na verdade não era isso que estava procurando, Eu queria algo que me falasse qual é a direção e chave corrente da paginação... para poder dar aquela informação ao meu usuário de que a página esta ordenada pelo campo Nome e Descendente. Achei o seguinte métodos PaginatorHelper::sortDir e PaginatorHelper::sortKey http://api.cakephp.org/1.2/class_paginator_helper.html#ec465140578493ae1bffa8bdce2109e1 Acho que era isso que precisava. Mas valeu pela intenção. Abraços 2008/1/17 rafael bozzetti [EMAIL PROTECTED]: Boa tarde João, Estava com a mesma dúvida e consegui ordenar de forma crescente e descente.. No meu controller tenho a função index... ai embaixo.. marcado com *** function index() { $this-Blog-recursive = 0; $this-paginate = array('limit' = 10); *** $this-paginate['order'] = array('Blog.id' = 'DESC'); $this-set('blogs', $this-paginate()); } Abraço, 2008/1/17 Joao Jose Pedrini [EMAIL PROTECTED]: Pessoal, Estou com uma dúvida com a paginação do Cake 1.2. Estou querendo colocar uma sinalização se é descendente ou ascendente e qual é a atual ordenação que a página esta exibindo. Dei uma olhada na estrutura do sort() porém não consegui uma resposta. Alguém já precisou desta funcionalidade e/ou consegue me passar uma solução? Abraços! -- Joao Jose Pedrini [EMAIL PROTECTED] Consultor - COP-JR http://blog.copjr.info/ -- Rafael Pereira Bozzetti [EMAIL PROTECTED] http://www.bozzetti.org -- Joao Jose Pedrini [EMAIL PROTECTED] Consultor - COP-JR http://blog.copjr.info/ --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Quando ER não resolve na validação
Seria algo como isso? http://tempdocs.cakephp.org/#TOC133258 2008/1/17 DJ Spark [EMAIL PROTECTED]: provavelmente, além das regras 'prontas' , voce motnaria suas proprias regras... usando $this-Modelo-validate(); A API lista um método 'userdefined()' onde um dos argumentos é uma função que fará a validação especial... http://api.cakephp.org/1.2/class_validation.html Alguém já usou isso ? tem algum exemplo ? Spark 2008/1/17 Rodrigo Maia [EMAIL PROTECTED]: Olá pessoal, como seria se não desse para fazer uma validação usando expressão regular? Por exemplo, tornar um campo obrigatório caso um outro campo for selecionado. Ou quando um campo for maior que 200 caracteres. Ou se a data preenchida no form for maior que a data atual dar erro E assim vai. Como ficaria? -- [livesets] http://djspark.com.br/ [web] http://sydi.net [filmes] http://melhoresfilmes.com.br -- Joao Jose Pedrini [EMAIL PROTECTED] Consultor - COP-JR http://blog.copjr.info/ --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
Re: Irregularidade da palavra Conta
Com a tabela Categoria tbm ocorre o mesmo erro. Mas já sabia que era algo com o inflections.php, não testei a solução do Bill mas acho que funciona. Com o Ruby on Rails acontece a mesma coisa, tanto que um grupo brasileiro lançaram um patch (ou plugin, não sei) para ajustar todas as diferenças para o público brasileiro ( http://blog.improveit.com.br/articles/tag/brazilianrails). Além do plural existe outras funcionalidades, como numeração, valores monetários, traduções, etc. 2008/1/18 Bill [EMAIL PROTECTED]: Tive a mesma dificuldade, com uma tabela Ocorrencias, que virou ocorrencium. Pra resolver, eu gerei via bake de maneira errada mesmo, como se a tabela fosse ocorrencium, depois disto, alterei o inflections.php da seguinte maneira: $pluralRules = array('/(.*)ia$/i' = '\1ias', '/(.*)a$/i' = '\1as' ); $singularRules = array('/(.*)ias$/i' = '\1ia', '/(.*)as$/i' = '\1a' ); e alterei os respectivos arquivos gerados de model e controller. Veja se resolve algo. Abs Bill www.cakephp.com.br por essas e outras que eu já crio tudo em inglês mesmo e se precisar, manipulo as urls no Routes... infelizmente eu não sei o que pode ser =( 2008/1/18 Marcus Reis : Saudações padeiros! Estou com problemas no bake, quando crio o model Lancamento que por sua vez pertence ao model Conta, aparece para mim desta forma: Bake Model Path: /var/www/app/models/ --- Possible Models based on your current database: 1. Conta 2. Departamento Enter a number from the list above, or type in the name of another model. One moment while the associations are detected. -- - Please confirm the following associations: --- Lancamento belongsTo Departamento? (y/n) [y] y Lancamento belongsTo Contum? (y/n) [y] Veja que ele ao invés de me perguntar: Lancamento belongsTo Conta? Ele escreve: Lancamento belongsTo Contum? ja tentei usar o inflections.php para consertar mas nao gera efeito algum, parece um bug ou palavra reservada. para reproduzir este erro crie um model com o nome Conta (tabela contas) e tente associa-lo a algum filho (no meu caso lancamentos belongs to contas). Note que na listagem inicial dos models disponiveis ele escreve Conta corretamente, mas na hora de perguntar sobre as associações que ele escreve errado (Contum). Estou usando a versao 1.2 beta nova do site cakephp.org (a alpha anterior tb ocorre este erro) Agradeço a atenção! -- Joao Jose Pedrini [EMAIL PROTECTED] Consultor - COP-JR http://blog.copjr.info/ --~--~-~--~~~---~--~~ Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do Grupos Google. Para enviar mensagens para este grupo, envie um email para cake-php-pt@googlegroups.com Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED] Para mais opções, visite este grupo em http://groups.google.com/group/cake-php-pt?hl=pt-PT -~--~~~~--~~--~--~---
cakephp in i5 V5R4 with DB2 and ZendCore by i5
Hi, someone has working cakephp in a server i5 with db2 can give an example the file database.php. Note my databases is cataloged. Thank!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problems installing on new server: 404 errors
I would suggest double checking your apache config settings. Maybe place a regular html page in that directory and see if you can view it. Jose On 12/20/06, Dave [EMAIL PROTECTED] wrote: I've worked with Cake on several sites now, but am having trouble getting it to function on a new (HTTPS) server. I downloaded the latest Cake from the Web site today and uploaded it to my server in a subdirectory. After configuring the database, I attempted to access my new app at https://mydomain.com/mydir/cake/ and was greeted with an Apache 404 page that said: The requested URL /usr/home/myusername/public_ssl/cake/app/webroot/ was not found on this server. Note that it appears to be looking for webroot at an address that corresponds to its actual position in the filesystem rather than its URL. Next I tried disabling all three .htaccess files and uncommenting the BASE_URL line in core.php. This improved things but not completely: I can now see the app's home page (or anything else I specify using the default route in routes.php), but when trying to access a regular controller action I still get a 404 error - though the URL is correct in this case: The requested URL /mydir/air/objects/ was not found on this server. Any idea what might be happening? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problems installing on new server: 404 errors
I would suggest looking in your list of enabled modules to see if you have enabled mod_rewrite. Jose On 12/20/06, Dave [EMAIL PROTECTED] wrote: Experimenting a bit more I've gotten it to work. With the .htaccess files disabled and BASE_URL enabled, I have to access controller actions like this: https://mydomain.com/mydir/cake/index.php/controller/action Not ideal, but functional anyway. Not sure why mod_rewrite is misfiring in this case, and would love to figure out why... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Scaffold: A few more features
Ok, I agree with your scaffolf point of view, i think the bake feature is just fine for 99% of cases. regards jose --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Repeating models in a single form: how to validate?
I think you should exemplify your doubt, i'd like to help you bu i can't understand your problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Scaffold: A few more features
Hi there I've been playing with scaffold, and found come neat features that could be usefull, i'd like to know what is the comunity feeling about. I agree with nate's opinion, expressed in many post on this newsgroup, that scaffolding is for a aleterate the project start, athought i think one feature like. In model we could defined an array, like $fieldTypes = Array(field_name=READONLY, field_name=HIDDEN, fieldname=FILE,...); Could be very usefull, what do you think about that? jose Silva --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Form Call?
HI there What are you trying to do? Put the login form in DOMAIN1, and POST data to DOMAIN2 and return to DOMAIN2 ? Or do all login process on DOMAIN1 and pass data to DOMAIN2. Jose Silva On Oct 27, 7:46 am, Russ [EMAIL PROTECTED] wrote: I have a cake app on one domain and it has a login form on it, i want to move the login form from that domain to another one, is it possible to call the login process from one domain to the other? im trying and its not working :( thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Please stop emailing me directly
I don't know about other users, but sometimes when I reply a mailing list in gmail, I press R, which replies to the sender, instead of the whole mailing list. Would it be possible to hide the From email address and instead just use the cake-php groups email address ? JoseOn 7/20/06, nate [EMAIL PROTECTED] wrote: Hi, my name is Nate, and I'm a core developer of the CakePHP project.I also frequent this mailing list and answer questions as I have timeto do so.Sometimes, when I answer a question, there might be one or more follow-up questions, and that's okay.What's not okay is emailing those follow-up questions to me directly.Not only are you denying future readers the benefit of the informationbeing exchanged, but you could also be denying yourself a quicker answer, since there are other people on the list who may know theanswer to your question, and may be able to get to it more quickly thanI can.If you have something specific to tell me, would like to speak in private, or are answering a particular question that I asked you, theanswer to which wouldn't be relevant to many other people, then by allmeans, email me.But if you are writing to remind me to answer aquestion you asked, or to follow up with more information about a problem you are having, do yourself and everyone else a favor and emailthe list, not me.Thank you all for your time, and have a nice day. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.4.3083
What languages are do they need help with? I know a little bit of spanishJoseOn 6/14/06, Gustavo Carreno [EMAIL PROTECTED] wrote:On 6/14/06, Gustavo Carreno [EMAIL PROTECTED] wrote: So... I'll see you guys on IRC and have a chat in order to, either, get a new release quite away or wait until it has more meat :)Ok, I just updated the Docs from SVN, looks like I'm gonna be on the translation effort, eheheh--Gustavo Carreno--- If you know Red Hat you know Red Hat,If you know Slackware you know Linux --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP Wiki: In Loving Memory
Is there a demo or beta site of the Bakery ? I think it would be useful to get some input before the Bakery comes out of the oven.What is going to be the style of the Bakery ? Just articles ? if so how we'll we able to keep track of those ? Will the Bakery allow for user comments or users providing tips to other users ? JoseOn 6/13/06, gwoo [EMAIL PROTECTED] wrote: Eventually they will direct you to the bakery where you can searchand have a good time with information that is much more relevant,useful, and correct. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Adding a feature to help organize content
Hi,I am aware from idling in irc as well as reading the documentaiton online, that right now it needs some organization: http://groups.google.com/group/cake-php/browse_thread/thread/9487afa02207f299 I was thinking that having a feature were people could say: I found this page helpful, or I would recommend this page, would be extremely useful. This would help the cake community highlight what pages are really good, and which ones are not so good. This would allow each person reading the documentation to provide input on how to improve cake's user documentation. This is just a thought. Any comments or ideas?Thanks,Jose --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Global Variables and Arrays
There are several files in which you could put variables to be accessed in other files:app_model.php - in your model variable is accessibleapp_controller.php - in your controllers variable is accessible core.php - anywhere accessibleJoseOn 4/8/06, wassimk [EMAIL PROTECTED] wrote: Hello Everyone,Is there a way to register an array as global using Cake? Kind of like application wide settings array that I can load from a database.Something like$settings = array();$this-register-settings($settings)Then you can access $this-settings anywhere? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---