Re: Enum class
mmm...this can be very useful in order to write components / vendor class that auto-extends cake framework like adding beforeFind() callbacks to models in runtime --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Enum class
While I consider myself a fairly experienced PHP programmer, only recently I've found the wonderful 'create_function' function which creates an anonymous function that can be passed around as a variable value. This allowed me to write a class that helps working with arrays, although it could be easily modified to work with any value type. For example, you can use it to check for required input arguments: if ( ! Enum::has($_GET, array('id','user')) ) die('Required arguments are missing'; ...or to make all strings in an array uppercase: $array = Enum::collect($array, Enum::newFilter(' uppercase($value) ')); Personally, I love it :) '1', 'b' => '2', 'c' => '2', 'd' => '3' ); $multiply_by_two = Enum::newFilter(' $value*2 '); print_r( Enum::collect($input, $multiply_by_two) ); // Array ( [a] => 2 [b] => 4 [c] => 4 [d] => 6 ) $key_is_b = Enum::newFilter(' $key=="b" '); print_r( Enum::find($input, $key_is_b) ); // 2 $pass_a_and_c_keys = Enum::newFilter(' in_array($key, array("a","c")) '); print_r( Enum::filter($input, $pass_a_and_c_keys) ); // Array ( [a] => 1 [c] => 2 ) $pass_odd_values = Enum::newFilter(' $value%2 '); print_r( Enum::filter($input, $pass_odd_values) ); // Array ( [a] => 1 [d] => 3 ) print_r( Enum::has($input, array('z')) ); // 0 */ class Enum { /** Create a new anonymous function to use as a filter */ function newFilter ($code) { return create_function('$value,$key', "return $code;"); } /** Return array of every element passed thru $func */ function collect ($array, $filter) { $output = array(); foreach ($array as $key=>$value) { $output[$key] = $filter($value, $key); } return $output; } /** Return value of first element that matches $func */ function find ($array, $selector, $default=false) { foreach ($array as $key=>$value) { if ($selector($value, $key)) return $value; } return $default; } /** Return array of all elements for which $selector returns true */ function filter ($array, $selector) { $output = array(); foreach ($array as $key=>$value) { if ($selector($value, $key)) $output[$key] = $value; } return $output; } /** Returns true if array has all keys in $keys */ function has ($array, $keys, $non_empty=false) { foreach ($keys as $key) { if (!isset($array[$key]) || ($non_empty && !$array[$key])) return 0; } return true; } }; ?> --~--~-~--~~~---~--~~ 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: Setting the primary key for a table in cake
Thanks for the speedy reply i really appreciate it! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Setting the primary key for a table in cake
var $primaryKey = 'blah';-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access public*/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Setting the primary key for a table in cake
My table does not utilize id - how can i set $id or override $id? I saw a post on this sometime last year but nothing happened- Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Use another view
Hi See http://manual.cakephp.org/chapter/7 for "Interacting with your Views" - render() if you want to request in another controller use requestAction(). You might be confusing the MVC structure: There is function in the model and controller files, but not in the views (normally). Olivvv Fernando Andreacci wrote: > > If I have a funcion called function1, can I use a view called > function2 to this function? > > -- > Fernando Andreacci > Desenvolvimento > Setti Sistemas Ltda. > Fone(47)3028-2445 > > --~--~-~--~~~---~--~~ 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: Cake Tutorial: Books Title Example (With hasOne)
She meant they are deleting the entries in the application.Most likely they are just trying to test everything to get a feel for what is going on and don't actually mean to be malicious.If it seems appropriate I would still post the URL, but maybe back up your database before hand. Also if before you give the link you precede it by "please don't delete the data" I am sure those on this group will obey your wishes. I don't think anyone here is trying to cause harm. On 6/17/06, Olivier Percebois-Garve <[EMAIL PROTECTED]> wrote: If you have "errors" that are disappearing by switching debug from 2 to 0, then its not errors it is notices or warnings. AD7six wrote: jeannie109 wrote: The tutorial seems to work ok even with the error message. I did findout that if I change the debug to 0 instead of 2, it gets rid of theerror. With Debug set to 0, errors are not displayed in the browser, but theyare not removed.If you rename /app/models/titles.php to /app/models/title.php the errorwill be 'cured' (I think). Left unchecked it would mean (again, I think) you will not be able to use the findByXXX and findByAllXXXmethods, as these rely on overloading. On another note, everytime I post to this forum, and put in my URL,some nasty person deletes all my entries. I can't believe people canbe so rude. Should I not post my URL in this forum? AFAIK it isn't possible for anyone to delete a message from the googlegroup (this isn't really a forum, or are you referring to somethingelse?), what has lead you to draw that conclusion? Eveyone's pretty friendly around here ;)Cheers,AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Bake.php errors when generating models - connecting to mysql
Thanks again everyone- Two things- 1./usr/local/php5/lib/php.ini is where my php config file is located when i do phpinfo() in my browser. 2./Users/milk/php.ini is where my config file is when i do php -i in the terminal. So i copied the php.ini from 1. to 2. and did php -i again and im still getting nothing. another thing to mention is that mysql is not showing up at all when i do php -i - but sqlite is? 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: Bake.php errors when generating models - connecting to mysql
You can try typing this in shell: php -m | grep mysql To see if the CLI is picking up the MySQL modules ... - Jon --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Command Line for CakePHP?
I just did a sudo pear install PHP_Shell and was wondering if it might be possible to do a CLI interface to Cake testing (like Rails has w/ script/console) ... I was going to try this w/ a ShellController but not sure if Id be able to have access to Sessions and the Models ... is anyone else thinking of trying something like this? - Jon --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Use another view
If I have a funcion called function1, can I use a view called function2 to this function? -- Fernando AndreacciDesenvolvimentoSetti Sistemas Ltda.Fone(47)3028-2445 --~--~-~--~~~---~--~~ 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: Bake.php errors when generating models - connecting to mysql
On 6/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I know mysql is working fine on the cgi/apache side- > > The CLI is a diffrent story i guess, any ideas? It shouldn't at all differ... Do you have multiple PHP install ?? cuz both the CGI and the CLI read the same php.ini and are both compiled at the same time. Or should be... Look for multiple install of PHP. -- Gustavo Carreno --- < If you know Red Hat you know Red Hat, If you know Slackware you know Linux > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Bake.php errors when generating models - connecting to mysql
Thanks for your help- I know mysql is working fine on the cgi/apache side- The CLI is a diffrent story i guess, any ideas? --~--~-~--~~~---~--~~ 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: Bake.php errors when generating models - connecting to mysql
On 6/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > PHP Fatal error: Call to undefined function mysql_pconnect() in > /Library/WebServer/Documents/cake/libs/model/dbo/dbo_mysql.php on line > 101 Looks like your PHP install does not have MySQL in. If it's a 5.x, MySQL no longer comes in by default, you have to add it either by compiling it in or adding it via an external *.so -- Gustavo Carreno --- < If you know Red Hat you know Red Hat, If you know Slackware you know Linux > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Bake.php errors when generating models - connecting to mysql
Seems like you need to configure your app/config/database.php in order to make use of mysql_connect and not mysql_pconnect. Just a guess so. -- http://www.thinkingphp.org http://www.fg-webdesign.de [EMAIL PROTECTED] schrieb: Thanks to everyone in advance - I am on OS X 10.4. /Library/WebServer/Documents/cake/scripts root# php bake.php -project configuration ___ __ _ _ ___ __ _ _ __ __ __ _ _ ___ ||__| |_/ |__ |__] |__| |__]|__] |__| |_/ |__ |___ | | | \_ |___ || | | |__] | | | \_ |___ --- [M]odel [C]ontroller [V]iew Please select a class to Bake: (M/V/C) M --- Model Bake: --- PHP Fatal error: Call to undefined function mysql_pconnect() in /Library/WebServer/Documents/cake/libs/model/dbo/dbo_mysql.php on line 101 X-Powered-By: PHP/5.1.4 Content-type: text/html Fatal error: Call to undefined function mysql_pconnect() in /Library/WebServer/Documents/cake/libs/model/dbo/dbo_mysql.php on line 101 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: multiple save probleme
I will ... monday in the morning thx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Bake.php errors when generating models - connecting to mysql
Thanks to everyone in advance - I am on OS X 10.4. /Library/WebServer/Documents/cake/scripts root# php bake.php -project configuration ___ __ _ _ ___ __ _ _ __ __ __ _ _ ___ ||__| |_/ |__ |__] |__| |__]|__] |__| |_/ |__ |___ | | | \_ |___ || | | |__] | | | \_ |___ --- [M]odel [C]ontroller [V]iew Please select a class to Bake: (M/V/C) > M --- Model Bake: --- PHP Fatal error: Call to undefined function mysql_pconnect() in /Library/WebServer/Documents/cake/libs/model/dbo/dbo_mysql.php on line 101 X-Powered-By: PHP/5.1.4 Content-type: text/html Fatal error: Call to undefined function mysql_pconnect() in /Library/WebServer/Documents/cake/libs/model/dbo/dbo_mysql.php on line 101 --~--~-~--~~~---~--~~ 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: Cake Tutorial: Books Title Example (With hasOne)
If you have "errors" that are disappearing by switching debug from 2 to 0, then its not errors it is notices or warnings. AD7six wrote: jeannie109 wrote: The tutorial seems to work ok even with the error message. I did find out that if I change the debug to 0 instead of 2, it gets rid of the error. With Debug set to 0, errors are not displayed in the browser, but they are not removed. If you rename /app/models/titles.php to /app/models/title.php the error will be 'cured' (I think). Left unchecked it would mean (again, I think) you will not be able to use the findByXXX and findByAllXXX methods, as these rely on overloading. On another note, everytime I post to this forum, and put in my URL, some nasty person deletes all my entries. I can't believe people can be so rude. Should I not post my URL in this forum? AFAIK it isn't possible for anyone to delete a message from the google group (this isn't really a forum, or are you referring to something else?), what has lead you to draw that conclusion? Eveyone's pretty friendly around here ;) Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Cake Tutorial: Books Title Example (With hasOne)
jeannie109 wrote: > The tutorial seems to work ok even with the error message. I did find > out that if I change the debug to 0 instead of 2, it gets rid of the > error. With Debug set to 0, errors are not displayed in the browser, but they are not removed. If you rename /app/models/titles.php to /app/models/title.php the error will be 'cured' (I think). Left unchecked it would mean (again, I think) you will not be able to use the findByXXX and findByAllXXX methods, as these rely on overloading. > On another note, everytime I post to this forum, and put in my URL, > some nasty person deletes all my entries. I can't believe people can > be so rude. Should I not post my URL in this forum? AFAIK it isn't possible for anyone to delete a message from the google group (this isn't really a forum, or are you referring to something else?), what has lead you to draw that conclusion? Eveyone's pretty friendly around here ;) Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Cake Tutorial: Books Title Example (With hasOne)
The tutorial seems to work ok even with the error message. I did find out that if I change the debug to 0 instead of 2, it gets rid of the error. On another note, everytime I post to this forum, and put in my URL, some nasty person deletes all my entries. I can't believe people can be so rude. Should I not post my URL in this forum? --~--~-~--~~~---~--~~ 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: {Seeking} Overview for Dummies
yea is is terrible, never mindOn 6/17/06, Olivier Percebois-Garve <[EMAIL PROTECTED]> wrote: Are you on irc ? I have troubles to set up the p2p mode in coccinnella. Samuel DeVore wrote: ok if you connect to scid.is-a-geek as a peer to peer server method you should have a document to play with Sam D On 6/17/06, Samuel DeVore < [EMAIL PROTECTED]> wrote: Olivier, We could use http://hem.fyristorg.com/matben/ Coccinella to do this. I would be happy to host the file for a while and then as we come to consensus, I'll clean it up and make a pdf/page out of it. Sam D I'll post information on the file when I get it up and running On 6/17/06, Olivier Percebois-Garve < [EMAIL PROTECTED]> wrote: I think it would be good to have such representation. It took me a long time to see the big picture of how cake is functioning, and there is still a lot of unclear thing. The link of Nate is cool but I'm not sure how it help newbies: Look at the step 3 where the controller is. honestly you've to know cake to understand that part, to know what a model is, what a requestaction is, ... It seems to be a good start, but to me, A good graphic representation would need a bit more details, and should outline the MVC structure. It should tell what the dispatcher does with the params, that the model are defined in a similar manner to how we build a db scheme (LDM). Do you know a "online paperboard" website ? So we could tell collectively and graphically how it should look like. Olivvv AD7six wrote: > Hi All, > > I'm looking for a graphical representation of how cake handles a > request. > > I came across > http://jmp.xybyx.com/img/overview2.png > and > http://grahambird.co.uk/cake/tutorials/howitworks.php > > both of which are very useful for understanding the basics, but miss > some objects. > > Has anyone already created, or is there a page existing somewhere in > the manual that I've yet to find, an image that describes graphically > all of the various objects used by Cake (or any MVC for that matter) > such that none-developers can see how things fit together, in > particular everything to do with presentation? As you might guess I'm > trying to explain to someone (none-technical) I'm working with > generally how things work and which files to edit, but after repeating > myself 2 or 3 times I think it's time for a picture. > > The difficulty seems to stem from the concept of a dispacher; the > 'black magic' of mod_rewrite/cake pretty urls and the URL requested may > not directly relate to what is expected (routes; using one edit.thtml > for add & edit methods etc.). > > Any help or comments most welcome, > > Cheers, > > AD7six > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
useTable in fuction?
can i use a seperate table in a fuction? or should i use a new controller? Is it possiable? or am i asking a stupid question? --~--~-~--~~~---~--~~ 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: Root Control
yes i got that thank you, but when i try to run a fuction off of the root control, it still goes to http://localhost/php/intros/about/ here is my route $Route->connect('/', array('controller' => 'intros', 'action' => 'index')); i have fuctions to display other pages but they display as http://localhost/php/intros/about/, can i get them to display as http://localhost/php/about/ without having to create a controller? --~--~-~--~~~---~--~~ 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: {Seeking} Overview for Dummies
Are you on irc ? I have troubles to set up the p2p mode in coccinnella. Samuel DeVore wrote: ok if you connect to scid.is-a-geek as a peer to peer server method you should have a document to play with Sam D On 6/17/06, Samuel DeVore < [EMAIL PROTECTED]> wrote: Olivier, We could use http://hem.fyristorg.com/matben/ Coccinella to do this. I would be happy to host the file for a while and then as we come to consensus, I'll clean it up and make a pdf/page out of it. Sam D I'll post information on the file when I get it up and running On 6/17/06, Olivier Percebois-Garve < [EMAIL PROTECTED]> wrote: I think it would be good to have such representation. It took me a long time to see the big picture of how cake is functioning, and there is still a lot of unclear thing. The link of Nate is cool but I'm not sure how it help newbies: Look at the step 3 where the controller is. honestly you've to know cake to understand that part, to know what a model is, what a requestaction is, ... It seems to be a good start, but to me, A good graphic representation would need a bit more details, and should outline the MVC structure. It should tell what the dispatcher does with the params, that the model are defined in a similar manner to how we build a db scheme (LDM). Do you know a "online paperboard" website ? So we could tell collectively and graphically how it should look like. Olivvv AD7six wrote: > Hi All, > > I'm looking for a graphical representation of how cake handles a > request. > > I came across > http://jmp.xybyx.com/img/overview2.png > and > http://grahambird.co.uk/cake/tutorials/howitworks.php > > both of which are very useful for understanding the basics, but miss > some objects. > > Has anyone already created, or is there a page existing somewhere in > the manual that I've yet to find, an image that describes graphically > all of the various objects used by Cake (or any MVC for that matter) > such that none-developers can see how things fit together, in > particular everything to do with presentation? As you might guess I'm > trying to explain to someone (none-technical) I'm working with > generally how things work and which files to edit, but after repeating > myself 2 or 3 times I think it's time for a picture. > > The difficulty seems to stem from the concept of a dispacher; the > 'black magic' of mod_rewrite/cake pretty urls and the URL requested may > not directly relate to what is expected (routes; using one edit.thtml > for add & edit methods etc.). > > Any help or comments most welcome, > > Cheers, > > AD7six > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: multiple save probleme
it would be better if you would paste all the code you are using in the cakebin http://cakephp.org/pastes/add then give us the link that is generate. --~--~-~--~~~---~--~~ 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: {Seeking} Overview for Dummies
ok if you connect to scid.is-a-geek as a peer to peer server method you should have a document to play withSam DOn 6/17/06, Samuel DeVore < [EMAIL PROTECTED]> wrote:Olivier, We could use http://hem.fyristorg.com/matben/ Coccinella to do this. I would be happy to host the file for a while and then as we come to consensus, I'll clean it up and make a pdf/page out of it. Sam DI'll post information on the file when I get it up and runningOn 6/17/06, Olivier Percebois-Garve < [EMAIL PROTECTED]> wrote:I think it would be good to have such representation. It took me a long time to see the big pictureof how cake is functioning, and there is still a lot of unclear thing.The link of Nate is cool but I'm not sure how it help newbies: Look atthe step 3 where the controller is. honestly you've to know cake to understand that part, to know what amodel is, what a requestaction is, ...It seems to be a good start, but to me, A good graphic representationwould need a bit more details, and should outline the MVC structure. It should tell what the dispatcher does withthe params,that the model are defined in a similar manner to how we build a dbscheme (LDM).Do you know a "online paperboard" website ? So we could tell collectively and graphically how it should look like.OlivvvAD7six wrote:> Hi All,>> I'm looking for a graphical representation of how cake handles a> request.>> I came across > http://jmp.xybyx.com/img/overview2.png> and> http://grahambird.co.uk/cake/tutorials/howitworks.php >> both of which are very useful for understanding the basics, but miss> some objects.>> Has anyone already created, or is there a page existing somewhere in> the manual that I've yet to find, an image that describes graphically > all of the various objects used by Cake (or any MVC for that matter)> such that none-developers can see how things fit together, in> particular everything to do with presentation? As you might guess I'm > trying to explain to someone (none-technical) I'm working with> generally how things work and which files to edit, but after repeating> myself 2 or 3 times I think it's time for a picture.> > The difficulty seems to stem from the concept of a dispacher; the> 'black magic' of mod_rewrite/cake pretty urls and the URL requested may> not directly relate to what is expected (routes; using one edit.thtml > for add & edit methods etc.).>> Any help or comments most welcome,>> Cheers,>> AD7six>>> >>> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: HABTM and HTML-Helper
http://manual.cakephp.org/chapter/6 there should be an example of multiple selects there. --~--~-~--~~~---~--~~ 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: Cake Tutorial: Books Title Example (With hasOne)
if you are on php4 check that you are using var $name in your classes. I am not familiar with that tutorial but generally that is the cause of the overload problem. Also, double check the class name of the model and filename to make sure they meet the conventions. If you still have trouble, put your models in http://cakephp.org/ pastes/add and then send us the link that is created. Good Luck. --~--~-~--~~~---~--~~ 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: Cake Tutorial: Books Title Example (With hasOne)
Jeannie, you've probably a file at the wrong place. Diorgenes, You need to provide more information. How does you link look like ? maybe there is a typo in it. Also it could be that you did not set up mod_rewrite. Olivvv jeannie109 wrote: > I am just trying this out and get an error: Warning: overload() was > unable to locate class 'titles' in /CAKE/cake/basics.php on line 74 > > Obviously, I did NOT change the code in basics. Can anyone tell me > what to do? > > http://jobboard.bernardtransportation.com/CAKE/titles > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: multiple save probleme
Anyone can 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 -~--~~~~--~~--~--~---
HABTM and HTML-Helper
Hi there, is there a built-in way, or a helper to create either a multi-select or checkboxes out of a Has-And-Belongs-To-Many relationship? If not, do you think that would be worth a feature request? Thanks, Dirk --~--~-~--~~~---~--~~ 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: {Seeking} Overview for Dummies
Olivier, We could use http://hem.fyristorg.com/matben/ Coccinella to do this. I would be happy to host the file for a while and then as we come to consensus, I'll clean it up and make a pdf/page out of it. Sam DI'll post information on the file when I get it up and runningOn 6/17/06, Olivier Percebois-Garve < [EMAIL PROTECTED]> wrote:I think it would be good to have such representation. It took me a long time to see the big pictureof how cake is functioning, and there is still a lot of unclear thing.The link of Nate is cool but I'm not sure how it help newbies: Look atthe step 3 where the controller is. honestly you've to know cake to understand that part, to know what amodel is, what a requestaction is, ...It seems to be a good start, but to me, A good graphic representationwould need a bit more details, and should outline the MVC structure. It should tell what the dispatcher does withthe params,that the model are defined in a similar manner to how we build a dbscheme (LDM).Do you know a "online paperboard" website ? So we could tell collectively and graphically how it should look like.OlivvvAD7six wrote:> Hi All,>> I'm looking for a graphical representation of how cake handles a> request.>> I came across > http://jmp.xybyx.com/img/overview2.png> and> http://grahambird.co.uk/cake/tutorials/howitworks.php >> both of which are very useful for understanding the basics, but miss> some objects.>> Has anyone already created, or is there a page existing somewhere in> the manual that I've yet to find, an image that describes graphically > all of the various objects used by Cake (or any MVC for that matter)> such that none-developers can see how things fit together, in> particular everything to do with presentation? As you might guess I'm > trying to explain to someone (none-technical) I'm working with> generally how things work and which files to edit, but after repeating> myself 2 or 3 times I think it's time for a picture.> > The difficulty seems to stem from the concept of a dispacher; the> 'black magic' of mod_rewrite/cake pretty urls and the URL requested may> not directly relate to what is expected (routes; using one edit.thtml > for add & edit methods etc.).>> Any help or comments most welcome,>> Cheers,>> AD7six>>> >>> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Cake Tutorial: Books Title Example (With hasOne)
I am just trying this out and get an error: Warning: overload() was unable to locate class 'titles' in /CAKE/cake/basics.php on line 74 Obviously, I did NOT change the code in basics. Can anyone tell me what to do? http://jobboard.bernardtransportation.com/CAKE/titles --~--~-~--~~~---~--~~ 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: $ajaxOptions (updateElement, afterUpdateElement) for autocomplete
:)On 6/17/06, nate <[EMAIL PROTECTED]> wrote: https://trac.cakephp.org/changeset/3119There.Is everybody happy now?? --~--~-~--~~~---~--~~ 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: Advise using Ajax
Well, I have progressed .. I found out how to use the Element.hide, within my render .. I am very bad in havascript, however using the $javascript->codeBlock('Element..') does it.. Still on problem, how to call the same action when I do an Ajax call ? Placing an Ajax.Request into the Ajax layout ? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: {Seeking} Overview for Dummies
I think it would be good to have such representation. It took me a long time to see the big picture of how cake is functioning, and there is still a lot of unclear thing. The link of Nate is cool but I'm not sure how it help newbies: Look at the step 3 where the controller is. honestly you've to know cake to understand that part, to know what a model is, what a requestaction is, ... It seems to be a good start, but to me, A good graphic representation would need a bit more details, and should outline the MVC structure. It should tell what the dispatcher does with the params, that the model are defined in a similar manner to how we build a db scheme (LDM). Do you know a "online paperboard" website ? So we could tell collectively and graphically how it should look like. Olivvv AD7six wrote: > Hi All, > > I'm looking for a graphical representation of how cake handles a > request. > > I came across > http://jmp.xybyx.com/img/overview2.png > and > http://grahambird.co.uk/cake/tutorials/howitworks.php > > both of which are very useful for understanding the basics, but miss > some objects. > > Has anyone already created, or is there a page existing somewhere in > the manual that I've yet to find, an image that describes graphically > all of the various objects used by Cake (or any MVC for that matter) > such that none-developers can see how things fit together, in > particular everything to do with presentation? As you might guess I'm > trying to explain to someone (none-technical) I'm working with > generally how things work and which files to edit, but after repeating > myself 2 or 3 times I think it's time for a picture. > > The difficulty seems to stem from the concept of a dispacher; the > 'black magic' of mod_rewrite/cake pretty urls and the URL requested may > not directly relate to what is expected (routes; using one edit.thtml > for add & edit methods etc.). > > Any help or comments most welcome, > > Cheers, > > AD7six > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: $ajaxOptions (updateElement, afterUpdateElement) for autocomplete
https://trac.cakephp.org/changeset/3119 There. Is everybody happy now?? --~--~-~--~~~---~--~~ 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: Advise using Ajax
Thanks, actually I found where my problemS are : 1) I want to call a requestAction that renders an ajax layout * if found the solution, into the first call to my function index, into the layout I have coded array('ajax') instead of array('return'), that works. The menu is on the right place, now regarding the information about hidding, how should I code this Hiding Element into the ajax answer ? sorry for my lack of knowledges. 2) My div menu is outside of the $content, besides if I do some 'ajax' action into the content the java.thml layout is invoked, so How can I request the action every time an ajax layout is rendered ? I have tried to write requestAction into the ajax.thtml but that always return my menu into the redering part (means bad placing).. Somehow, when there is an ajax call on my main view, I'd like to be able to trigger an action that would return my menu (at least check if I need to change it). Well is there a way to trigger something after the rendering or something like this ? Maybe it's not clear I can try to summarize : * first time I call any view to application, the requestAction of my default layout is called and updates the div for the menu (using the array('ajax') instead of array('return') * when I am in this view, I work only in Ajax way but I would like to be able to check my menu and eventually modify it by render the div of my menu. The problem is that Ajx action returns an 'ajax' layout, and my action also ..and the layout is retruned but in another div inside the layout.. Maybe it's not so clear but hard to explain in another way. Thanks for your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Advise using Ajax
you can hide a div with javascript code. For example, using prototype / scriptaculous: Element.hide('id_element') --~--~-~--~~~---~--~~ 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: Advise using Ajax
Ok here are the details : My tests are based on the TASKS tutorial Ajax sample, basically I when I press Done on a task, I would like to make disappear the menu... the layout, the menu goes into the block_2 div : requestAction('/tasks/menu/'. (isset($b1) ? $b1 : '0')); ?> This is the action : function menu($value) { $this->log("b1 value = ".$value); $this->render('menu', 'ajax'); } this is the view: '.$html->link("New Application", null, array("class" => "lnkfree")).''; print ''.$html->link("New Simulation", null, array("class" => "lnkfree")).''; ?> Note that I did not handle the case were the values passed in the action is 0 and I sould make the menu diseapper.. Thanks a lot for your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Advise using Ajax
I need more details to know what's the problem. If you don't want to display the div menu, then the requested action can return nothing based on some params, or don't call the requestAction --~--~-~--~~~---~--~~ 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: Advise using Ajax
Thanks, that begin to work but small problems still my Action requested, I placed the requestAction into the div menu otherwise it does not render it at good place. Seems that requestAction retrun the render the view at the place of the call. I render the view in the view in the action like this : $this->render('menu', 'ajax'); Now if I want not to display the div menu, what should I do ? With Ajax call I can set an effect for Fading the div, but not with requestAction. Well maybe my question is silly, sorry. Maybe I miss something in the RequestAction call ? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: {Seeking} Overview for Dummies
Here's a very simple one: http://cake.process141.com/files/layers_of_cake.pdf --~--~-~--~~~---~--~~ 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: Advise using Ajax
put in the layout a requestAction to some controller / action in function of the variable passed to the 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 -~--~~~~--~~--~--~---
Advise using Ajax
Hello, I really like Cake and I am now learning Ajax, coming from C/C++ php is quite easy, however not the same story for javascript and html. Well, there is one thing I'd like to achieve using Cake and Ajax : I have an application that can handle 3 types of users, depending on the user logged and his current controller, I want to display on left side a different menu or no menu at all. I have created the default layout by having a left div that handle the menu and I have set the $content_for_layout in another div. I would like, when the content of the "main div" (ie : the content_layout) be able to laod a different menu by observing a variable (that could be passed on every view). Actually I have set an ajax link to simulate this (the link action updates the menu div), it works well but I have to click on the button to achieve this, but I'd like to do this automatically. I have tried the remoteTimer but I can't pass the variable to my url, and I do not need a call every second. Best would be to trigger a call when a view is loaded and a variable changed. I have check the observerField method but I think this works with a field that should be in input, maybe I can update it automatically when loading the content and that would trigger the observed field url ?? Well, if anyone has some advises it would be great .. Do not hesitate to ask further info if needed. Thanks. Franck --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
{Seeking} Overview for Dummies
Hi All, I'm looking for a graphical representation of how cake handles a request. I came across http://jmp.xybyx.com/img/overview2.png and http://grahambird.co.uk/cake/tutorials/howitworks.php both of which are very useful for understanding the basics, but miss some objects. Has anyone already created, or is there a page existing somewhere in the manual that I've yet to find, an image that describes graphically all of the various objects used by Cake (or any MVC for that matter) such that none-developers can see how things fit together, in particular everything to do with presentation? As you might guess I'm trying to explain to someone (none-technical) I'm working with generally how things work and which files to edit, but after repeating myself 2 or 3 times I think it's time for a picture. The difficulty seems to stem from the concept of a dispacher; the 'black magic' of mod_rewrite/cake pretty urls and the URL requested may not directly relate to what is expected (routes; using one edit.thtml for add & edit methods etc.). Any help or comments most welcome, Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Root Control
Hi Russ, Assuming you followed the instructions in the manual regarding "Setting the Default Route" (http://manual.cakephp.org/chapter/4), you need to delete the * and all should work as you expect. If you did not follow this instruction - whats the contents of your route file. I created this ticket to notify the Cakers of the problem: https://trac.cakephp.org/ticket/1024 Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---