Re: RdBaker Works with Latest Cake Release?
Thanks for the input Olivier, I'm afraid I will be going with the worst option for now, approach #4 - code everything I need manually :) All the best, Jonathan --~--~-~--~~~---~--~~ 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: Date Format output
Thanks for the added advice. That worked really well. I made a new slightly modified function in the time helper and used: echo $html->link($time->niceMonth($a['Post']['created']), "/posts/")? So simple once you get the basic idea. --~--~-~--~~~---~--~~ 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: Alternating Row Colors
This worked well but I wonder if there is an easier way to use the helper in just the tr tag itself. Ruby, for instance, uses a little 'cycle' scriptlet within the tag. Ex: %=cycle("white", "gray") I am just curious if it is possible without making the table info into an array. I found it pretty interesting that the commas in the TR array act as cells. Either way the solution below works fine. foreach ($data as $post): { $tr = Array ( $post['Post']['id'], $html->link($post['Post']['title'], "/posts/view/".$post['Post']['id']), $html->link('Delete',"/Posts/delete/{$output['Post']['id']}")." ".$html->link('Edit',"/Posts/edit/{$output['Post']['id']}"), $time->timeAgoInWords($post['Post']['created']) ); echo $html->tableCells($tr,Array('style'=>'background:#E2E2E2'),Array('style'=>'background:transparent')); } endforeach; --~--~-~--~~~---~--~~ 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: Map non-cake PHP files to a default controller like PagesController
I moved all of my legacy files to the view directory of my controller. I then added this to the top of my .htaccess RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} ^(.*)php$ RewriteRule ^(.*)\.php$ index.php?url=/spages/old/$1 [QSA,L] where Spages is my controller and my legacy files are in views/spages/old/ Esentially, Spages is a secure Pages controller with extra logic. I copied what I needed from pages_controller (most of it) and added my extra logic, beforeFilter, etc. The code from pages controller takes care of the old files and your extra logic for session authentication and such is the extra logic. I have some files that render Excel or PNG and don't want the layout around it. So in the controllers display() method set $this->layout='' for those files. This is a pretty quick and dirty way to do it without fighting the framework. HTH, david --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Having the Controller be the action
Hi everybody, Im working on a new project with CakePHP. It's a photo gallery system but the way I want the url stucture as I understand it, I would have to make the controller the action? Can I do that? For example to view an individual picture in the gallery the url would be something like domain.com/view/#ID/ where ID would be the id of the individual picture. DO i need to create a view function inside the view controller to get the ID number in the URL and get what is needed to render a page.. Anyway im not sure if Im just confused about how i works but how would i achive something like that.. Here is the site in question.. http://claypics.com/view/ Thanks a bunch, Kevin --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Map non-cake PHP files to a default controller like PagesController
I'm trying to integrate CakePhp into an existing PHP application. Due to the "not a file" RewriteCond statement in the .htaccess file in /webroot, if I have a php file /webroot/noncake.php, then going to www.example.com/noncake.php will get me that file without running any cake code. What I'd like to do is have all requests for *.php files map to a default controller, say PhpFilesController, which would then render the requested php file within the default layout as if it were a view file. This is somewhat similar to the way the PagesController renders thtml files in /views/pages/. The difference is that I'd like to be able to map requests for .php files anywhere under /webroot to a similar controller which would essentially include the requested php file as if it were a normal view. The reason is that I'd like to be able to render these php files, which are essentially legacy content on the site, within a customizable layout that renders other elements such as a per-user customizable navigation bar. So far I've managed to get all requests for *.php files to map to the standard /webroot/index.php?url=(original url) like standard cake-bound requests are mapped. I just added the following to /webroot/.htaccess: RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*\.php)$ index.php?url=$1 [L] This worked, with http://example.com/test.php leading me to a standard Cake 404 page that reads The requested address test.php was not found on the server. Then I tried adding a $Route->connect('/*.php', array('controller' => 'pages', 'action' => 'display')); in hopes that I might somehow get to the pages controller. But no luck - i still get the 404 error and the request never reaches the pages controller. Any ideas as to why this route->connect statment is ineffectual? For reference, the 404 error is thrown on line 97 of the Dispatcher::dispatch function, located at http://api.cakephp.org/dispatcher_8php-source.html Can anyone suggest what kind of Routing or other technique I'd need to use to make this mapping possible? Once I get this working I'm also going to need to get requests for www.example.com/adirectory/ to do the same thing only for /adirectory/index.php, which require even more mod_rewrite and routing stuff. Thanks so much, Dan --~--~-~--~~~---~--~~ 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: getting started.
also, your modelling is inconsistent with 'real-life'. in your case, ingredient is just a combination of raw_materials w/ a quantity, joined to a certain recipe id. Surely you want another table that joins many raw materials, in their different quantities, to ingredients. Then you want many ingredients joining to many recipies. On 8/23/06, Mikee Freedom <[EMAIL PROTECTED]> wrote: > > morning mate, > > it is difficult to outline (in any kind of short format) exactly what > you should do. personally, before i got anything to display the way i > wanted it to i ran through the blog example and played around a little > bit with the model, controller, and view examples provided therein. > > that way, once i got started on my own application i knew a little > about how things worked, i knew what data to expect from the various > method calls, i knew the benefits of the helper classes. it has still > been a long rd from there but my app has grown along the way and it > has all been experimentation and time spent with Cake. > > i wish i could help you more but without asking you all sorts of > pointed questions i don't know if i can. have you gone through the > manual? wiki? > > cheers, > freedom > > On 24/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > bump > > > > > > > > > > > > > -- Best, Irfan Baig --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Shared Hosting Environment - Please help!!!
Hello, trying to get my first Cake app live and it runs fine locally. Uploading to the production server requred me to add a RewriteBase statement to my htaccess to add the home dir to the URL, etc. It works for all index pages, but any link with a corresponding view other than index (add/edit/view), etc just redirect back to the index. Delete works I assume because there is no corresponding view. Obviously something's happening in dispatch. I've tried modifying various path variables, etc with no luck. I desperately need some help with this ASAP. If you got some ideas please let me know and I will be forever grateful. Z --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: global sanitize : is it a good idea?
> it would be well worth a go. and then possibly attack it from the > other angle. include an attribute (array) within my controller that > could list those actions where it is not cool to do an auto-sanitize. for an idea where to go with that, check out Gwoo's rdAuth, I think you could quite easily rework the auth checking to handle method-level sanitizing. glad to help! jb -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP and AJAX 'engines'
Flash Platform :D (Flash/Flex 2) through CakeAMFPHPOn 8/23/06, Olivier Percebois-Garve <[EMAIL PROTECTED] > wrote:I love moo.fx. (uses a lite version of prototype)But the most promising theses days is probably jquery. (encapsulates also a part of moo.fx)mouth wrote:> Hi all,>> which AJAX engines (other then prototype.js) are You successfully using> with CakePHP, guys? Should You please share with us some limits of Your > solutions?>> I can't help myself, but in cases I need just one little ajax-driven> functionality I don't think I need prototype's obesity.>> Thx, mouth.>>> > >> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP and AJAX 'engines'
I love moo.fx. (uses a lite version of prototype) But the most promising theses days is probably jquery. (encapsulates also a part of moo.fx) mouth wrote: > Hi all, > > which AJAX engines (other then prototype.js) are You successfully using > with CakePHP, guys? Should You please share with us some limits of Your > solutions? > > I can't help myself, but in cases I need just one little ajax-driven > functionality I don't think I need prototype's obesity. > > Thx, mouth. > > > > > > --~--~-~--~~~---~--~~ 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: more row in one form
sounds like a plan. if i get the time i might see if i can put it in. i haven't posted in the wiki before. good night / morning to you, freedom On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: > > Mikee Freedom írta: > > so you would like to edit multiple Models at once? > > > > i.e. Listing many Users on a single page and updating all of their > > details with a single click of the save button? > > > > http://groups.google.com/group/cake-php/browse_thread/thread/dd3611eb91836bee > > Yes! This is. I searched for wrong. Maybe it would be good a tutorial > for it > > Thanks and godd night! (or morning :) > > > > > On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: > >> Mikee Freedom írta: > >>> could you expand a little? > >>> > >>> do you mean updating multiple models on a single page? > >>> > >>> i.e. a User and a UserDetail? > >> I like to edit more record in one view. Every record is ano row with > >> edit fields and bottom on the page a submit button. > >> > >>> On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: > Hello, > > Could you show me some tutorial and/or documentation about more table > rows in one form? > > > -- > Ámon Tamás > http://amon.hu > > > >> > >> -- > >> Ámon Tamás > >> http://amon.hu > >> > >> > > > > > > > > > > -- > Ámon Tamás > http://amon.hu > > > > > --~--~-~--~~~---~--~~ 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: more row in one form
Mikee Freedom írta: > so you would like to edit multiple Models at once? > > i.e. Listing many Users on a single page and updating all of their > details with a single click of the save button? > > http://groups.google.com/group/cake-php/browse_thread/thread/dd3611eb91836bee Yes! This is. I searched for wrong. Maybe it would be good a tutorial for it Thanks and godd night! (or morning :) > > On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: >> Mikee Freedom írta: >>> could you expand a little? >>> >>> do you mean updating multiple models on a single page? >>> >>> i.e. a User and a UserDetail? >> I like to edit more record in one view. Every record is ano row with >> edit fields and bottom on the page a submit button. >> >>> On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: Hello, Could you show me some tutorial and/or documentation about more table rows in one form? -- Ámon Tamás http://amon.hu >> >> -- >> Ámon Tamás >> http://amon.hu >> >> > > > > -- Ámon Tamás http://amon.hu --~--~-~--~~~---~--~~ 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: more row in one form
so you would like to edit multiple Models at once? i.e. Listing many Users on a single page and updating all of their details with a single click of the save button? http://groups.google.com/group/cake-php/browse_thread/thread/dd3611eb91836bee On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: > > Mikee Freedom írta: > > could you expand a little? > > > > do you mean updating multiple models on a single page? > > > > i.e. a User and a UserDetail? > > I like to edit more record in one view. Every record is ano row with > edit fields and bottom on the page a submit button. > > > > > On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: > >> Hello, > >> > >> Could you show me some tutorial and/or documentation about more table > >> rows in one form? > >> > >> > >> -- > >> Ámon Tamás > >> http://amon.hu > >> > >> > > > > > > > > > > -- > Ámon Tamás > http://amon.hu > > > > > --~--~-~--~~~---~--~~ 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: more row in one form
Mikee Freedom írta: > could you expand a little? > > do you mean updating multiple models on a single page? > > i.e. a User and a UserDetail? I like to edit more record in one view. Every record is ano row with edit fields and bottom on the page a submit button. > > On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: >> Hello, >> >> Could you show me some tutorial and/or documentation about more table >> rows in one form? >> >> >> -- >> Ámon Tamás >> http://amon.hu >> >> > > > > -- Ámon Tamás http://amon.hu --~--~-~--~~~---~--~~ 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: Date Format output
here is my general rule of thumb, if I do something more then twice in views, rather then do it a third time I add it to one of my common helpers, if there is something close already in an existing helper, I try to leverage that work. Every once in a while I revisit and try to refactor my helpers. I have a set of helpers that I share among many projects (they are external checkout of my svn so they are all kept in sync, then there are project specific helpers which I do not keep synced. (I have the same thing for components, and am sure that when 1.2 roles around I'll have them for behaviors)Sam DOn 8/23/06, c_doug <[EMAIL PROTECTED] > wrote:Right, that's what I was sort of thinking. I think getting more into helpers is going to interesting. Thanks, again. --~--~-~--~~~---~--~~ 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: getting started.
morning mate, it is difficult to outline (in any kind of short format) exactly what you should do. personally, before i got anything to display the way i wanted it to i ran through the blog example and played around a little bit with the model, controller, and view examples provided therein. that way, once i got started on my own application i knew a little about how things worked, i knew what data to expect from the various method calls, i knew the benefits of the helper classes. it has still been a long rd from there but my app has grown along the way and it has all been experimentation and time spent with Cake. i wish i could help you more but without asking you all sorts of pointed questions i don't know if i can. have you gone through the manual? wiki? cheers, freedom On 24/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > bump > > > > > --~--~-~--~~~---~--~~ 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: Date Format output
Right, that's what I was sort of thinking. I think getting more into helpers is going to interesting. Thanks, again. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
using an url as a parameter in cake
Hello, I want to use an url as a parameter in a cake function through the url. Something like this: in index.thtml I have: link("mylinktitle", "/orders/show/" . urlencode("http://www.domain.com/text?abc=12";); ?> Trying to use the parameter like this in the controller: function show($url) { debug($url); } always gets me an 404 error, because the / in the $url are encoded into %2f but they are still not recognized. Is this a cake or a mod_rewrite problem ? Siegfried -- Siegfried Hirsch http://www.rss-blogger.de / http://seconds11.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 -~--~~~~--~~--~--~---
Re: more row in one form
could you expand a little? do you mean updating multiple models on a single page? i.e. a User and a UserDetail? On 24/08/06, Ámon Tamás <[EMAIL PROTECTED]> wrote: > > Hello, > > Could you show me some tutorial and/or documentation about more table > rows in one form? > > > -- > Ámon Tamás > http://amon.hu > > > > > --~--~-~--~~~---~--~~ 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: association array order must be analog to mySQL foreign keys order for scaffolding
unconfirmed answer: i think i read somewhere in the manual or the wiki that this was the case i.e. the foreign keys had to be in order. can lead to trouble if you don't know about it ;) On 23/08/06, clemos <[EMAIL PROTECTED]> wrote: > > hi > > as described in the subject, I've went through a small problem with > scaffolding: > it looks like the order of the foreign key fields in the database > table and the order of the assocation definition in a model's > $belongsTo *must* be the same to make scaffolding work > > exemple: > I have a table "projects" with id, title, group_id, category_id > (defined in this order in the table) > say my Project model's $belongsTo table looks like this : > > $belongsTo = array( > "Group"=>array( > "className"=>"Group", > "foreignKey"=>"group_id" > ), > "Category"=>array( > "className"=>"Category", > "foreignKey"=>"category_id" > ) > ); > > then the scaffolding will work well > if it looks like this (reverse order) : > > $belongsTo = array( > "Category"=>array( > "className"=>"Category", > "foreignKey"=>"category_id" > ), > "Group"=>array( > "className"=>"Group", > "foreignKey"=>"group_id" > ) > ); > > then scaffolding won't work: > it will complain because it can't find the displayField in the > "Category" and "Group" result arrays. this is because it has switched > the two arrays (trying to find Category's displayField in the Group > result array, and so on) > > anyway, it's ok because I've managed to find the problem, > yet, even if more or less "logical", I don't find this very convenient. > > what do you think ? > in other words : is it a bug or a feature :) ? > > ++ > clemos > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: global sanitize : is it a good idea?
thanks Jon. i reckon you might be right there. it would be well worth a go. and then possibly attack it from the other angle. include an attribute (array) within my controller that could list those actions where it is not cool to do an auto-sanitize. would be very nice to know that i am secure in most cases. thanks for your feedback. cheers, freedom On 23/08/06, Jon Bennett <[EMAIL PROTECTED]> wrote: > > > Now, I know it would be best practice to do this on a case by case > > basis... but i was just curious if it would be possible and if anyone > > currently employs it. and obviously if they did, what trouble they ran > > in to along the way. > > > don't see any reason why it wouldn't be possible > > /// app_controller.php > > function beforeFilter () > { > $this->params = $this->Sanitize->cleanArray ($this->params); > } > > you may run into issues though - just have to play and see :) > > hth > > jon > > -- > > > jon bennett > t: +44 (0) 1225 341 039 w: http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett > > > > --~--~-~--~~~---~--~~ 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: tagErrorMsg not working since upgrade
i can't confirm, but from looking at the html helper in the api i think there were a lot of methods like inputTag, linkTag, etc that had been deprecated in favour of shorter method names i.e. input, link, etc. most of the methods were still in there but just acted as wrappers. maybe errorTag has been removed entirely. you might have to replace all of your calls to errorTag with plain error? again, this is unconfirmed, i'm only speculating. but until you get an answer from one of the developers this might be somewhere you could start looking. sorry i can't be of more help, freedom On 23/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Well, it's not been working properly for me either, but I just assumed > it was something I was doing wrong rather than a problem with Cake. Can > anyone else confirm this? > > > > > --~--~-~--~~~---~--~~ 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: Signup form probem...URGENT
Search cake world for HABTM (it is the name of the relation you are willing to build : Has And Belong To Many) milicic.marko wrote: > Hi Bakers, > > I'm trying to put together simple Signup page. > > I have member model with userinfo fields like > > Firstname, lastname, username, password, email etc. > > I folowed blog tutrial and implemented logic for > > inserting members into table. BUT BUT BUT > > Now I want to allow my users to choose one of the > > my services defined in SERVICES table. So, after > > successfull signup, I should make connection betwen > > user_id and service_id in MEMBER_SERVICE table. > > What is the natural way to implement this with > > cakePHP? > > Let's say the same with simple words! How to > > implement simple form (with validation on model > > level) which works with multiple tabes?? > > Please help me > > > > > > --~--~-~--~~~---~--~~ 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: RdBaker Works with Latest Cake Release?
the Bake script is being favored upon rdBakery. rdBakery is producing code that is not up-to-date with the latest cake standards. Personnally I would have prefered to see rdBakery favored, but it is not the case. So you've 3 choices possibles: -update rdBakery's code to work with cake 1.2 and update its templates to the latest standards -run rdBakery on cake rc4 /rc6 (I´m not sure) and update the templates -get use to bake and command line scripting The 3rd approach is probably the easiest... oli jonathan wrote: > I tried using the latest rdBaker with the latest Cake release and it's > asking me to create files and a database table and all sorts of things > that just don't seem right. I gave up on this error: > > Fatal: Unable to load view file > homevscreenpublichtmlappviewsrdbakerindex.thtml for action > RdbakerController::index() > > Any input would be greatly appreciated. > > Jonathan > > > > > > --~--~-~--~~~---~--~~ 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: Date Format output
make a new helper for yourself that uses the above (in hindsight I should of called mine dateWithMask ) in the definition of the helper use $helper = array('Time); then you can use the existing time helper I would strongly recommend against changing the existing time helper! On 8/23/06, c_doug <[EMAIL PROTECTED]> wrote: > > Can the time helper apply a mask in the view (for example MM/DD/)? > > If not, is the best way to do it to modify the time helper itself in > the helpers directory? > > > > > --~--~-~--~~~---~--~~ 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: Date Format output
Can the time helper apply a mask in the view (for example MM/DD/)? If not, is the best way to do it to modify the time helper itself in the helpers directory? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Signup form probem...URGENT
Hi Bakers, I'm trying to put together simple Signup page. I have member model with userinfo fields like Firstname, lastname, username, password, email etc. I folowed blog tutrial and implemented logic for inserting members into table. BUT BUT BUT Now I want to allow my users to choose one of the my services defined in SERVICES table. So, after successfull signup, I should make connection betwen user_id and service_id in MEMBER_SERVICE table. What is the natural way to implement this with cakePHP? Let's say the same with simple words! How to implement simple form (with validation on model level) which works with multiple tabes?? Please help me --~--~-~--~~~---~--~~ 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: A basic layout question
Download the firebug extension to firefox, so you can see the trasfers.Your ajax layout should not contain any doctype definitio, nor html, head, body tags, because what you're sending isn't a new document but a fragment of html (in general you're sending some data to process) You can't load any _javascript_ (at least the way you're trying to do it) and you don't need to do it at all. As long as you haven't load a new page all your scripts previously loades are already loaded and you can use it. If you need to load some scripts specifically for the fragment you're loading there are some methods, but it's a little difficult.Hope it helps youRegards,-- Pablo Viojo [EMAIL PROTECTED]http://pviojo.netOn 8/23/06, Toby Parent < [EMAIL PROTECTED]> wrote:Suggestions of how to see what's wrong with generated HTML: Look at it through Firefox, with the Web Developer extension loaded in. Itincludes a toolbar option to 'View Generated Source'.Don't know if it'll help, but I use it often.Regards, - Toby (bigClown) Parent --~--~-~--~~~---~--~~ 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: A basic layout question
Suggestions of how to see what's wrong with generated HTML: Look at it through Firefox, with the Web Developer extension loaded in. It includes a toolbar option to 'View Generated Source'. Don't know if it'll help, but I use it often. Regards, - Toby (bigClown) Parent --~--~-~--~~~---~--~~ 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: css compression doesn't work
Hi wluigi, I think the reason for the sparse documentation is that if everything is in place it quite simply "just works". However not sure it's not the top of the development list ;). Try accessing the url "/ccss/display.css" (or whatever your css file is named) and action the error messages. The way that it works is quite simple: request for css file process css file making it smaller output directly to browser It doesn't create an output file*, so looking in the ccss folder (you created that I assume?) you will find nothing. You might find this ticket useful: https://trac.cakephp.org/ticket/1323 you could leave the changes made to make_clean_css if you have the file csspp.php in vendors folder (it doesn't come with the cake download anymore). HTH, AD7six * It does use cache, so that subsequent requests are just read directly from the cache folder. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
A basic layout question
Hi, In my site I want all things should be done through ajax. So I have created ajax.thtml and kept that file in layouts folder. And in app_controller I have changed the layout to ajax. Now the problem is after clicking on any link , will load the respective page without refreshing the things.And that is working fine. But the javascript files which I have included in ajax.thtml are not loading to new page. I can not see source since it is loading through ajax. After searching a lot I found that ajax file should be blank.. My ajax layout (ajax.thtml) is http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> charset('UTF-8');?> My Site title css('mysite','stylesheet',array('media'=>'screen'));?> link('prototype.js'); ?> link('scriptaculous.js?load=builder,effects,dragdrop,controls,slider');?> link('scrolltable.js'); ?> link('nemomenu.js'); ?> Any problem with this. I have not created default.php. Am I wrong on this ? Please guide me.. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
css compression doesn't work
Can anyone explain me how to get it working! The COMPRESS_CSS comment are too few /** * Compress output CSS (removing comments, whitespace, repeating tags etc.) * This requires a/var/cache directory to be writable by the web server (caching). * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag(). */ I use css('style_ie'); ?> in html but the /webroot/ccss directory is empty. How to get it work? The only idee I got is that I ve no /var/cache writeable directory. But is it really needed, can't cake use an internal directory? --~--~-~--~~~---~--~~ 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: Models relations in nested tables and more...
Tahnks AD7six for your answer! firstly I changed my table cars_specs to cars_cfields and than I changed as you suggested.. now the scaffold works, but in my edit form I cannot find nothing about cars_cfiels... my ultimate goal is to make a form where I woulkd select the make, the model name... and in the end there should be all the cfields with a text box to insert the value... and when seeing the details only those not empty would be shown... I gues this is not possible by simple scaffold, righ? ;) --~--~-~--~~~---~--~~ 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: multiple hasAndBelongsToMany ajax create/add form...
you might also look at the model functions that RosSoft posted today. http://rossoft.wordpress.com/2006/08/23/working-with-habtm-associations/ On 8/22/06, gwoo <[EMAIL PROTECTED]> wrote: > > Have you tested with scaffolding? > > > > > --~--~-~--~~~---~--~~ 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: how to enqueu ajax remote fonction ?
no one ? --~--~-~--~~~---~--~~ 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: getting started.
bump --~--~-~--~~~---~--~~ 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: Generate Password
Simplerules wrote: > I am writing a Users Controller and need to generate a password if > somebody has forgotten theirs, what is the cleanest way to generate a > short password with numbers and letters? I did this today, using: $chars = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",0,1,2,3,4,5,6,7,8,9); $password = null; for($i = 0; $i < rand(8, 12); $i++) { $r = rand(0, 35); $password .= $chars[$r]; } However, in reflection, a cleaner approach to generate a range of /letters/ could be done like so: $password = null; for($i = 0; $i < rand(8, 12); $i++) { $password .= chr(rand(97, 122)); } (Possibly useful reference: http://www.asciitable.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 -~--~~~~--~~--~--~---
Re: AJAX - Form Validation
I tried to include the 'Ajax' helper but it could not find it. var $components = array('Cookies', 'Logins', 'Geoip', 'RequestHandler'); var $helpers = array('AJAX'); It says You are seeing this error because the view helper file app\views\helpers\ajax.php can't be found or doesn't exist --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
RdBaker Works with Latest Cake Release?
I tried using the latest rdBaker with the latest Cake release and it's asking me to create files and a database table and all sorts of things that just don't seem right. I gave up on this error: Fatal: Unable to load view file homevscreenpublichtmlappviewsrdbakerindex.thtml for action RdbakerController::index() Any input would be greatly appreciated. Jonathan --~--~-~--~~~---~--~~ 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: Lookup Values (Scaffolding)
I've tried to set the displayField - but this does not seem to change anything. To make it a bit clearer: If I create a new Note I would like a dropdown box for the state_id where it shows the values in the states table. I do not want to relate states back to notes because it does not belong to notes, and visa versa notes does not own states - Does this make 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 -~--~~~~--~~--~--~---
AJAX - Form Validation
I am trying to use AJAX to validate a form, I have a tick box next to my register form inputs. So when a user enters a username, I want the javascript to call the script and get a response wether the username is taken. I have looked at the AJAX helper manual and can't find much to help me, I've looked at the script.aculo.us site and not found an example of this and I do not have the faintest idea how to construct it. Could somebody give the basic instructions or code? :) --~--~-~--~~~---~--~~ 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: Lookup Values (Scaffolding)
I think you want in the State model var $displayField = 'value'; if state_id is setup as a foreign key to State.id. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Lookup Values (Scaffolding)
Hi There, Newbie problem :) I have a table that have values that needs to be looked up in another table. Is it possible to do this with scaffolding? Table: notes Fields: id Title Body state_id Table: states Fields: id value When I view the entries in table notes I would like state_id to be replaced by value in the states table, can scaffolding do this? Thanks 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 -~--~~~~--~~--~--~---
CakePHP and AJAX 'engines'
Hi all, which AJAX engines (other then prototype.js) are You successfully using with CakePHP, guys? Should You please share with us some limits of Your solutions? I can't help myself, but in cases I need just one little ajax-driven functionality I don't think I need prototype's obesity. Thx, mouth. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
more row in one form
Hello, Could you show me some tutorial and/or documentation about more table rows in one form? -- Ámon Tamás http://amon.hu --~--~-~--~~~---~--~~ 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: Bugs with DBO_Postgres ?
There are indeed a couple of issues regarding the postgres driver. Some of them i've reported in trac. With patches. Then again, i've no in-depth knowledge of the cake db layer and it's interactions so yes i might have fubarred something else in the process :) But it's great to hear that you, Nate that is :), are working on it ! Keep up the good work. Albert --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Generate Password
I am writing a Users Controller and need to generate a password if somebody has forgotten theirs, what is the cleanest way to generate a short password with numbers and letters? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
A Cool Sexy Link
Hello Friends Just click on this link and download new games, movies, new software and much much more. Visit this site and enjoy. http://vip.netsurf.ru/browse/?r=215390 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
association array order must be analog to mySQL foreign keys order for scaffolding
hi as described in the subject, I've went through a small problem with scaffolding: it looks like the order of the foreign key fields in the database table and the order of the assocation definition in a model's $belongsTo *must* be the same to make scaffolding work exemple: I have a table "projects" with id, title, group_id, category_id (defined in this order in the table) say my Project model's $belongsTo table looks like this : $belongsTo = array( "Group"=>array( "className"=>"Group", "foreignKey"=>"group_id" ), "Category"=>array( "className"=>"Category", "foreignKey"=>"category_id" ) ); then the scaffolding will work well if it looks like this (reverse order) : $belongsTo = array( "Category"=>array( "className"=>"Category", "foreignKey"=>"category_id" ), "Group"=>array( "className"=>"Group", "foreignKey"=>"group_id" ) ); then scaffolding won't work: it will complain because it can't find the displayField in the "Category" and "Group" result arrays. this is because it has switched the two arrays (trying to find Category's displayField in the Group result array, and so on) anyway, it's ok because I've managed to find the problem, yet, even if more or less "logical", I don't find this very convenient. what do you think ? in other words : is it a bug or a feature :) ? ++ clemos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: global sanitize : is it a good idea?
> Now, I know it would be best practice to do this on a case by case > basis... but i was just curious if it would be possible and if anyone > currently employs it. and obviously if they did, what trouble they ran > in to along the way. don't see any reason why it wouldn't be possible /// app_controller.php function beforeFilter () { $this->params = $this->Sanitize->cleanArray ($this->params); } you may run into issues though - just have to play and see :) hth jon -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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: Models relations in nested tables and more...
[EMAIL PROTECTED] wrote: > What am I doing wrong? Change the text "cfields" => "Cfield" in your CarsSpec model and you should be home free. Incidentally if you are not changing the default value, you can just specify var $hasMany = array( 'Cfield'); HTH, 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: tagErrorMsg not working since upgrade
Well, it's not been working properly for me either, but I just assumed it was something I was doing wrong rather than a problem with Cake. Can anyone else confirm this? --~--~-~--~~~---~--~~ 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: Can't get basic example to work.
Hi Darren, I don´t think Xampp enables mod_rewrite in apache by default. If http://localhost/cake/index.php works and http://localhost/cake/Doesnt/Exist gives you a server 404 page See http://manual.cakephp.org/chapter/installing section 5, on how to enable mod_rewrite. HTH, 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: Keep getting Undefined index: campaign_page_id error
Hi rgavina, In which table is campaign_page_id, and what is going to happen if no Campaign is found for a Page? Probably in this case no Campaign was found matching the/a requested Page. Why not set DEBUG to 2 in /app/config/core.php put pr ($output); at the end of your loop You may see an error (logic or syntax), in the sql which you can correct (in the table at the bottom of every page), or immediately after the text "Undefined index: campaign_page_id" on your page will be the result(s) that was(were) causing a problem. From there it should be real easy to see what the solution is. HTH, 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 -~--~~~~--~~--~--~---
global sanitize : is it a good idea?
evening all, just something i was pondering... you might have pondered previously... i had a quick search through the groups and found this post (and paste) which was of interest. http://groups.google.com/group/cake-php/browse_thread/thread/8094b744e256066d/aac9cb60e3bc4a93?lnk=gst&q=beforesave+sanitize&rnum=1#aac9cb60e3bc4a93 http://www.cakephp.org/pastes/show/eb23edaac3bd13381b467669d2bd291a Basically, I'm thinking about the option of sanitizing any and all input from the user in a method of my app_controller. i'm just trying to think about the positives and negatives, advantages and possible problems that may arise. I mean, pretty much, any input from the user I would feel more comfortable if it had been sanitized before it touched my database - and I mean everything; save, find, etc. Even parameters passed to actions that users have access to (e.g. querystring) I would feel safer if it had been sanitized first. Now, I know it would be best practice to do this on a case by case basis... but i was just curious if it would be possible and if anyone currently employs it. and obviously if they did, what trouble they ran in to along the way. please, share your thoughts. cheers, freedom --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---