Paging related records in 1.2
Would anyone take the time to show me how I might be able to page related records. The situation is such that I have categories related to themselves through a parent id and the tree behavior. That is working fine for me so far. The index action uses the $this->set('categories', $this->paginate()); to send its data to the view. For the view action I have the category data and related child categories displayed. Is there a convenient way to page the child data? -- View this message in context: http://www.nabble.com/Paging-related-records-in-1.2-tf3629194.html#a10133946 Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ 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: no mod_rewrite - does it matter in the greater scheme of things?
On 4/22/07, Steve Boyd <[EMAIL PROTECTED]> wrote: > > does it matter for anything else?? > It's about elegant-looking URL's. You can have your ugly URL's with a ? in it. I'll make sure mod_rewrite works with my stuff. -- Chris Hartjes My motto for 2007: "Just build it, damnit!" @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?hl=en -~--~~~~--~~--~--~---
no mod_rewrite - does it matter in the greater scheme of things?
hey im new to cake. love it. anyway i messed around with mod_rewrite for ages but could get it to work properly on my (shared) server no biggie. using index.php/controller/action urls (yeah i know i can also do ?/controller/action) my question is in the greater scheme of things does using query string actually matter? i have a tiny bit of knowledge with REST and it seems like have a ?query string in there isn't ideal...but does it really matter? does it matter for anything else?? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
is there another Star Rating code or helper to cake ?
Hello guys... how r u ? I have trying to use http://rossoft.wordpress.com/2006/09/07/ajax-star-rating-helper/ withou sucess... Its to complicate and i can understand the user's posts about how to use it... So... is there another way ? or can someone send me and fully usefull example of rossoft Star Rating code ? Thx to all 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?hl=en -~--~~~~--~~--~--~---
Re: mod_rewrite Problem
You could try defining something like this in your httpd.conf. You must have mod_rewrite enabled. DocumentRoot ServerName sandbox --or the name you want for your app example > AllowOverride all Then you need to define sandbox as alias of your localhost in /etc/ hosts or c:\windows\system32\drivers\hosts. Restart apache and voila. Aldo. On Apr 21, 4:12 pm, cake php <[EMAIL PROTECTED]> wrote: > Hi i also have one problem with mod_rewrite( i am not sure). > > i use iis5 and apache, both disable mod_rewrite. > > i delete .htaccess files. and uncomment DEFINE in core.php. > > The same blog tutorial in cakephp manual. > > routes.php: $Route->connect('/', array('controller'=>'posts', > 'action'=>'index')); > > My problem is; > > The URL:http://localhost/index.phpcan be accessed. > > But link in this page can not be accessed: page not found > > the links are: > > http://localhost/index.php/posts/view/1http://localhost/index.php/posts/delete/1http://localhost/index.php/posts/view/3 > > is there any stange about those URL? > > i don't know what happened. > > mod_rewrite issure? or other configure error? > > Thanks > > On 4月17日, 下午3时56分, jyrgen <[EMAIL PROTECTED]> wrote: > > > For testing purposes you can disable the mod_rewrite > > feature by renaming the .htaccess files to _.htaccess > > with the DEFINE in app/config/core.php uncommented. > > > if it works, than you have to check your apache conf > > to see if it allows overwriting settings by htaccess files at all. > > > greetings, jyrgen --~--~-~--~~~---~--~~ 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: blog tutorial problem
Sixs, There is a mistake on Blog Tutorial index.thtml page (page 11 of blog tutorial part). It should be link('Add Post', '/posts/add/');?> instead of Add Post Hope this helps. Regards. Aldo. On Apr 16, 11:42 pm, "SIXS" <[EMAIL PROTECTED]> wrote: > I copied the code and got the first page to run showing the files. I clik on > add and I dont find the page, but I see the page add. I do the edit and the > delete and the same. problem > I have cake installed in wamp/www/cake. blog is installed in the app older. I > run winxp, mysql, apache and php5. > Is there a way I can debug this ? > Jim --~--~-~--~~~---~--~~ 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: Properly working with custom inflections (so that bake.php works too)
Hi, I had the same problem (Cake v1.2.0.4798alpha) with bake.php and irregular inflections in german :) I solved it somehow - and with your table "artikel_categorie" it should work as follows: --- $uninflectedPlural = array(); $irregularPlural = array( 'artikel_categorie' => 'artikel_categorieen', // next line is for bake.php "model to controller"-mapping 'artikelcategorie' => 'artikelcategorieen' ); $singularRules = array(); $uninflectedSingular = $uninflectedPlural; // and the modified irregularSingular-Mapping $irregularSingular = array_merge( array_flip($irregularPlural), array( 'artikelcategorieen' => 'ArtikelCategorie' ) ); --- Not the smartest solution, but it works for my inflections... Hope that workaround will help you too! Regards On Apr 12, 12:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hey guys, for my project I have a lot of irregular inflections (the > fact that my models are in dutch has something to do with that ;-) > > But I have trouble with defining them correctly so that cake knows > them, and also bake can work with them. > Currently I have only used the $irregularPlural (and > $irregularSingular) variables because I think this should be enough > My setup is here:http://bin.cakephp.org/view/1466261275 > > It are the fine basics that I have problems with, take for example the > model ArtikelCategorie, the plural should be ArtikelCategorieen. How > are we supposed to work with underscores, upper/lowercase characters? > Is it right the way I've put it there? > > Also, bake chokes on it, I don't know if it's a bug in bake, or > because I didn't configure the inflector correctly. > When i start bake, it lists the model as ArtikelCategories, even > though I have baked the model ArtikelCategorie successfully and the > plural seems correct. Then when i choose to bake a controller for it, > it says: > "Would you like this controller to use other models besides > 'ArtikelCategory'?" > And finally it stops and says "You must have a model for this class to > build scaffold methods. Please try again." > > So i manually created a controller, called > ArtikelCategorieenController with $name = 'ArtikelCategorieen' > When trying to bake views, it lists the controller as > artikelcategorieen (no capital C) and later on stops, saying > The file '/app/controllers/artikelcategorieen_controller.php' could > not be found. --~--~-~--~~~---~--~~ 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: association with mysql View
It might be helpful if you include all the SQL being executed by Cake, and how you have defined the relationship... On Apr 21, 11:59 pm, sumanpaul <[EMAIL PROTECTED]> wrote: > Ok the situation is bit complicated (to me atleast :P) > I will try my best to explain . > > 1. I am using cake 1.2 > > 2. Windows env, apache, mysql, php 5 > > Now I am making a personal financing app, where i have users, > transactions, tables. I am storing all transaction with user_id and I > have hasMany relation between user & transaction. > > I have created a view > ==> "select `transactions`.`user_id` AS > `user_id`,sum(`transactions`.`amount`) AS `total` from `transactions` > group by `transactions`.`user_id`" > which returns > > view name = balances > uers_id total > > 1 1200 > 2900 > > the user has "hasOne" relation with balances. > > when I use > $this->set('user', $this->User->read(null, $id)); > > in user_controllers.php I am getting > > [Balance] => Array > ( > [total] => 2939.20 > ) > in the view ... no issues with this. But I am also getting > > [transactions] => > > now this is causing problem. > > the whole array is something like this > > Array > ( > [User] => Array > ( > [id] => 1 > [created] => 2007-04-07 10:21:23 > [modified] => 2007-04-09 12:50:26 > [username] => suman > [password] => 5f4dcc3b5aa765d61d8327deb882cf99 > [name] => Suman Paul > [group_id] => 1 > [active] => 1 > ) > [transactions] => > [Balance] => Array > ( > [total] => 2939.20 > ) > . > > At top I am getting an error ... > Notice (8): Undefined index: transactions [CORE\cake\libs\model > \datasources\dbo_source.php, line 685] > > I understand that the error is due to blank [transactions] => and > thats becuse of the view I created. > but I was wondering why it is coming. > > any body could shed any light, that will be really helpful. > > reagrds > suman --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Trying to Validate Password field
I'm creating a user registration area and I am having difficulty doing custom validation on the Password input field. I have the following code in my controller: __ /* Custom Password Validation */ if (empty ($this->data['User']['password'])) { $this->User->invalidate ('password'); } else if (empty ($this->data['User']['passwordc'])) { $this->User->invalidate ('passwordc'); } else if ($this->data['User']['password'] != $this->data['User'] ['passwordc']) { $this->User->invalidate ('password_comfirmation'); } __ And I have the following code in my view: __ tagErrorMsg('User/password', 'Password is required.'); ?> Password: password ('User/password', array('size'=>'30', 'class'=>'input')); ?> tagErrorMsg('User/passwordc', 'You must confirm your password.'); ?> Confirm Password: password('User/passwordc', array('size'=>'30', 'class'=>'input'))?> __ When I submit the form, it does do the password invalidation. The problem is, the invalidation of the Password field never triggers an error in validation. It will just happily save the blank password to the database. Any ideas why this would happen? I have a couple of other fields where I'm doing custom validation and it works 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?hl=en -~--~~~~--~~--~--~---
Re: Routing and FindAll();
Cool! That will save me a lot of code rewriting ;) Thanks for the reply, Mariano! I'm going to try it out! On 22 apr, 18:58, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Sure, write sitename on your AppController::beforeFilter() to the Configure > instance: > > Configure::write('site', 'sitename'); > > Then on AppModel::beforeFind() you can add a condition to set the sitename: > > function beforeFind($queryData) { > if ($this->hasField('sitename') && !in_array('sitename', > array_keys($queryData['conditions'])) && !in_array($model->name . > '.sitename', array_keys($queryData['conditions']))) { > $queryData['conditions'][$model->name . '.sitename'] = > Configure::read('site'); > } > > return $queryData; > > } > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de gerbenzomp > Enviado el: Domingo, 22 de Abril de 2007 11:07 a.m. > Para: Cake PHP > Asunto: Routing and FindAll(); > > But does this mean I have to add "WHERE sitename = $this->params[sitename];" > to every findAll(), query(), etc in every > > controller in my system? Or is there an easier way, so Cake > automatically knows it should use the sitename in the url in every > 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?hl=en -~--~~~~--~~--~--~---
RE: where to change or add 'This field cannot be left blank' such validate msg?
IMO, regarding your comment on how to display negative numbers, or how to display any number for that matter, is the sole responsibility of the view. The Model should be independent of how data is to be displayed. What if the View renders the model as a PDF document? What if the view renders it as an XML? There are different ways on how to display the color red depending on the end display engine, and models should know nothing about display. The same way, if an error message should contain special formatting aiming for a rendering engine (HTML for that matter,) it is the view responsibility on properly formatting it to display it. Now you can of course set an intermediate language as part of the error message in the model, and then properly render that error message on the view depending on the format the view should output. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de nate Enviado el: Domingo, 22 de Abril de 2007 02:52 p.m. Para: Cake PHP Asunto: Re: where to change or add 'This field cannot be left blank' such validate msg? One of the classic MVC debates relates to the display of negative numbers which, in typical accounting applications are displayed in red. But which tier is responsible for deciding that? There are good arguments on both sides (especially when you consider desktop applications), and no one right answer. --~--~-~--~~~---~--~~ 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: where to change or add 'This field cannot be left blank' such validate msg?
One of the classic MVC debates relates to the display of negative numbers which, in typical accounting applications are displayed in red. But which tier is responsible for deciding that? There are good arguments on both sides (especially when you consider desktop applications), and no one right answer. Validation messages set in the model can be *optionally overridden* in the view. On Apr 22, 1:14 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Just because you have the rm command in Linux doesn't mean that you should > use rm -Rf / without thinking what you are doing. > > Why do you say you need to change two places?? All you have to do is set it > in the view, you *DON'T* have to set it in the model. > > "Validation error msg is not truly view thing": oh yeah? What about if your > client asks you in the future to have *all* messages in your application > multi-lingual? If you had your error message on the view, then that would be > a no-brainer. I suggest you read > overhttp://en.wikipedia.org/wiki/Model-view-controllerto understand more about > what each tier brings in to the system. > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de [EMAIL PROTECTED] > Enviado el: Domingo, 22 de Abril de 2007 05:48 a.m. > Para: Cake PHP > Asunto: Re: where to change or add 'This field cannot be left blank' such > validate msg? > > as you said,why there is a way to make msg in model? > > and if I wanna change the validation and relate validation msg ,I > think I should make changes in one place instead of two places. > and in my opinion ,the validation error msg is not truly view thing.it > is more close to model than to view --~--~-~--~~~---~--~~ 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: where to change or add 'This field cannot be left blank' such validate msg?
Just because you have the rm command in Linux doesn't mean that you should use rm -Rf / without thinking what you are doing. Why do you say you need to change two places?? All you have to do is set it in the view, you *DON'T* have to set it in the model. "Validation error msg is not truly view thing": oh yeah? What about if your client asks you in the future to have *all* messages in your application multi-lingual? If you had your error message on the view, then that would be a no-brainer. I suggest you read over http://en.wikipedia.org/wiki/Model-view-controller to understand more about what each tier brings in to the system. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de [EMAIL PROTECTED] Enviado el: Domingo, 22 de Abril de 2007 05:48 a.m. Para: Cake PHP Asunto: Re: where to change or add 'This field cannot be left blank' such validate msg? as you said,why there is a way to make msg in model? and if I wanna change the validation and relate validation msg ,I think I should make changes in one place instead of two places. and in my opinion ,the validation error msg is not truly view thing.it is more close to model than to view --~--~-~--~~~---~--~~ 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: Routing and FindAll();
Sure, write sitename on your AppController::beforeFilter() to the Configure instance: Configure::write('site', 'sitename'); Then on AppModel::beforeFind() you can add a condition to set the sitename: function beforeFind($queryData) { if ($this->hasField('sitename') && !in_array('sitename', array_keys($queryData['conditions'])) && !in_array($model->name . '.sitename', array_keys($queryData['conditions']))) { $queryData['conditions'][$model->name . '.sitename'] = Configure::read('site'); } return $queryData; } -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de gerbenzomp Enviado el: Domingo, 22 de Abril de 2007 11:07 a.m. Para: Cake PHP Asunto: Routing and FindAll(); But does this mean I have to add "WHERE sitename = $this- >params[sitename];" to every findAll(), query(), etc in every controller in my system? Or is there an easier way, so Cake automatically knows it should use the sitename in the url in every 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?hl=en -~--~~~~--~~--~--~---
RE: integration with other software
Drake (Drupal integration) should be: http://dev.sypad.com/projects/drake -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de gerbenzomp Enviado el: Domingo, 22 de Abril de 2007 10:34 a.m. Para: Cake PHP Asunto: Re: integration with other software Drupal: http://www.thinkingphp.org/2006/01/25/drake-drupal-cakephp-is-making-progres s/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routing and FindAll();
I want different users to be able to use my whole system, and I want them to have their own sitename before the controller and action, like this: www.domain.com/sitename/controller/action/ With help from people on the forum, I've discovered I can best use this approach in routes.php: $Route->connect("/:sitename/posts/*, array("controller" => "posts", "action" => "index")); $Route->connect("/:sitename/categories/*, array("controller" => "categories", "action" => "index")); // etc... But does this mean I have to add "WHERE sitename = $this- >params[sitename];" to every findAll(), query(), etc in every controller in my system? Or is there an easier way, so Cake automatically knows it should use the sitename in the url in every 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?hl=en -~--~~~~--~~--~--~---
Bulletin board system and cakePHP
Hello bakers, I am looking for some bulletin board system to integrate into my website built on cakePHP. I have tried punbb, but it is very hard to make it work in my system. I am using three-column design and I need the side columns to remain under control of cakePHP and the mail central area under control of bb system. This is hardly possible with punbb (whats more, its using stupid ob_* functions which makes everything even more confusing). Simply, the bb system has to run "inside" my application. PunBB is only able to run as the first "layer". Have you sucessfuly integrated some bb system into your cakePHP application? And by integration I mean not only login and registration, but the layout as well. Or is there any native cakePHP/bb project running? PS: I am sorry if this post is bit confusing to you, I was trying my best :) --~--~-~--~~~---~--~~ 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: integration with other software
Here's some links: Wordpress: http://www.webdevkungfu.com/accessing-wordpress-with-cakephp/ ... there was another good wordpress/cake integration article, but I can't find the link right now... Joomla: http://dev.sypad.com/projects/jake/ Drupal: http://www.thinkingphp.org/2006/01/25/drake-drupal-cakephp-is-making-progress/ Gerben. On 22 apr, 12:42, laptop <[EMAIL PROTECTED]> wrote: > hi there, has anyone completed an integration with other software like > wordpress or vbulletin?? I would like the same layout template to be > used which I could do relatively easy, my main problem is that there > is a little welcome box in the top right which uses my User model... > > any help would be appreciated.. --~--~-~--~~~---~--~~ 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: hasMany's order question
As far as I can see, you just forgot to set the order clause in categoriescontroller: Change: 'Blog.created DESC' to 'order' => 'Blog.created DESC' It must have been a slip of the keys, because in the BlogsController you've done it the right way. Gerben. On 21 apr, 15:20, matlin <[EMAIL PROTECTED]> wrote: > The BlogsController:http://bin.cakephp.org/view/616075649 > and the CategoriesController:http://bin.cakephp.org/view/1748048905 > > Staring myself blind I think ... ;) > > On Apr 21, 1:44 am, gerbenzomp <[EMAIL PROTECTED]> wrote: > > > What is your current code? > > > On 21 apr, 00:26,matlin<[EMAIL PROTECTED]> wrote: > > > > A short question, does $hasMany honor the the 'order' directive? > > > > It doesn't seem to be so. To me. I can't get it to work anyway. --~--~-~--~~~---~--~~ 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: I cant get my js file work?where to put js files?
You should put your js files in the js folder in webroot, so: app/webroot/js/myscript.js And then call it like: link('myscript'); ?> On 21 apr, 16:13, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > where to put js files? and how to refence 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?hl=en -~--~~~~--~~--~--~---
Re: SWFupload
I suppose you followed the instructions in http://bakery.cakephp.org/articles/view/swfupload-and-multipurpose-uploader ? Make sure you've created an upload folder in the files folder in webroot: that is where the files get uploaded. So check there to see if it works. Also, play around with the settings in init.js, because the names of one or more files are a little different in the download, than in the example. Adjust those names to fit those filenames. That's how I got it to work. For debugging info, and other related info, please see http://swfupload.mammon.se/, they have quite good documentation on such things. On 22 apr, 11:16, Enchy <[EMAIL PROTECTED]> wrote: > Hi > > I need some help with SWFupload for cakephp. > Installed it herehttp://capeseo.com/admin/ > The bottom form is a normal straightforward uploader. > When you upload something with that it works and you can see results. > The top one is the fancy flash uploader but it pretends to be working > but when I View results there is nothing. I really don't know what > todo or look for. Also don't know how I can debug this thing. > > Please help. > > Louis --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
foreign key
I have a problem with foreign key. I have two tables, autors and books, is a relation N:N, but this I have other table autors_books. I don´t know to do relationship. Would you help me? In "autor.php" I have array('className' => 'Book', 'joinTable' =>'autors_books', 'foreignKey' => 'autor_id', 'associationForeignKey'=>'book_id', 'conditions' => '', 'order' => '', 'limit' => '', 'uniq' => true, 'finderQuery' => '', 'deleteQuery' => '', ) ); } ?> In book.php I have: array('className' => 'Autor', 'joinTable' =>'autors_books', 'foreignKey' => 'book_id', 'associationForeignKey'=>'autor_id', 'conditions' => '', 'order' => '', 'limit' => '', 'uniq' => true, 'finderQuery' => '', 'deleteQuery' => '', ) ); } ?> And autors/add.html Book relationship: selectTag ('book/Tittle', $books, array('multiple' => 'multiple'), $optionAttr=null, $showEmpty=true, $return=false) ?> After en browsser say that I have a error because I have: Undefined variable: book in C:\Archivos de programa\xampp\htdocs \proyecto_cake\app\views\autors\add.thtml Thanks by your help, is more important for me. Sorry by language, I am spanish. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Diese Seite anzeigen: " Cake Apps/Sites In The Wild"
edelight, a social shopping community for products you like, gifts and wishes - revenue sharing is included - is powered by cake Klicken Sie auf http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild. Falls dies nicht funktioniert, kopieren Sie den Link und fügen ihn in die Adressleiste Ihres Browsers ein. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
integration with other software
hi there, has anyone completed an integration with other software like wordpress or vbulletin?? I would like the same layout template to be used which I could do relatively easy, my main problem is that there is a little welcome box in the top right which uses my User model... any help would be appreciated.. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
SWFupload
Hi I need some help with SWFupload for cakephp. Installed it here http://capeseo.com/admin/ The bottom form is a normal straightforward uploader. When you upload something with that it works and you can see results. The top one is the fancy flash uploader but it pretends to be working but when I View results there is nothing. I really don't know what todo or look for. Also don't know how I can debug this thing. Please help. Louis --~--~-~--~~~---~--~~ 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: where to change or add 'This field cannot be left blank' such validate msg?
May be at sometime in future CakePHP will have to move to a Validator interface Something like class modelNameValidator implements Validator in which the programmer will have to write the validate method and it is this Validator interface, which both Model and View have access, will contain the Error messages... Tarique On 4/22/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > > In the end, proper MVC behavior is to keep validation rules with models, and > error messages with views. > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog: http://www.MarianoIglesias.com.ar > > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de [EMAIL PROTECTED] > Enviado el: Domingo, 22 de Abril de 2007 03:58 a.m. > Para: Cake PHP > Asunto: Re: where to change or add 'This field cannot be left blank' such > validate msg? > > thx for both > > dericknwq and Mariano Iglesias. > > and I think dericknwq 's way is better for my consideration cause the > msg living with the rule makes more sense. > > > > > -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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: where to change or add 'This field cannot be left blank' such validate msg?
as you said,why there is a way to make msg in model? and if I wanna change the validation and relate validation msg ,I think I should make changes in one place instead of two places. and in my opinion ,the validation error msg is not truly view thing.it is more close to model than to view On 4月22日, 下午3时27分, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Models dictate business logic in regards to data, which means information > such as how to fetch data, save it, or validate it. > > Views on the other hand dictate how that data is presented to user, which > amongst other things indicate how to present data that is not validating > model's business rules. > > In the end, proper MVC behavior is to keep validation rules with models, and > error messages with views. > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de [EMAIL PROTECTED] > Enviado el: Domingo, 22 de Abril de 2007 03:58 a.m. > Para: Cake PHP > Asunto: Re: where to change or add 'This field cannot be left blank' such > validate msg? > > thx for both > > dericknwq and Mariano Iglesias. > > and I think dericknwq 's way is better for my consideration cause the > msg living with the rule makes more sense. --~--~-~--~~~---~--~~ 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: where to change or add 'This field cannot be left blank' such validate msg?
Models dictate business logic in regards to data, which means information such as how to fetch data, save it, or validate it. Views on the other hand dictate how that data is presented to user, which amongst other things indicate how to present data that is not validating model's business rules. In the end, proper MVC behavior is to keep validation rules with models, and error messages with views. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de [EMAIL PROTECTED] Enviado el: Domingo, 22 de Abril de 2007 03:58 a.m. Para: Cake PHP Asunto: Re: where to change or add 'This field cannot be left blank' such validate msg? thx for both dericknwq and Mariano Iglesias. and I think dericknwq 's way is better for my consideration cause the msg living with the rule makes more sense. --~--~-~--~~~---~--~~ 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: when in 2.0xx using paginate,how to specific the paging conf?
anyone can help me ? On 4月21日, 下午11时21分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > like 5 items a page ,somethin like that. --~--~-~--~~~---~--~~ 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: where to change or add 'This field cannot be left blank' such validate msg?
thx for both dericknwq and Mariano Iglesias. and I think dericknwq 's way is better for my consideration cause the msg living with the rule makes more sense. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---