Re: Problem with Magic Functions
find findBy returns one record findAll findAllBy returns all the records --~--~-~--~~~---~--~~ 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: Cjs stripping non-unicode compatible
Hmm even with adding in this line into ajax.thtml layout it still comes up. Everything comes out as still. I thought it was my locale __('keyword') causing it, but when I removed it and manually put in the chinese characters they still come out as ???. Is Cjs stripping my unicode, or, is the Element.Updater(_elem, unescape() ruining my strings? Here is my POST dump from firebug: Date: Mon, 28 Aug 2006 06:36:56 GMT Server: Apache/2.0.55 (Unix) PHP/5.1.4 DAV/2 mod_ssl/2.0.55 OpenSSL/0.9.7i X-Powered-By: PHP/5.1.4 Set-Cookie: CAKEPHP=6203dd4e212235f70d7ad00a07729493; expires=Mon, 04 Sep 2006 06:36:56 GMT; path=/eApproval/ Content-Length: 2737 Connection: close Content-Type: text/html;charset=UTF-8 script type=text/javascript _elem=$('header'); Element.update(_elem,unescape(%3Cdiv%20id%3D%22header_content%22%3E%0A%09%3Cdiv%20id%3D%22header_left%22%3E%0A%3Cdiv%20id%3D%22language%22%3E%0D%0A%3Ca%20href%3D%22%2FeApproval%2Flanguages%2Fchange%2Fen_gb%22%20%3E%3Cimg%20src%3D%22%2FeApproval%2Fimg%2Flocale%2Fen_gb.png%22%20alt%3D%22Change%20to%3A%20UK%20English.%22%20title%3D%22Change%20to%3A%20UK%20English.%22%20style%3D%22border%3A%200px%3B%22%20%2F%3E%3C%2Fa%3E%3Ca%20href%3D%22%2FeApproval%2Flanguages%2Fchange%2Ffr_fr%22%20%3E%3Cimg%20src%3D%22%2FeApproval%2Fimg%2Flocale%2Ffr_fr.png%22%20alt%3D%22Change%20to%3A%20UK%20English.%22%20title%3D%22Change%20to%3A%20UK%20English.%22%20style%3D%22border%3A%200px%3B%22%20%2F%3E%3C%2Fa%3E%3Ca%20href%3D%22%2FeApproval%2Flanguages%2Fchange%2Fcn_cn%22%20%3E%3Cimg%20src%3D%22%2FeApproval%2Fimg%2Flocale%2Fcn_cn.png%22%20alt%3D%22Change%20site%20locale%20to%20Chinese.%22%20title%3D%22Change%20site%20locale%20to%20Chinese.%22%20style%3D%22border%3A%200px%3B%22%20%2F%3E%3C%2Fa%3E%3C%2Fdiv%3ENot%20logged%20in.%0A%3C%2Fdiv%3E%0A%3Cdiv%20id%3D%22header_right%22%3E%0A%3Cfont%20size%3D%2216%22%3E%20%3C%21--%20%3F%3F%3F%3F%20--%3E%20%3C%2Ffont%3E%0A%3C%2Fdiv%3E%0A%3C%2Fdiv%3E)); _elem=$('dynamic_menu'); Element.update(_elem,unescape()); _elem=$('main_content'); Element.update(_elem,unescape(%3Cdiv%20id%3D%22boxed_dk_ex%22%3E%0A%3Cform%20onSubmit%3D%22return%20false%3B%22%3E%0A%09%3Clabel%20for%3D%22username%22%3E%3F%3F%3F%3F%3C%2Flabel%3E%0A%09%3Cinput%20name%3D%22data%5BUser%5D%5Busername%5D%22%20%20size%3D%2220%22%20class%3D%22textbox_required%22%20value%3D%22%22%20type%3D%22text%22%20id%3D%22UserUsername%22%20%2F%3E%3Cbr%20%2F%3E%0A%0A%09%3Clabel%20for%3D%22password%22%3E%3F%3F%3C%2Flabel%3E%0A%09%3Cinput%20name%3D%22data%5BUser%5D%5Bpassword%5D%22%20%20size%3D%2220%22%20class%3D%22textbox_required%22%20value%3D%22%22%20type%3D%22text%22%20id%3D%22UserPassword%22%20%2F%3E%0A%09%3Cinput%20type%3D%22submit%22%20value%3D%22%3F%3F%26rarr%3B%22%20id%3D%22submit294069164%22%20onclick%3D%22return%20false%3B%22%20%2F%3E%3Cscript%20type%3D%22text%2Fjavascript%22%3EEvent.observe%28%22submit294069164%22%2C%20%27click%27%2C%20function%28event%29%7B%20new%20Ajax.Updater%28%27main_content%27%2C%27%2FeApproval%2Fusers%2Flogin%27%2C%20%7Basynchronous%3Atrue%2C%20evalScripts%3Atrue%2C%20parameters%3AForm.serialize%28Event.element%28event%29.form%29%2C%20requestHeaders%3A%5B%27X-Update%27%2C%20%27main_content%27%5D%7D%29%20%7D%2C%20false%29%3B%3C%2Fscript%3E%3C%2Fform%3E%0A%3C%2Fdiv%3E)); _elem=$('header'); new Effect.Appear(_elem,[]) _elem=$('dynamic_menu'); new Effect.Appear(_elem,[]) _elem=$('main_content'); new Effect.Appear(_elem,[]) /script!-- 0.1647s -- --~--~-~--~~~---~--~~ 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: othAuth redirect problem
are you sure you are logged in when he sends you back? did you increase the $gid and set $strict_gid_check to false in the component's config, like the tutorial says? A good way to check if you're logged in is to put this in a view/layout (don't forget to load the helper) ?php $othAuth-init($othAuth_data); if ($othAuth-sessionValid()) echo okay i'm logged in; ? --~--~-~--~~~---~--~~ 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: I need some help about models.
Hi there, On 8/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: //I'm trying to get the articles, I tried many things, but unhelpful...$this-Rubrique-findbycategorie($nom); Shouldn't this be: $this-Rubrique-findAllByCategorie($nom); Sonic --~--~-~--~~~---~--~~ 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: Multiple Checkboxes
Hi, check my entries in the threads below and see if they help. It looks as though you have the format for HABTM fields slightly wrong. For multiple checkboxes you need to construct the HTML yourself - the HTML helper doesn't have a function that will automate this. http://groups.google.com/group/cake-php/browse_thread/thread/bea4e4a2e00c5cb6/cb1fbea80878792c#cb1fbea80878792c http://groups.google.com/group/cake-php/browse_thread/thread/3faf99103b090624/034922ffa4158f88#034922ffa4158f88 - ad codecowboy wrote: I am creating a form that has multiple checkboxes. The basic ideas is to allow users to select multiple foods that they like. Each food that they like is stored in the same table but in a different row. The foods are categorized. For instance, once the user checks the fruits checkbox, an ajax function is called that displays all of the fruit choices. The user can then check bannanas, apples etc... In the controller, I have no way of determining which checkboxes that they selected, because cake expects you to name the inputs like '/foods/name'. In summary (1) I am currently using this syntax to output each checkbox inside of a loop : echo ($html-checkbox('Food/name/' . $next_indentation_id . '/' . $id, null, array('id'=$id, 'value'=$id, 'onchange'=$ajaxFunction))); What syntax should I use to display each checkbox? NOTE: id is unique. (2) How can I store data into multiple rows of the same database for the same user in cake (each checked box should result in a new row)? I know how to hack this and make it work but I am looking for a graceful solution. Thank you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Hye Pls Join My New Grps
Hi Dear YAHOO Members, THNX 4 using YAHOO ! Groups I have also started following new groups IF YOU ARE LOOKING FOR JOBS, JOIN OUR FOLLOWING YAHOO/GOOGLE GROUP A2ZHRINFOSERVICES, WE WILL POST JOBS IN YOUR EMAIL http://finance.groups.yahoo.com/group/a2zhrinfoservices/join http://groups.google.com/group/professionalsjobs4u/subscribe IF YOU ARE LOOKING FOR BRIDE GROOMS, JOIN OUR FOLLOWING YAHOO/GOOGLE GROUP net4matrimonialsdotcom, WILL WILL POST NEW PROFILES OF BRIDES/GROOMS WEEKLY http://groups.yahoo.com/group/net4matrimonialsdotcom/join http://groups.google.com/group/yourmatrimony/subscribe Thnx in advance Urs RITU Download free Lovemeter Software from http://groups.yahoo.com/group/lovemeter --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
help please
Hey guys I am having problems in using HABTM relationship.I am having problems while saving the data from the form to the three tables.Manual was not that helpful.So can anyone help me in this .Just great a form and show me how to save the data in the association table and the the two other tables. --~--~-~--~~~---~--~~ 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: help please
Hi Checker, see http://manual.cakephp.org/chapter/models section Saving hasAndBelongsToMany for an example. Cheers, AD7six --~--~-~--~~~---~--~~ 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: Problems with Cookies
or you can wait to use the new version of othAuth coming along nicely ( multi group per user, remember me other goodies ) :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
debug mode and error logs
Hi, i'm trying to change the behaviour of the 'DEBUG = 0' mode. When the DEBUG mode is off, the errors aren't shown in the web browser. This is really nice in production, but i think it would be nice to hide that messages in the browser but still, show them in the error_log file, to check if any error has appeared. I tried to change the behaviour changing the cake/bootstrap.php file like this: if (DEBUG) { error_reporting(E_ALL); if (function_exists('ini_set')) { ini_set('display_errors', 1); } } else { error_reporting(E_ALL); if (function_exists('ini_set')) { ini_set('display_errors', 0); } } instead : ... } else { error_reporting(0); } But it doesn't work, the messages aren't shown in the error_log file. The funny thing is that if i put: if (DEBUG) { error_reporting(E_ALL); if (function_exists('ini_set')) { ini_set('display_errors', 0); } } It works perfectly as i would like 'DEBUG=0' works, reporting every message but not showing them in the browser. I've been browsing the cake code but i can't understand why i can't report errors when i have 'DEBUG=0'. Is there any other part of the code that prevents this? Bye. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Is there any possible to prevent these additional quering DESC users; DESC articles.... etc.
Hi, there This question has puzzled me for a long time. I found that as long as the cache expired(I hope I'm right:P), there are many addtional queries excuted like below: 1 DESC `users` 21 21 15 2 DESC `groups` 5 5 26 3 DESC `permissions` 4 4 32 4 DESC `articles` 10 10 28 5 DESC `categories` 6 6 29 6 DESC `votes` 12 12 34 7 SELECT `User`.`id`, `User`.`group_id`, `User`.`username`, `User`.`password`, `User`.`mobile`, `User`.`area`, `User`.`email`, `User`.`gender`, `User`.`photo`, `User`.`name`, `User`.`pid`, `User`.`description`, `User`.`created`, `User`.`modified`, `Group`.`id`, `Group`.`name`, `Group`.`isAdmin`, `Group`.`created`, `Group`.`modified` FROM `users` AS `User` LEFT JOIN `groups` AS `Group` ON `User`.`group_id` = `Group`.`id` WHERE (`User`.`id` = 135) LIMIT 1 1 1 16 I only need the 7th 'SELECT' statement, but the other queries take much more loads of the server. I have tried the 'unbindModel()' method, but it seems useless. Is there any possible to cut these 'DESC' queries or prolong the cache period for performance purpose. Thanks! -- FH. --~--~-~--~~~---~--~~ 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: Problems with Cookies
Even better - but how far off is it? --~--~-~--~~~---~--~~ 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: othAuth redirect problem
Hi [EMAIL PROTECTED] Yes, I am sure that I am logged in. I am able to see the message okay i'm logged in. Also I made $strict_gid_check = false and $gi = 99. Here, the code for the controller that I am using class AppController extends Controller { var $components = array('othAuth'); var $helpers = array('html', 'othAuth'); var $othAuthRestrictions = array('add', 'edit', 'delete', 'view'); function beforeFilter() { $auth_conf = array('auto_redirect' = true, 'login_page' = 'users/login', 'logout_page' = 'users/logout', 'access_page' = 'articles/read/1', 'hashkey' = 'justWriteSomeRandomCrapHere', 'strict_gid_check' = false); $this-othAuth-controller = $this; $this-othAuth-init($auth_conf); $this-othAuth-check(); } } ? Regards --~--~-~--~~~---~--~~ 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: Is there any possible to prevent these additional quering DESC users; DESC articles.... etc.
The DESC stuff is used by the model to allow you to use the magic DB functions. Without that introspection there is no way for your model to automatically know the names of all the columns. On 8/28/06, Fasthold [EMAIL PROTECTED] wrote: Hi, there This question has puzzled me for a long time. I found that as long as the cache expired(I hope I'm right:P), there are many addtional queries excuted like below: 1 DESC `users` 21 21 15 2 DESC `groups` 5 5 26 3 DESC `permissions` 4 4 32 4 DESC `articles` 10 10 28 5 DESC `categories` 6 6 29 6 DESC `votes` 12 12 34 7 SELECT `User`.`id`, `User`.`group_id`, `User`.`username`, `User`.`password`, `User`.`mobile`, `User`.`area`, `User`.`email`, `User`.`gender`, `User`.`photo`, `User`.`name`, `User`.`pid`, `User`.`description`, `User`.`created`, `User`.`modified`, `Group`.`id`, `Group`.`name`, `Group`.`isAdmin`, `Group`.`created`, `Group`.`modified` FROM `users` AS `User` LEFT JOIN `groups` AS `Group` ON `User`.`group_id` = `Group`.`id` WHERE (`User`.`id` = 135) LIMIT 1 1 1 16 I only need the 7th 'SELECT' statement, but the other queries take much more loads of the server. I have tried the 'unbindModel()' method, but it seems useless. Is there any possible to cut these 'DESC' queries or prolong the cache period for performance purpose. Thanks! -- FH. -- Chris Hartjes The greatest inefficiencies come from solving problems you will never have. -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
1:many association where order is important
Hey guys, i'm porting an old app to cake, but i've come across this: i have a form where people can post their top5 of favorite songs in the legacy database layout i had a table songs with fields id,artist and title, and a table top5s with fields id, song1_id, song2_id, song3_id, song4_id, song5_id so in the form itself, you only entered the 5 artist-title pairs, they were saved as songs and the proper links would be made. the problem is that the order of the songs is important, so i can't just give a song a top5_id to link the songs to the top5 (this is the usual approach), because i need to know which song is first choice etc. (unless i would totally rely on the fact that the songs are saved in order, so the lowest id would be the first choice) i've also tried putting a hasOne in the song model, and this in the top5 model: var $belongsTo = array( 'Song1' = array('className' = 'Song', 'conditions' = '', 'order' = '', 'foreignKey' = '', 'counterCache' = ''), 'Song2' = array('className' = 'Song', 'conditions' = '', 'order' = '', 'foreignKey' = '', 'counterCache' = ''), 'Song3' = array('className' = 'Song', 'conditions' = '', 'order' = '', 'foreignKey' = '', 'counterCache' = ''), 'Song4' = array('className' = 'Song', 'conditions' = '', 'order' = '', 'foreignKey' = '', 'counterCache' = ''), 'Song5' = array('className' = 'Song', 'conditions' = '', 'order' = '', 'foreignKey' = '', 'counterCache' = ''), but i don't know if this is the right approach i hope someone can guide me in this, to make it working like it should, hopefully without having to (manually) alter many records in the database --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Video file Uploading
hi all, Can any body guide me please how to upload video files using php and how to maintain it? Is there any thing diffrent way to upload a video files? Regards, poorna --~--~-~--~~~---~--~~ 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: Is there any possible to prevent these additional quering DESC users; DESC articles.... etc.
Thanks for you reply. My idea is that to specify the fields by hand and don't let cake to do the describe query. --~--~-~--~~~---~--~~ 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: Is there any possible to prevent these additional quering DESC users; DESC articles.... etc.
When in debug mode, the cache of the model description expires every 20 seconds or so. However, when you switch to production mode (DEBUG = 0) the cache file stays active indefinitely (so the extra queries are not executed). --~--~-~--~~~---~--~~ 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: 1:many association where order is important
Try this: var $hasMany = array('Song' = array('order' = 'Song.id DESC')); --~--~-~--~~~---~--~~ 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: Is there any possible to prevent these additional quering DESC users; DESC articles.... etc.
Hi Fasthold, Fasthold wrote: I only need the 7th 'SELECT' statement, but the other queries take much more loads of the server. I have tried the 'unbindModel()' method, but it seems useless. If you are in debug mode queries are not cached for very long (a few minute(s) I think) hence you will see DESC statements in your debug window. If you refresh the page imediately you won´t see the DESC statements, as it´s taken from the cache. if you are not running in debug mode these desc statements are cached much longer (weeks). Is there any possible to cut these 'DESC' queries or prolong the cache period for performance purpose. If you are debugging, you probably don´t want that - which is possibly why cake caches the DESC for a short period of time. If you are not debugging it´s not relavent, but you won´t see that because there isn´t a sql debug window :) But anyway: you can make your models persistent, which then means that there are no DESC statements: http://groups.google.com/group/cake-php/browse_frm/thread/d0e5e9cc7353ece/023dd55fddc5c3c4?lnk=gstq=persistent+descrnum=1#023dd55fddc5c3c4 Cheers, AD7six --~--~-~--~~~---~--~~ 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: Re: Is there any possible to prevent these additional quering DESC users; DESC articles.... etc.
Which is why when ever you update your database with new fields you need to clear the various cache files or you can get bit in the a$$ like I used to ;) Sam D On 8/28/06, nate [EMAIL PROTECTED] wrote: When in debug mode, the cache of the model description expires every 20 seconds or so. However, when you switch to production mode (DEBUG = 0) the cache file stays active indefinitely (so the extra queries are not executed). -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ 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: Problem with Magic Functions
As RosSoft has said, findByFieldName will only return one record, whereas findAllByFieldName will return all of them. However, the variation of the method name you use will depend on your version of PHP. PHP4 users must use findAllByPost_id (this is also compatible with PHP5), but PHP5 users can also use the CamelCase syntax of findAllByPostId. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
rdBloggery problem with pages
I working on a new install of rdBloggery. Everything is working great but I am unable to load pages and realize I don't quite understand some of the relationships in this particular usage of Cake pages. In my rdBloggery app, any new pages added to /views/pages/ produce the error: Missing Model No class found for the model Page Notice: this error is being rendered by the app/views/errors/missing_model.thtml view file, a user-customizable error page. Fatal: Unable to load model Page Fatal: Create Class: ?php class Page extends AppModel { var $name = 'Page'; } ? in file : app/models/page.php I'm confused... a) why does rdBloggery use a pages controller while the default cake install does not b) why is this error message citing a file (app/models/page.php) that does not exist in the rdBloggery default install? There is something here I'm missing... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Passing variables to store procedures
Hello Using: PHP 5, MySql 5.0.x, last cakephp. I have the following store procedure on a Mysql 5.0.x instance: procedure zz( in a int, in b int, out errmsg char(255) ) ... Does anyone have an example on how to call the store procedure from cakephp? Thanks, M. --~--~-~--~~~---~--~~ 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: othAuth redirect problem
Ok..got it solved.. It seems the problem was somewhere with the data that I loaded in the 4 tables. Once, I cleaned all my tables and reloaded the data, everything got solved. Regards --~--~-~--~~~---~--~~ 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: rdBloggery problem with pages
Gwoo provided the solution on the irc channel pages_controller needed to have an entry for var $uses = array(); After adding the line, pages displayed fine. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
image resize
i have a problem generating pictures on the fly. i saw this component a href='http://wiki.cakephp.org/docs:components:custom:thumbnail_generator'thumbnail_generator/a where i need to put the code $thm-makeThumbContent($file); to output image like this img src='gen_pict.php' --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
HABTM: two associations used same table
Hello! Is there a way to handle this: Example: I have tables users, languages, languagelevels, languages_users Languages_users have following fields: - user_id - language_id - languagelevel_id This is simply: each users speaks a language with a skill level Users model has: . var $hasAndBelongsToMany = array('Language' = array('className' = 'Language', 'joinTable' = 'languages_users', 'foreignKey' = 'user_id', 'associationForeignKey'= 'language_id', 'conditions' = '', 'order' = '', 'limit' = '', 'unique' = true, 'finderSql' = '', 'deleteQuery'= '', ), 'Languagelevel' = array('className' = 'Languagelevel', 'joinTable' = 'languages_users', 'foreignKey' = 'user_id', 'associationForeignKey'= 'languagelevel_id', 'conditions' = '', 'order' = '', 'limit' = '', 'unique' = true, 'finderSql' = '', 'deleteQuery'= '', ) ); The problem is, when I try to save the data I got following: INSERT INTO `users` (...everything is ok here...) DELETE FROM `languages_users` WHERE user_id = '32' INSERT INTO `languages_users` (user_id,language_id) VALUES ('32','1') INSERT INTO `languages_users` (user_id,language_id) VALUES ('32','4') DELETE FROM `languages_users` WHERE user_id = '32' INSERT INTO `languages_users` (user_id,languagelevel_id) VALUES ('32','1') INSERT INTO `languages_users` (user_id,languagelevel_id) VALUES ('32','3') Second DELETE makes it wrong. Is there a way to handle this situation? Or maybe I should redesign my tables? --~--~-~--~~~---~--~~ 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: image resize
Hi Khaled, I use: $this-DirectoryStructure-basepath = WWW_ROOT.IMAGES_URL .$this-galleryPath; $this-ThumbnailGenerator-thumbnailGenerator(); $images = $this-DirectoryStructure-ListDir(); $data = ''; foreach($images as $img) { if(substr($img,0,6)=='_thmb_') continue; elseif($this-ThumbnailGenerator-makeThumbFile(WWW_ROOT.IMAGES_URL.$this-galleryPath.$gal.$img,WWW_ROOT.IMAGES_URL.$this-galleryPath.$gal.'_thmb_'.$img)) { $data .= 'Ready: '.$img.'br/'; } } to parse thru a directory and generate thumbnails. You'll need to download the DirectoryStructure component too. Hope that helps! --~--~-~--~~~---~--~~ 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: I need some help about models.
yeah but, I want to do this: /rubriques/index to show all the categories and /rubriques/cat_name to show all the articles from the category cat_name and /articles/read/article_title to read the article named article_title /articles/index would only be a message like, Choose a category! That's what I want to do... Thanks for your help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: I need some help about models.
You're going to need to create custom routes then. Check out the manual for info on how to do those. Basically you'll map '/rubriques/index' to a controller/action pair that displayes all the categories, to use one example. On 8/28/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: yeah but, I want to do this: /rubriques/index to show all the categories and /rubriques/cat_name to show all the articles from the category cat_name and /articles/read/article_title to read the article named article_title /articles/index would only be a message like, Choose a category! That's what I want to do... Thanks for your help! -- Chris Hartjes The greatest inefficiencies come from solving problems you will never have. -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Video file Uploading
http://www.raditha.com/php/progress.php poorna wrote: hi all, Can any body guide me please how to upload video files using php and how to maintain it? Is there any thing diffrent way to upload a video files? Regards, poorna --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
3 table join help?
Can somone show me an online example that includes a 3 table join? Here is my join table: car_id int make_id int year_id int so this join table has an id from 3 different tables. The only examples I've been able to find have only 2 ids. The name of the table is cars_makes_years. I am unsure of what to name the model. Should it be cars_makes_year.php? Thanks for any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: multiple hasAndBelongsToMany ajax create/add form...
gwoo wrote: Have you tested with scaffolding? Yes, the models and associations work just fine - it's the new extra functionality I'm trying to add that's giving me trouble. I think I'll go back and look at the generated code again for some hints, though. Thanks for the reply. --~--~-~--~~~---~--~~ 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: multiple hasAndBelongsToMany ajax create/add form...
Samuel DeVore wrote: you might also look at the model functions that RosSoft posted today. http://rossoft.wordpress.com/2006/08/23/working-with-habtm-associations/ beauty! That's very helpful. Thanks! I've also been looking at the acts_as_taggable plugin in Rails, and wondering if someone has done something similar for cakePHP. Unfortunately, I don't have time right now to pursue implementing such a plugin, but maybe after I finish the current project and get the bills paid... --~--~-~--~~~---~--~~ 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: Is there any possible to prevent these additional quering DESC users; DESC articles.... etc.
WOW! Thanks a lot to the all of the above! I'll enjoy my happy baking regardless of the DESC stuff :) Regards, --FH --~--~-~--~~~---~--~~ 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: data associations
I would like to find out more about this as well. Any takers? --~--~-~--~~~---~--~~ 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: Re: data associations
it's cheating ;) use the bindModel methods for this little dealio see http://cakebaker.wordpress.com/2006/02/22/new-feature-bindmodelunbindmodel/ Its the bee's knees Sam D On 8/28/06, Cheeze [EMAIL PROTECTED] wrote: I would like to find out more about this as well. Any takers? -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---