Re: Saving related table data
Cake has a steep learning cruve, took me a long time to become fully confident with it, but then you can code so much faster. You have to inform cake of when you are creating or updating a model, and the general rule of thumb is include an id for all models which are being updated and don;t when you want to create a new associated record. HTH Paul 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: URL for last page
As you need to have queried your dbase to find how many records there are to know what the last page is I am not sure how you can place a permalink to the last page on another site. I can't think of a situation where I would post a link to the last page of a paginated index on another site?!? 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: simple question about CakePHP syntax
This is not a CakePHP question, it is a {HP question. Your two strings are identical, the only difference is your are surrounding them in double quotes the first time and single the second, in neither case are the quotes part of the string. Nice little explanation here: http://v1.jeroenmulder.com/weblog/2005/04/php_single_and_double_quotes.php On Feb 12, 3:40 pm, majna majna...@gmail.com wrote: http://hr.php.net/manual/en/language.types.string.php On Feb 12, 12:50 pm, sebb86 kahlc...@googlemail.com wrote: Hello, i have a question about some signs. Is the use of this sample always equal to this 'sample' ? Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: simple question about CakePHP syntax
And the big difference is that single quote can't work with variables. For example: $name = 'Cristian'; $string = 'Hi, my name is $name'; echo $string; will output - Hi, my name is $name If you had: $name = 'Cristian'; $string = "Hi, my name is $name"; the echo $string; output would be - Hi, my name is Cristian WebbedIT ha scritto: This is not a CakePHP question, it is a {HP question. Your two strings are identical, the only difference is your are surrounding them in double quotes the first time and single the second, in neither case are the quotes part of the string. Nice little explanation here: http://v1.jeroenmulder.com/weblog/2005/04/php_single_and_double_quotes.php On Feb 12, 3:40pm, majna majna...@gmail.com wrote: http://hr.php.net/manual/en/language.types.string.php On Feb 12, 12:50pm, sebb86 kahlc...@googlemail.com wrote: Hello, i have a question about some signs. Is the use of this "sample" always equal to this 'sample' ? Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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: How to include a button which links to a view?
You may want to take a look at CSS image replacement techniques at some point too. The following would allow you to use a single 50 x 40px image with 2 states using CSS to move the background image when hovering to show the hover image. Without CSS enabled, i.e. when screen readers and search engines view your site, they see a standard text link, but for the majority of users they see a nice graphical link. View: $html-link('Delete', array('action' = 'delete', $row['Model'] ['id']), array('class'='delete'), 'Are you sure?'); CSS: a.delete { text-indent:-5000px; display:block; width:50px; height:20px; background:transparent url(/img/delete-icon.gif) no-repeat 0 0; } a.delete:hover { background-position:0 -20px; } 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: confirm message
The following would allow you to use a single 50 x 40px image with 2 states using CSS to move the background image when hovering to show the hover image. Without CSS enabled, i.e. when screen readers and search engines view your site, they see a standard text link, but for the majority of users they see a nice graphical link. View: $html-link('Delete', array('action' = 'delete', $row['Model'] ['id']), array('class'='delete'), 'Are you sure?'); CSS: a.delete { text-indent:-5000px; display:block; width:50px; height:20px; background:transparent url(/img/delete-icon.gif) no-repeat 0 0; } a.delete:hover { background-position:0 -20px; } 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: Creating new rows
The main question is, is it supposed to be creating two rows? 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: Creating new rows
No. Jeremy Burns jeremybu...@me.com On 13 Feb 2010, at 08:20, WebbedIT wrote: The main question is, is it supposed to be creating two rows? 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 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
parent/child navigation best practices
hi, what would be the best approach when creating a navigation system beetwen parent/child relationships? consider this: * Post have many Comment * we list all posts at /posts/index * we list _all_ comments at /comments/index * where do we list comments that belongs _only_ for Post.id=# ? currently I've been listing them at /posts/view/# or at /comments/ index/post:# but both would be no good if I wanted to: * show _only_ Post data at /posts/view/# * show _all_ Comment at /comments/index (no named params here) should I have a different method like /comments/parent/# ? any ideas? 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: ACL controlled and slow performance
by the way I use cakePHP 1.2.6 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: ACL controlled and slow performance
Any clue on how to speed up things? Try optimising your db tables by adding some indexes, I have http://pastie.org/823086 hth Jon -- jon bennett - www.jben.net - blog.jben.net 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: Creating new rows
On Fri, Feb 12, 2010 at 6:07 PM, Jeremy Burns jeremybu...@me.com wrote: I have this function in the items model: function addNewItem() { $this-save(); $itemId = $this-id; return $itemId; } How your controller called it? -- regards, gedex blog: http://gedex.web.id 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: Web Service cakePHP
What you have link web (URL), where i can see and know teory about webservice in cakePHP? In goole many tutorial but not teory for this topic. I will references this topic to my final task in my university. I very hope you can help me. I'm confuse so searching this topic. In my final task i will make application web bible and have webservice the bible. 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: Web Service cakePHP
I need a complete theory as WebService cakephp cakephp full theory itself. Please give me solution. thanks before you help me. God Bless You. 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: ACL controlled and slow performance
Hey Jon, you are my MySQL performance GURU!!! ;o) Your solution of indexes worked great!! Just a question: why did you opt for InnoDB tables rather than MyISAM? Cheers Daniel 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: Saas Development
that is possible. Should create a table groups and table users, then do an intermediate table with the primary keys of both tables. So there you make the association. Company - CompanyXUser - User best regards, German luxorit.com Argentina 2010/2/10 Jacksm ftwo...@gmail.com Hello, I am looking to develop a Saas type web application that would have different groups or companies using the same database. This of course would also include different users only belonging to certain groups when logging in. Is this possible with CakePHP and if so would anyone have a tutorial on how to do this? I have read through the documentation and understand creating log in form and ACLs, but I am having trouble creating an application where there could be mulitple users belonging to one group. Thank you Franc 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.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Cache help
I want to add this in my User model for registrations checking for banned words type thing. $params = array( 'contain' = false, 'fields' = array( 'Restriction.id', 'Restriction.name')); $restrictions = Cache::read('restrictions_cache', 'long'); if (empty($restrictions)) { Controller::loadModel('Restriction'); $restrictions = $this-Restriction-find('list' , $params); Cache::write('restrictions_cache', $restrictions,'long'); } But how do I search the cache for data? Right now I have this to check the table but since the data in Restrictions never changes I just want to cache the data and do my find with the cached data. $q = $this-Restriction-find('first' , array('conditions' = array( 'Restriction.name LIKE' = $value))); Thanks Dave 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: getting Zend Lucene running in CakePHP 1.3
Ended up finding this code from the source to the book.cakephp.org site: if(function_exists('ini_set')){ ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . APP. 'vendors'); } App::import('Vendor', 'Zend/Search/Lucene', array('file' = 'Zend/Search/Lucene.php')); and it worked fine. On Feb 13, 2:32 am, Zoltan zed...@gmail.com wrote: I've been running into a lot of problems getting Zend Framework's Lucene module running. Basically what I'm doing is: Lucene is in the vendor folder (/Zend/Search/Lucene.php) along with a file in the vendor folder: ?php // zend_include_path.php ini_set('include_path', ini_get('include_path').dirname(__FILE__)); ? I'm importing using: App::import('Vendor', 'zend_include_path'); // the above file App::import('Vendor', 'Zend_Search_Lucene', true, false, 'Zend/Search/ Lucene.php'); I'm running 1.6.2 of Zend because my XAMPP server is running PHP 5.2 Now it seems like things load ok, but I keep getting this error: Hex number is too big: 0x1 [CORE\Zend\Search\Lucene\Storage \File.php Any idea what I might be missing? Zoltan 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: getting Zend Lucene running in CakePHP 1.3
If you want to compare another use of Zend_Search_Lucene and CakePHP, I wrote a datasource a little while ago. It may give you some ideas: http://jamienay.com/2010/01/zend_search_lucene-datasource-for-cakephp/ On Feb 13, 9:19 pm, Zoltan zed...@gmail.com wrote: Ended up finding this code from the source to the book.cakephp.org site: if(function_exists('ini_set')){ ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . APP. 'vendors'); } App::import('Vendor', 'Zend/Search/Lucene', array('file' = 'Zend/Search/Lucene.php')); and it worked fine. On Feb 13, 2:32 am, Zoltan zed...@gmail.com wrote: I've been running into a lot of problems getting Zend Framework's Lucene module running. Basically what I'm doing is: Lucene is in the vendor folder (/Zend/Search/Lucene.php) along with a file in the vendor folder: ?php // zend_include_path.php ini_set('include_path', ini_get('include_path').dirname(__FILE__)); ? I'm importing using: App::import('Vendor', 'zend_include_path'); // the above file App::import('Vendor', 'Zend_Search_Lucene', true, false, 'Zend/Search/ Lucene.php'); I'm running 1.6.2 of Zend because my XAMPP server is running PHP 5.2 Now it seems like things load ok, but I keep getting this error: Hex number is too big: 0x1 [CORE\Zend\Search\Lucene\Storage \File.php Any idea what I might be missing? Zoltan 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