Missing PaginatorHelper Method in View
Hi, I'm using Cake 1.2.0.6311. I've followed the example from http://bakery.cakephp.org/articles/view/basic-pagination-overview-3 to try out the pagination feature in 1.2. However, I get the error: Warning (512): Method PaginatorHelper::count does not exist [CORE/cake/ libs/view/helper.php, line 148] I've tried on my application and a fresh installation and get the same error in both cases. Searching through Google group and googling doesn't help. I've tried other methods such as numbers() and get the same error. Any advise on how to solve this? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
change password
Trying to write a controller to change the password. The only guide I have found to do this is at the following: http://groups.google.com/group/cake-php/browse_thread/thread/83359000910910c5/63972a85d3d5b011?lnk=gst&q=change+password&rnum=1 However this appears to be using cake 1.x (because of the html helper being used for a form). When using this controller I get this Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/ cake/app/controllers/users_controller.php on line 68 This is at the 'if($this->data['change']['newpassword'] !=.' line. Here is the code I am trying. Let me know if there is a better way to do this in Cake 2. Cheers, Damo function changepassword() { if (!empty($this->data)) { $user = $this->Session->read('User'); $this->User->id = $user['id']; $someone = $this->User->findById($this->User->id); if(md5($this->data['change']['oldpassword']) != $someone['User']['password']) { $this->User->invalidate('oldpassword', 'Your old password is invalid'); } if($this->data['change']['newpassword'] != this- >data['change']['confirmpassword']){ $this->User->invalidate('newpassword', 'Your passwords do not match'); $this->User->invalidate('confirmpassword', 'Your passwords do not match');} else { $encryptedPassword = md5($this->data['change'] ['newpassword']); $this->data['User']['password'] = $encryptedPassword; $this->data['User']['id'] = $this->User->id; } if ($this->User->save($this->data)){ $this->flash('Password updated, please login again.','/ users/logoutnf'); } else { $this->render(); } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: hasMany & hasOne problem
As long as you have var $belongsTo = array('Author'); in your Comment model, just set recursive to a higher value. $this->Post->recursive = 2; $posts = $this->Post->findAll(); Cheers, Adam On May 3, 3:40 am, deeps <[EMAIL PROTECTED]> wrote: > Ok, i m trying cakephp for one of my application, till now no errors > are there & cakephp is making life easy > > but now i am stuck in one simple problem > > I am having these tables in database > > Post > -id (PK) > -title > -description > > Comment > -id (PK) > -comment > -post_id (FK) > -author_id (FK) > > Author > -id (PK) > -name > -email > -website > > Now Post will have many comments & each comment will have One author > > Now in post if i write > var $name = 'Post'; > var $hasMany = array('Comment' => array('className'=> 'Comment', > 'conditions' => '', > 'order'=> '', > 'limit'=> '', > 'foreignKey' => > 'post_id', > 'dependent'=> > true, > 'exclusive'=> > false, > 'finderQuery' => '', > 'fields' => '', > 'offset' => '', > 'counterQuery' => > '')); > ?> > > i will get > > Array ( [0] => Array ( [Post] => Array ( [id] => 1 [title] => xyz > [description] => xyz ) [Comment] => Array ( [id] => 1 [comment] => xyz > [post_id] => 1 [author_id] => 1 ) > > What i want is instead of having author id in this particular result, > i want to show up author name with built in functionality of cakephp > or any shortcut method of cake instead of writing any custom query.?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Development/Production setup with databases
I used to use this, which is a very cool way in my opinion. http://bakery.cakephp.org/articles/view/easy-peasy-database-config Now I deploy from Subversion and don't keep passwords in the respository (I have to manually add the database.php file with correct details whenever I deploy to a new location). Cheers, Adam On May 3, 2:19 am, basstech <[EMAIL PROTECTED]> wrote: > After reading through the configuration documentation, it is nice that > CakePHP supports multiple database configurations. However, I am > wondering if there is an easy way to simply "turn on" one > configuration over another across the entire application. > > In the documentation it says: > > The $default connection array is used unless another connection is > specified by the $useDbConfig property in a model. > > Does this mean that in every model of my entire application I will > need to specify that I want to use the development connection? Or can > I simply set this once, and it will apply application-wide? If so, how > is this best accomplished? > > Thanks > CJ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing doesn't work?
Ah hehe yes thx it works now :D On May 2, 7:19 pm, Sliv <[EMAIL PROTECTED]> wrote: > Think about it: > > You're setting up a route for /tag > > but then sending /tag/php and wondering why it doesn't route. > > Try setting the route /tag/* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help - Error validation wipes out database/record id during "edit"
On Fri, May 2, 2008 at 3:28 PM, LucyFur3d <[EMAIL PROTECTED]> wrote: > function edit($id = null) { > $this->Employee->id = $id; > if (empty($this->data)) { > $this->data = $this->Employee->read(); > } else { > if ($this->Employee->save($this->data['Employee'])) { > $this->flash('The employee has been > updated.','/employees'); > } > } > } > In your else clause, try adding this: $this->data['Employee']['id'] = $id Before you save it. Hope that helps. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Help - Error validation wipes out database/record id during "edit"
I have been creating a basic CRUD app for an "employees" database. >From my "index" page, I click on an employees name and it takes me to the "edit" screen. That would take me to www.exampledomain.com/employees/edit/22 (where the employees unique id in the db is "22") One of the database fields is "email", and it has an "email" validation setup in the Employee model. If I try to change the email to a purposely invalid email, I do get the notification about invalid email string, and my url location is still www.exampledomain.com/employees/edit/22 Now when I correct the invalid email, and re-submit the form, my url switches to www.exampledomain.com/employees/edit , i get a message that the employee has been updated, however it actually ADDS a new employee, as if the id got lost/disconnected. Here is the relevant code: = models/employee.php: class Employee extends AppModel { var $name = 'Employee'; var $validate = array( 'first_name' => array( 'rule' => array('minLength', 1) ), 'last_name' => array( 'rule' => array('minLength', 1) ), 'email' => array( 'rule' => array('email', true), 'message' => 'Please supply a valid email address.' ) ); } = controllers/employees_controller.php: function edit($id = null) { $this->Employee->id = $id; if (empty($this->data)) { $this->data = $this->Employee->read(); } else { if ($this->Employee->save($this->data['Employee'])) { $this->flash('The employee has been updated.','/employees'); } } } = views/employees/edit.ctp: echo $form->create('Employee', array('action' => 'edit')); echo $form->input('first_name'); echo $form->input('last_name'); echo $form->input('title'); echo $form->input('email'); echo $form->input('cell'); echo $form->input('extension'); echo $form->end('Edit Employee'); = System Specs: - cake_1.2.0.6311-beta - Mac OSX - PHP Version 5.2.5 - MySQL client version: 5.0.41 - Apache 1.3.41 Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
hasMany & hasOne problem
Ok, i m trying cakephp for one of my application, till now no errors are there & cakephp is making life easy but now i am stuck in one simple problem I am having these tables in database Post -id (PK) -title -description Comment -id (PK) -comment -post_id (FK) -author_id (FK) Author -id (PK) -name -email -website Now Post will have many comments & each comment will have One author Now in post if i write array('className'=> 'Comment', 'conditions' => '', 'order'=> '', 'limit'=> '', 'foreignKey' => 'post_id', 'dependent'=> true, 'exclusive'=> false, 'finderQuery' => '', 'fields' => '', 'offset' => '', 'counterQuery' => '')); ?> i will get Array ( [0] => Array ( [Post] => Array ( [id] => 1 [title] => xyz [description] => xyz ) [Comment] => Array ( [id] => 1 [comment] => xyz [post_id] => 1 [author_id] => 1 ) What i want is instead of having author id in this particular result, i want to show up author name with built in functionality of cakephp or any shortcut method of cake instead of writing any custom query.?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing doesn't work?
Think about it: You're setting up a route for /tag but then sending /tag/php and wondering why it doesn't route. Try setting the route /tag/* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Development/Production setup with databases
I run some detection logic in bootstrap to see what server I'm on, and set a constant that tells the system where I'm at. In database.php I have a few class variables to specify each of my db setups (staging, qa, production). Then in AppModel, I specify $useDbConfig using my constant so that all my models use the right DB setup. -- John On May 2, 2008, at 10:19 AM, basstech wrote: > > After reading through the configuration documentation, it is nice that > CakePHP supports multiple database configurations. However, I am > wondering if there is an easy way to simply "turn on" one > configuration over another across the entire application. > > In the documentation it says: > > The $default connection array is used unless another connection is > specified by the $useDbConfig property in a model. > > Does this mean that in every model of my entire application I will > need to specify that I want to use the development connection? Or can > I simply set this once, and it will apply application-wide? If so, how > is this best accomplished? > > Thanks > CJ > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Routing doesn't work?
I am trying to send tag/ to tags controller but when i put this in my routes: Router::connect('/tag', array('controller' => 'tags', 'action' => 'find')); and i go to the url /tag/php i get this: Error: TagController could not be found. Does anybody know what could be the problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: no scripts on home page?
Wow, rookie mistake. Thanks guys, I feel a bit embarrased now. On May 2, 10:27 am, grigri <[EMAIL PROTECTED]> wrote: > There's nothing 'special' about the PagesController - it uses the > 'Html' helper unless you tell it not to. > > Without seeing some code, it's impossible to be certain... > > ...but, were I a gamber, I'd bet that you're doing this: > > link(...); ?> > > instead of this (which works): > > link(...); ?> > > If this isn't it, show some code! > > On May 2, 1:46 pm,alxlevin<[EMAIL PROTECTED]> wrote: > > > > > Hi. This is my first project with CakePHP so hopefully this is a > > simple question. I'm trying to use the standard views/pages/home.ctp > > file to create my home page view. I've found that I can include > > elements but not anything from the htmlhelper, such as images. When I > > try and use it, I don't get any errors but no HTML is outputted at all > > from the helper. I've had no problems on any of the standard view > > pages, just this one. Is there some kind of simple variable I need to > > set in order for the htmlhelper to be active on this page? I'd > > appreciate any insight that anyone might have. Thanks.- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Development/Production setup with databases
After reading through the configuration documentation, it is nice that CakePHP supports multiple database configurations. However, I am wondering if there is an easy way to simply "turn on" one configuration over another across the entire application. In the documentation it says: The $default connection array is used unless another connection is specified by the $useDbConfig property in a model. Does this mean that in every model of my entire application I will need to specify that I want to use the development connection? Or can I simply set this once, and it will apply application-wide? If so, how is this best accomplished? Thanks CJ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: why does cache view keep on regenerating
hi, I think I found the problem, it seem that var $cacheAction = array('testmenu'=>'60'); is not working when use the below format everyworks, thank you everyone for the help var $cacheAction = "+1 hour"; www.generics.ws www.genericsmed.com On May 2, 10:12 pm, robert123 <[EMAIL PROTECTED]> wrote: > Thanks for replying, but I comment the > > $this->cacheAction = true; in the testmenu method, the view stop > generating in the cache folder. Any Idea why is it so, thanks > > www.generics.ws > > On May 2, 9:23 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > > > On Fri, May 2, 2008 at 9:18 AM, robert123 <[EMAIL PROTECTED]> wrote: > > > > hi, thanks this is the code > > > > > > > class CategoriesController extends AppController > > > { > > > > var $name = 'Categories'; > > > var $uses = array('Category','Image'); > > > > var $components = array('Files'); > > > > var $helpers = array('Tree','Form','Cache'); > > > > var $cacheAction = array('testmenu'=>'60'); > > > > function testmenu() > > > { > > > $this->cacheAction = true; > > > $this->layout='blank'; > > > $this->Category->recursive = 0; > > > $this->set('data', $this->Category- > > > >findAll("Category.parent_id = '0' and Category.active = '1'", > > > array('name'), 'Category.sort')); > > > $this->render(); > > > > } > > > You set $this->cacheAction to be an array...then set it to true in > > testmenu(). > > > I'm guessing this isn't what you intended. > > > -- > > Chris Hartjes > > Internet Loudmouth > > Motto for 2008: "Moving from herding elephants to handling snakes..." > > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Call to undefined function cake_conn() in /var/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 102
Why do you have the "connect" key set to "cake_conn" in config/ database.php? Where did you get the idea you were supposed to do that? On May 2, 2:56 am, edwingt <[EMAIL PROTECTED]> wrote: > I have this mesage after configurating the database.php file > Call to undefined function cake_conn() in mydir/cake/libs/model/dbo/ > dbo_mysql.php on line 102 > > I already verify the modrewrite and .htaccess files and im sure that > mysql cli is configured with > extension=mysql.so > > I surf the web for two hours and didnt find any solution, even I can > see that cake_conn es a new cakephp function. > Thanks if anybody have any sugestions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP css files
Lol, use Web Developer Toolbar, and grab them directly from the website. Cheers, mbavio On May 1, 12:37 pm, Sliv <[EMAIL PROTECTED]> wrote: > which site are you talking about, and why can't you grab the links > from the page source? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
On May 2, 11:32 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > Pfft. *Real* designers use vim and edit the images as binaries. :) Hahaha that would be very funny to see in action :P Cheers, mbavio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Sharing plugins between several CakePHP websites.
Hi, I have 3 websites that all require a blog reusable component that I'm developing. Can I share the same plug-in across several websites by telling the different Cake websites to look for plugins in the same directory. Thanks, Mustan9. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
No real designers use EMACS for images!!! truely thats was a good one Chris. I needed a laugh this morning On May 2, 9:32 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > Pfft. *Real* designers use vim and edit the images as binaries. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: no scripts on home page?
heh - depends on my caffeine intake, I suppose On May 2, 3:29 pm, Sliv <[EMAIL PROTECTED]> wrote: > which one of us is the "evil" twin... :P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
> Pfft. *Real* designers use vim and edit the images as binaries. :) And thats why I read your blog and emails in the mailing list every day, LOL. > -- > > > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard: http://www.littlehart.net/atthekeyboard > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Formatting Forms
Okay - found it in the manual. Doh! On May 2, 3:29 pm, "annie.r.knight" <[EMAIL PROTECTED]> wrote: > I assumed I'd missed the 'before', 'between' etc.. options when > looking through the documentation/api. In fact I've gone through it > again and still can't find any documentation of these options. I had > to go to the source before I found any confirmation that they existed > (not that I doubted you, of course, but for my own piece of mind!). > Have a missed a consolidated list of these useful options for this and > any other functions, or is a delve into the source required each time? > > On May 2, 3:17 pm, "annie.r.knight" <[EMAIL PROTECTED]> > wrote: > > > Looks like it might just ease the pain. > > > Thank you very much. > > > On May 2, 2:53 pm, grigri <[EMAIL PROTECTED]> wrote: > > > > $defaults = array( > > > 'before' => '', > > > 'between' => '', > > > 'after' => '', > > > 'div' => false // Don't forget this > > > ); > > > $inputs = array( > > > 'fieldset' => false, // Don't forget this > > > 'eggs' => array_merge($defaults, array('type' => 'text', 'value' => > > > 'test')), > > > 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => > > > 'ing')) > > > ); > > > echo ''; > > > echo $form->inputs($inputs); > > > echo ''; > > > > [I've posted a ticket to integrate a 'defaults' key into > > > FormHelper::inputs() to avoid the array_merge thingy, for the future!] > > > > On May 2, 2:43 pm, "annie.r.knight" <[EMAIL PROTECTED]> > > > wrote: > > > > > Hi all. > > > > > I have an app with a number of long forms in. These forms are > > > > formatted in tables with each row looking something like: Input > > > > LabelText Box [Or Whatever]. While the long term > > > > solution clearly is to migrate this to CSS design I'm going for the > > > > quick (and dirty) solution for now using Cake to generate the form and > > > > then putting it into the table. > > > > > All I'm doing is to set each input's 'label' option to '' [blank] and > > > > manually putting the Label I want in an adjacent table cell. > > > > > Is there a better way of doing this? > > > > > Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Use model inside helper
> In a word, no. Controller sends the data prepared by your model to the > view where your helper can access it. Hmm... I'd have to disagree there. With regards to data [the four horsemen CRUD], I totally agree - you should not do this in a helper. On the other hand, model/schema inspection is perfectly acceptable from within a helper. This is how the form helper gets information on the fields it's displaying editable controls for, for example. I can think of a few other uses [but not that many I grant you]. So I'd say: > Is it correct in MVC use a model inside a helper. Yes, in certain circumstances. But not for anything CRUD-ish. > If yes how can I do that? in your helper: function something() { $Model =& ClassRegistry::getObject('ModelName'); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
On Fri, May 2, 2008 at 10:09 AM, mydesignbuddy <[EMAIL PROTECTED]> wrote: > And please don't make me read another flame war like "vi" vs. "emacs", > "mac" vs. "windows" vs. "linux", "BBEdit" vs. "TextMate", etc. because > they accomplish the same tasks. Its just a matter of choice and I > prefer to have choices. Now flame wars about "GIMP" vs. "Photoshop" > are different Photoshop kicks GIMP's ass. Pfft. *Real* designers use vim and edit the images as binaries. :) -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problems with bake
Ok I am still having problems adding the php-cli. I have watched the screencast many times and I think I have narrowed down my problem. when gwoo adds his php-cli he adds the directory c:\wamp\php; I have a different version of wamp so my php-cli is located in C:\wamp\bin\php \php5.2.5; I have added this to the environment variables and had no luck. In this folder I have three different cli files however: php.cli, php-cgi.cli, and php-win.cli. Could this be causing me some problems? I have also tried to add the file path of each of the files to the environment variables instead of the directory, still no luck. Again, I appreciate all the help you all are giving me this issue. Chuck On Apr 30, 9:50 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 30, 2008 at 10:27 AM, chuck24 <[EMAIL PROTECTED]> wrote: > > > I set up the console as the screen cast suggested. I also am using > > wamp so that so that eased things a bit. I also adjusted the path to > > meet my file locations. I am still however getting the same error. > > > "'php' is not recognized as an internal or external command, operable > > program, or batch file." > > > Any advice? > > Sounds to me like you haven't set up the console like the screencast > said. Watch it again and pay very close attention to the paths that > gwoo adds in. Your php-cli executable has to be in your path or else > none of it works. > > -- > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: no scripts on home page?
which one of us is the "evil" twin... :P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Formatting Forms
I assumed I'd missed the 'before', 'between' etc.. options when looking through the documentation/api. In fact I've gone through it again and still can't find any documentation of these options. I had to go to the source before I found any confirmation that they existed (not that I doubted you, of course, but for my own piece of mind!). Have a missed a consolidated list of these useful options for this and any other functions, or is a delve into the source required each time? On May 2, 3:17 pm, "annie.r.knight" <[EMAIL PROTECTED]> wrote: > Looks like it might just ease the pain. > > Thank you very much. > > On May 2, 2:53 pm, grigri <[EMAIL PROTECTED]> wrote: > > > $defaults = array( > > 'before' => '', > > 'between' => '', > > 'after' => '', > > 'div' => false // Don't forget this > > ); > > $inputs = array( > > 'fieldset' => false, // Don't forget this > > 'eggs' => array_merge($defaults, array('type' => 'text', 'value' => > > 'test')), > > 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => > > 'ing')) > > ); > > echo ''; > > echo $form->inputs($inputs); > > echo ''; > > > [I've posted a ticket to integrate a 'defaults' key into > > FormHelper::inputs() to avoid the array_merge thingy, for the future!] > > > On May 2, 2:43 pm, "annie.r.knight" <[EMAIL PROTECTED]> > > wrote: > > > > Hi all. > > > > I have an app with a number of long forms in. These forms are > > > formatted in tables with each row looking something like: Input > > > LabelText Box [Or Whatever]. While the long term > > > solution clearly is to migrate this to CSS design I'm going for the > > > quick (and dirty) solution for now using Cake to generate the form and > > > then putting it into the table. > > > > All I'm doing is to set each input's 'label' option to '' [blank] and > > > manually putting the Label I want in an adjacent table cell. > > > > Is there a better way of doing this? > > > > Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Use model inside helper
In a word, no. Controller sends the data prepared by your model to the view where your helper can access it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: no scripts on home page?
There's nothing 'special' about the PagesController - it uses the 'Html' helper unless you tell it not to. Without seeing some code, it's impossible to be certain... ...but, were I a gamber, I'd bet that you're doing this: link(...); ?> instead of this (which works): link(...); ?> If this isn't it, show some code! On May 2, 1:46 pm, alxlevin <[EMAIL PROTECTED]> wrote: > Hi. This is my first project with CakePHP so hopefully this is a > simple question. I'm trying to use the standard views/pages/home.ctp > file to create my home page view. I've found that I can include > elements but not anything from the htmlhelper, such as images. When I > try and use it, I don't get any errors but no HTML is outputted at all > from the helper. I've had no problems on any of the standard view > pages, just this one. Is there some kind of simple variable I need to > set in order for the htmlhelper to be active on this page? I'd > appreciate any insight that anyone might have. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: no scripts on home page?
the pages controller uses the home view and by default has the HTML helper loaded. Make sure you are using echo $html... and not just $html also read this in it's entirety: http://book.cakephp.org On May 2, 8:46 am, alxlevin <[EMAIL PROTECTED]> wrote: > Hi. This is my first project with CakePHP so hopefully this is a > simple question. I'm trying to use the standard views/pages/home.ctp > file to create my home page view. I've found that I can include > elements but not anything from the htmlhelper, such as images. When I > try and use it, I don't get any errors but no HTML is outputted at all > from the helper. I've had no problems on any of the standard view > pages, just this one. Is there some kind of simple variable I need to > set in order for the htmlhelper to be active on this page? I'd > appreciate any insight that anyone might have. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Use model inside helper
I have a question. Is it correct in MVC use a model inside a helper. If yes how can I do that? Many Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
no scripts on home page?
Hi. This is my first project with CakePHP so hopefully this is a simple question. I'm trying to use the standard views/pages/home.ctp file to create my home page view. I've found that I can include elements but not anything from the htmlhelper, such as images. When I try and use it, I don't get any errors but no HTML is outputted at all from the helper. I've had no problems on any of the standard view pages, just this one. Is there some kind of simple variable I need to set in order for the htmlhelper to be active on this page? I'd appreciate any insight that anyone might have. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
Okay guys thats enough bashing because you all know no matter what computer you use you will eventually curse and threaten to throw it across the room when it misbehaves. And please don't make me read another flame war like "vi" vs. "emacs", "mac" vs. "windows" vs. "linux", "BBEdit" vs. "TextMate", etc. because they accomplish the same tasks. Its just a matter of choice and I prefer to have choices. Now flame wars about "GIMP" vs. "Photoshop" are different Photoshop kicks GIMP's ass. Now thats settled can't we all just get alone and help fellow developers with there questions. On May 2, 8:31 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > > I use free software to code in Cake...on my MacBook...so unless your > > PC was free, you should STFU about those who choose to spend money on > > Apple hardware and use OS-X instead of PC hardware running a free OS > > like GNU/Linux. > > I think you are mistakenly reading free as 'having no cost', I was > speaking about freedom (libre in Spanish my natural language). > > I don't think software should have no cost, I make software for > living. I wasn't speaking of hardware also. Just don't see the point > in buying a mac and don't running OS X. Btw, I wasn't saying Mac or OS > X are bad (in the technical sense), is just a matter of beliefs. > > Maybe is all my fault, I don't speak English so maybe what I've wrote > sounds offensive to you or other mac users. Sorry about that, wasn't > my intention. > > Have a nice day, > - Dardo Sordi. > > > I have done both in my time. > > > Now, back to arguing about other CakePHP minutae! > > > -- > > > Chris Hartjes > > Internet Loudmouth > > Motto for 2008: "Moving from herding elephants to handling snakes..." > > [EMAIL PROTECTED]:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: coding standards & saving serialized data to the db
> grigrim so you are saying that the model would unserialize the data on > an afterFind function? Rather than me manually looping through and > unserializing the data? Well, yeah - manually looping through and whatnot is a pain. I'm just never sure exactly what format the data is in in afterFind(), so it makes it difficult. I'd just like to say 'before you save, these values get serialized into this field' and 'after retrieval, this field gets unserialized into those values', and have it happen automagically. It's possible a behavior could be written to do this... > grigri, that m at the end of your name was supposed to be a comma. m > = , apparently No probs - although given your handle it's slightly ironic :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Formatting Forms
Looks like it might just ease the pain. Thank you very much. On May 2, 2:53 pm, grigri <[EMAIL PROTECTED]> wrote: > $defaults = array( > 'before' => '', > 'between' => '', > 'after' => '', > 'div' => false // Don't forget this > ); > $inputs = array( > 'fieldset' => false, // Don't forget this > 'eggs' => array_merge($defaults, array('type' => 'text', 'value' => > 'test')), > 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => > 'ing')) > ); > echo ''; > echo $form->inputs($inputs); > echo ''; > > [I've posted a ticket to integrate a 'defaults' key into > FormHelper::inputs() to avoid the array_merge thingy, for the future!] > > On May 2, 2:43 pm, "annie.r.knight" <[EMAIL PROTECTED]> > wrote: > > > Hi all. > > > I have an app with a number of long forms in. These forms are > > formatted in tables with each row looking something like: Input > > LabelText Box [Or Whatever]. While the long term > > solution clearly is to migrate this to CSS design I'm going for the > > quick (and dirty) solution for now using Cake to generate the form and > > then putting it into the table. > > > All I'm doing is to set each input's 'label' option to '' [blank] and > > manually putting the Label I want in an adjacent table cell. > > > Is there a better way of doing this? > > > Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: why does cache view keep on regenerating
Thanks for replying, but I comment the $this->cacheAction = true; in the testmenu method, the view stop generating in the cache folder. Any Idea why is it so, thanks www.generics.ws On May 2, 9:23 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Fri, May 2, 2008 at 9:18 AM, robert123 <[EMAIL PROTECTED]> wrote: > > > hi, thanks this is the code > > > > > class CategoriesController extends AppController > > { > > > var $name = 'Categories'; > > var $uses = array('Category','Image'); > > > var $components = array('Files'); > > > var $helpers = array('Tree','Form','Cache'); > > > var $cacheAction = array('testmenu'=>'60'); > > > function testmenu() > > { > > $this->cacheAction = true; > > $this->layout='blank'; > > $this->Category->recursive = 0; > > $this->set('data', $this->Category- > > >findAll("Category.parent_id = '0' and Category.active = '1'", > > array('name'), 'Category.sort')); > > $this->render(); > > > } > > You set $this->cacheAction to be an array...then set it to true in testmenu(). > > I'm guessing this isn't what you intended. > > -- > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: coding standards & saving serialized data to the db
grigri, that m at the end of your name was supposed to be a comma. m = , apparently On May 2, 10:03 am, validkeys <[EMAIL PROTECTED]> wrote: > grigrim so you are saying that the model would unserialize the data on > an afterFind function? Rather than me manually looping through and > unserializing the data? > > On May 2, 8:33 am, grigri <[EMAIL PROTECTED]> wrote: > > > I was going for this approach on a project a while ago... didn't do it > > in the end though. > > > I'm sure that it's always possible to avoid having to do this, but in > > some cases it might be well worth it. > > > There doesn't seem to be an easy, well-documented way of handling this > > sort of thing. I mean, where do you put the serialize() function - > > Model::set(), Model::deconstruct() ? Model::deconstruct() seems like > > the most likely place but how exactly does it work. > > > And then where's the unserialize() go? Model::afterFind() seems to be > > the best place, but depending on the find type and whether the model > > was called directly or as an association changes the structure of the > > data array [at least it used to in an older version - this might not > > be the case any more]. > > > It would be so much easier if the special handling for date fields was > > in an external behavior; all in one place so you could learn by > > example. > > > On May 2, 12:36 pm, validkeys <[EMAIL PROTECTED]> wrote: > > > > I have an app which has 2 types of quote requests. Rather that have 2 > > > seperate tables with tons of fields, I serialize all of the form data > > > and just store it in one field. Besides the obvious searching > > > downside, is there any practical or standards downside to what i am > > > doing? > > > > I only ask because i am preparing for another project that might be > > > using serialize quite a lot and want to make sure that i am not being > > > a total moron in using serialize before i start planning for the > > > project. > > > > Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
> I ran Linux for 7 years before switching to Mac, so I know all about > "free as in speech", which is what you're referring to. You can run linux forever if you want, that doesn't makes you understand the concept of freedom, the most important thing for me. I don't care if it is the best tool, if it's free I can make it better. > > > Maybe is all my fault, I don't speak English so maybe what I've wrote > > sounds offensive to you or other mac users. Sorry about that, wasn't > > my intention. > > It's not an English thing, it's a "you can use free software in a > proprietary environment just fine thank you" way of thinking for me. > As I mess around with stuff more I've come to realize that if you > can't customize your tools yourself (hence my recent struggles with > getting my vim skills (using MacVim) up to speed) then you are missing > out on setting up your development rig exactly the way you want. > > I use paid tools when they are needed (TextMate, Komodo, CSSEdit) > because I can't do it by hand but I try to use the free stuff whenever > I can. Right tool for the job, whether it's paid-for or not. And there is where we disagree. > Let's hope this thread can die now. It's ok for me. - Dardo Sordi. > -- > > > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard: http://www.littlehart.net/atthekeyboard > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: coding standards & saving serialized data to the db
grigrim so you are saying that the model would unserialize the data on an afterFind function? Rather than me manually looping through and unserializing the data? On May 2, 8:33 am, grigri <[EMAIL PROTECTED]> wrote: > I was going for this approach on a project a while ago... didn't do it > in the end though. > > I'm sure that it's always possible to avoid having to do this, but in > some cases it might be well worth it. > > There doesn't seem to be an easy, well-documented way of handling this > sort of thing. I mean, where do you put the serialize() function - > Model::set(), Model::deconstruct() ? Model::deconstruct() seems like > the most likely place but how exactly does it work. > > And then where's the unserialize() go? Model::afterFind() seems to be > the best place, but depending on the find type and whether the model > was called directly or as an association changes the structure of the > data array [at least it used to in an older version - this might not > be the case any more]. > > It would be so much easier if the special handling for date fields was > in an external behavior; all in one place so you could learn by > example. > > On May 2, 12:36 pm, validkeys <[EMAIL PROTECTED]> wrote: > > > I have an app which has 2 types of quote requests. Rather that have 2 > > seperate tables with tons of fields, I serialize all of the form data > > and just store it in one field. Besides the obvious searching > > downside, is there any practical or standards downside to what i am > > doing? > > > I only ask because i am preparing for another project that might be > > using serialize quite a lot and want to make sure that i am not being > > a total moron in using serialize before i start planning for the > > project. > > > Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Formatting Forms
$defaults = array( 'before' => '', 'between' => '', 'after' => '', 'div' => false // Don't forget this ); $inputs = array( 'fieldset' => false, // Don't forget this 'eggs' => array_merge($defaults, array('type' => 'text', 'value' => 'test')), 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => 'ing')) ); echo ''; echo $form->inputs($inputs); echo ''; [I've posted a ticket to integrate a 'defaults' key into FormHelper::inputs() to avoid the array_merge thingy, for the future!] On May 2, 2:43 pm, "annie.r.knight" <[EMAIL PROTECTED]> wrote: > Hi all. > > I have an app with a number of long forms in. These forms are > formatted in tables with each row looking something like: Input > LabelText Box [Or Whatever]. While the long term > solution clearly is to migrate this to CSS design I'm going for the > quick (and dirty) solution for now using Cake to generate the form and > then putting it into the table. > > All I'm doing is to set each input's 'label' option to '' [blank] and > manually putting the Label I want in an adjacent table cell. > > Is there a better way of doing this? > > Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
On Fri, May 2, 2008 at 9:31 AM, Dardo Sordi Bogado <[EMAIL PROTECTED]> wrote: > > I think you are mistakenly reading free as 'having no cost', I was > speaking about freedom (libre in Spanish my natural language). I ran Linux for 7 years before switching to Mac, so I know all about "free as in speech", which is what you're referring to. > Maybe is all my fault, I don't speak English so maybe what I've wrote > sounds offensive to you or other mac users. Sorry about that, wasn't > my intention. It's not an English thing, it's a "you can use free software in a proprietary environment just fine thank you" way of thinking for me. As I mess around with stuff more I've come to realize that if you can't customize your tools yourself (hence my recent struggles with getting my vim skills (using MacVim) up to speed) then you are missing out on setting up your development rig exactly the way you want. I use paid tools when they are needed (TextMate, Komodo, CSSEdit) because I can't do it by hand but I try to use the free stuff whenever I can. Right tool for the job, whether it's paid-for or not. Let's hope this thread can die now. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Formatting Forms
Hi all. I have an app with a number of long forms in. These forms are formatted in tables with each row looking something like: Input LabelText Box [Or Whatever]. While the long term solution clearly is to migrate this to CSS design I'm going for the quick (and dirty) solution for now using Cake to generate the form and then putting it into the table. All I'm doing is to set each input's 'label' option to '' [blank] and manually putting the Label I want in an adjacent table cell. Is there a better way of doing this? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
> I use free software to code in Cake...on my MacBook...so unless your > PC was free, you should STFU about those who choose to spend money on > Apple hardware and use OS-X instead of PC hardware running a free OS > like GNU/Linux. I think you are mistakenly reading free as 'having no cost', I was speaking about freedom (libre in Spanish my natural language). I don't think software should have no cost, I make software for living. I wasn't speaking of hardware also. Just don't see the point in buying a mac and don't running OS X. Btw, I wasn't saying Mac or OS X are bad (in the technical sense), is just a matter of beliefs. Maybe is all my fault, I don't speak English so maybe what I've wrote sounds offensive to you or other mac users. Sorry about that, wasn't my intention. Have a nice day, - Dardo Sordi. > I have done both in my time. > > Now, back to arguing about other CakePHP minutae! > > -- > > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard: http://www.littlehart.net/atthekeyboard > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: why does cache view keep on regenerating
On Fri, May 2, 2008 at 9:18 AM, robert123 <[EMAIL PROTECTED]> wrote: > > hi, thanks this is the code > > > > class CategoriesController extends AppController > { > > var $name = 'Categories'; > var $uses = array('Category','Image'); > > var $components = array('Files'); > > var $helpers = array('Tree','Form','Cache'); > > var $cacheAction = array('testmenu'=>'60'); > > > > > function testmenu() > { > $this->cacheAction = true; > $this->layout='blank'; > $this->Category->recursive = 0; > $this->set('data', $this->Category- > >findAll("Category.parent_id = '0' and Category.active = '1'", > array('name'), 'Category.sort')); > $this->render(); > > } > You set $this->cacheAction to be an array...then set it to true in testmenu(). I'm guessing this isn't what you intended. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: why does cache view keep on regenerating
hi, thanks this is the code '60'); function testmenu() { $this->cacheAction = true; $this->layout='blank'; $this->Category->recursive = 0; $this->set('data', $this->Category- >findAll("Category.parent_id = '0' and Category.active = '1'", array('name'), 'Category.sort')); $this->render(); } } On May 2, 8:35 pm, "Marcin Domanski" <[EMAIL PROTECTED]> wrote: > paste the controller code to the bin, you're not writing to the db ? > > > > On Fri, May 2, 2008 at 1:22 PM, robert123 <[EMAIL PROTECTED]> wrote: > > > Yes it is 0, I am not debugging > > > www.generics.ws > > > On May 2, 6:54 pm, "Marcin Domanski" <[EMAIL PROTECTED]> wrote: > > > is debug = 0 ? > > > > On Fri, May 2, 2008 at 2:17 AM, robert123 <[EMAIL PROTECTED]> wrote: > > > > > I am using the latest Cake build (1.2.0.6311 beta) > > > > > I have enable caching on my system by the two statement in the core > > > > file > > > > > Configure::write('Cache.disable', false); > > > > Configure::write('Cache.check', true); > > > > > The first time I accessed the url, a cache view is generated in app > > > > \tmp\cache\views. > > > > But subsequently everytime I access same the url again, the same view > > > > is regenerated again in the cache folder. The controller code is > > > > executed and database is hit, Thus there is no improvement in > > > > performance at all, anyone knows how to solve this issue? Thanks > > > > > www.generics.ws > > > > www.genericsmed.com > > > > -- > > > Marcin Domanskihttp://kabturek.info > > -- > Marcin Domanskihttp://kabturek.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: coding standards & saving serialized data to the db
I had run across an article a while ago talking about gzipping large bodies of text before writing it to the database and wondered the same sorts of things... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Bakery is not updating?
If it's a question of articles sitting in the pending queue for a "long" time, that's something I guess only gwoo could answer, as I don't know who all are involved in reviewing and approving articles. On a side note: IMHO, I don't think people should stop publishing to their blogs because they're waiting for bakery approval. I feel the bakery is a place where people can submit content and if/when it is approved, it's a central "official" repository of content that is an "official" resource. This should not in any way hinder or stop the community from publishing their own content to their own blogs/sites/forums as "unofficial" resources. Community members simply need to understand the distinction and the potential "risk" of following "unofficial" or "unapproved" content vs. "official" or "approved" content. Some "unofficial" content is superior to the "official" content, and some "official" content actually gets different reviews depending on who in the core team you talk to. Not to mention the fact that as time goes on and the framework evolves, even "official" content can become deprecated or essentially "incorrect". My personal view is if you have your own publishing platform, publish away and (any legal/copyright issues notwithstanding) it's nobody's business but yours and if someone in the cake community or on the cake team doesn't like it, that's just too bad for them, isn't it? Afterwards, (or if you don't have your own publishing platform), submit it to the bakery (or cookbook depending on the nature of the content), so that it has the "chance" of becoming part of an "official" repository. However, if for whatever reason it doesn't get approved, or it sits in a pending queue "forever", at least it's still out there. Finally, have a look at the google group "wiki" pages here, specifically the "unofficial resources" and even more specifically things like the links I've created to searches in the "blogosphere" for cakephp related information. There's a lot of stuff out there. Add yours to it ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: why does cache view keep on regenerating
paste the controller code to the bin, you're not writing to the db ? On Fri, May 2, 2008 at 1:22 PM, robert123 <[EMAIL PROTECTED]> wrote: > > Yes it is 0, I am not debugging > > > www.generics.ws > > > On May 2, 6:54 pm, "Marcin Domanski" <[EMAIL PROTECTED]> wrote: > > is debug = 0 ? > > > > > > > > > On Fri, May 2, 2008 at 2:17 AM, robert123 <[EMAIL PROTECTED]> wrote: > > > > > I am using the latest Cake build (1.2.0.6311 beta) > > > > > I have enable caching on my system by the two statement in the core > > > file > > > > > Configure::write('Cache.disable', false); > > > Configure::write('Cache.check', true); > > > > > The first time I accessed the url, a cache view is generated in app > > > \tmp\cache\views. > > > But subsequently everytime I access same the url again, the same view > > > is regenerated again in the cache folder. The controller code is > > > executed and database is hit, Thus there is no improvement in > > > performance at all, anyone knows how to solve this issue? Thanks > > > > > www.generics.ws > > > www.genericsmed.com > > > > -- > > Marcin Domanskihttp://kabturek.info > > > > > -- Marcin Domanski http://kabturek.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: coding standards & saving serialized data to the db
I was going for this approach on a project a while ago... didn't do it in the end though. I'm sure that it's always possible to avoid having to do this, but in some cases it might be well worth it. There doesn't seem to be an easy, well-documented way of handling this sort of thing. I mean, where do you put the serialize() function - Model::set(), Model::deconstruct() ? Model::deconstruct() seems like the most likely place but how exactly does it work. And then where's the unserialize() go? Model::afterFind() seems to be the best place, but depending on the find type and whether the model was called directly or as an association changes the structure of the data array [at least it used to in an older version - this might not be the case any more]. It would be so much easier if the special handling for date fields was in an external behavior; all in one place so you could learn by example. On May 2, 12:36 pm, validkeys <[EMAIL PROTECTED]> wrote: > I have an app which has 2 types of quote requests. Rather that have 2 > seperate tables with tons of fields, I serialize all of the form data > and just store it in one field. Besides the obvious searching > downside, is there any practical or standards downside to what i am > doing? > > I only ask because i am preparing for another project that might be > using serialize quite a lot and want to make sure that i am not being > a total moron in using serialize before i start planning for the > project. > > Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
coding standards & saving serialized data to the db
I have an app which has 2 types of quote requests. Rather that have 2 seperate tables with tons of fields, I serialize all of the form data and just store it in one field. Besides the obvious searching downside, is there any practical or standards downside to what i am doing? I only ask because i am preparing for another project that might be using serialize quite a lot and want to make sure that i am not being a total moron in using serialize before i start planning for the project. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Call to undefined function cake_conn() in /var/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 102
this might be something, based on your error message in our title, it is looking for cake/cake/. Do you have some sort of advanced set up? On May 2, 2:56 am, edwingt <[EMAIL PROTECTED]> wrote: > I have this mesage after configurating the database.php file > Call to undefined function cake_conn() in mydir/cake/libs/model/dbo/ > dbo_mysql.php on line 102 > > I already verify the modrewrite and .htaccess files and im sure that > mysql cli is configured with > extension=mysql.so > > I surf the web for two hours and didnt find any solution, even I can > see that cake_conn es a new cakephp function. > Thanks if anybody have any sugestions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: why does cache view keep on regenerating
Yes it is 0, I am not debugging www.generics.ws On May 2, 6:54 pm, "Marcin Domanski" <[EMAIL PROTECTED]> wrote: > is debug = 0 ? > > > > On Fri, May 2, 2008 at 2:17 AM, robert123 <[EMAIL PROTECTED]> wrote: > > > I am using the latest Cake build (1.2.0.6311 beta) > > > I have enable caching on my system by the two statement in the core > > file > > > Configure::write('Cache.disable', false); > > Configure::write('Cache.check', true); > > > The first time I accessed the url, a cache view is generated in app > > \tmp\cache\views. > > But subsequently everytime I access same the url again, the same view > > is regenerated again in the cache folder. The controller code is > > executed and database is hit, Thus there is no improvement in > > performance at all, anyone knows how to solve this issue? Thanks > > > www.generics.ws > > www.genericsmed.com > > -- > Marcin Domanskihttp://kabturek.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: why does cache view keep on regenerating
is debug = 0 ? On Fri, May 2, 2008 at 2:17 AM, robert123 <[EMAIL PROTECTED]> wrote: > > I am using the latest Cake build (1.2.0.6311 beta) > > I have enable caching on my system by the two statement in the core > file > > Configure::write('Cache.disable', false); > Configure::write('Cache.check', true); > > The first time I accessed the url, a cache view is generated in app > \tmp\cache\views. > But subsequently everytime I access same the url again, the same view > is regenerated again in the cache folder. The controller code is > executed and database is hit, Thus there is no improvement in > performance at all, anyone knows how to solve this issue? Thanks > > > > www.generics.ws > www.genericsmed.com > > > > > > -- Marcin Domanski http://kabturek.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Looking for the Rapid in Cakephp
haha chill out Chris :) On Fri, May 2, 2008 at 5:24 AM, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On Thu, May 1, 2008 at 11:12 PM, Dardo Sordi Bogado > <[EMAIL PROTECTED]> wrote: > > No, I'm a free (not as in beer) software guy, so it will not work for > > me, thanks anyway. > > I will hopefully end this thread by crushing someone's spirit: > > I use free software to code in Cake...on my MacBook...so unless your > PC was free, you should STFU about those who choose to spend money on > Apple hardware and use OS-X instead of PC hardware running a free OS > like GNU/Linux. I think it wasn't really the cost of hardware that was the point. > I have done both in my time. I've done both too and got back to linux/freebsd on my thinkpad - it's a matter of taste like Dardo said. And the hardware wasn't even impressive (macbook 13'3 - glossy screen, overheating problems - heard that was resolved in newest revisions but still it wasnt a good impression but to be honest what would you expect from a $1300 machine ? ;) ) It was in Tiger days.. i've heard that they even included virtual desktops in leopard - yay!;) http://geekandpoke.typepad.com/geekandpoke/2008/04/imagine-a-world.html -- Marcin Domanski http://kabturek.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Call to undefined function cake_conn() in /var/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 102
I have this mesage after configurating the database.php file Call to undefined function cake_conn() in mydir/cake/libs/model/dbo/ dbo_mysql.php on line 102 I already verify the modrewrite and .htaccess files and im sure that mysql cli is configured with extension=mysql.so I surf the web for two hours and didnt find any solution, even I can see that cake_conn es a new cakephp function. Thanks if anybody have any sugestions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---