CakePHP 1.2 validation - userDefined function
Hi guys, I'm trying to check if a record already exists (based on a filename), if it does it should fail validation. I'm using CakePHP 1.2 and had a look at 'userDefined' which looks like it should call a custom function. This function I'm talking about: http://api.cakephp.org/1.2/validation_8php-source.html#l00633 Here's what I've tried: function uniqueFilename() { return false; } var $validate = array( 'name' => array( 'rule' => array( 'userDefined' => array('Asset', 'uniqueFilename', array('param1', 'param2')) ), 'message' => 'Filename already exists!' ) ); Above code gives me a couple of errors: Notice (8): Undefined offset: 0 [CORE/cake/libs/model/model.php, line 1683] Context | Code $this = Asset object $data = array("parent_id" => "574", "name" => "Lloyd Banks ft. 50 Cent - Hands Up (Dirty).mp3", "id" => "576") $Validation = Validation object $validator = array("allowEmpty" => true, "message" => "Angiv venligst en titel for siden", "rule" => array, "on" => null) $fieldName = "name" $this->invalidate($fieldName, $validator['message']); } elseif (isset($data[$fieldName])) { if (is_array($validator['rule'])) { $rule = $validator['rule'][0]; unset($validator['rule'][0]); Model::invalidFields() - CORE/cake/libs/model/model.php, line 1683 Model::validates() - CORE/cake/libs/model/model.php, line 1633 Model::save() - CORE/cake/libs/model/model.php, line 993 AssetsController::admin_edit() - APP/controllers/ assets_controller.php, line 123 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 348 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 330 [main] - ROOT//www/index.php, line 84 Notice (8): Undefined property: SessionComponent::$themeWeb [CORE/ cake/libs/controller/components/session.php, line 195] Context | Code $flashMessage = "Asset updated" $layout = "flash_success" $params = array() $key= "flash" $ctrl = null $view = View object $view->params= $this->params; $view->action= $this->action; $view->data= $this->data; $view->themeWeb = $this->themeWeb; $view->plugin= $this->plugin; SessionComponent::setFlash() - CORE/cake/libs/controller/components/ session.php, line 195 AssetsController::admin_edit() - APP/controllers/ assets_controller.php, line 125 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 348 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 330 [main] - ROOT//www/index.php, line 84 Warning (2): Cannot modify header information - headers already sent by (output started at /web/lib/1.2.x.x_04.03.2007/cake/basics.php:869) [CORE/cake/libs/controller/controller.php, line 498] Any idea? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP with Xoops???
On 3/20/07, Saganxis <[EMAIL PROTECTED]> wrote: > > Has anybody tried to integrate cakePHP with Xoops? > If not, can anybody help me or give a suggestion to integrate these > two systems?? Take a look at JAKE and DRAKE modules for Joomla and Drupal which let you use CakePHP apps withing the two without any change Cheers Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Navigation element
I tried this solution and whaddya know: if worked! here's my code. //invoke menu element renderElement('menu'); ?> //menu.thtml requestAction('controls/navindex'); foreach($controls as $control) { print ""; if ($control['Control']['path'] == $this->here){ echo $html->link($control['Control']['name'],$control['Control'] ['path'],'class="active"'); }else{ echo $html->link($control['Control']['name'],$control['Control'] ['path']); } print ""; } ?> On Mar 19, 5:19 pm, "gwoo" <[EMAIL PROTECTED]> wrote: > This has come up a lot lately for some reason. I guess because there > are not enough examples. > > Personally, I would setup and element. Lets calll it /app/views/ > elements/menu.thtml > add to this: > > $controls = $this->requestAction('controls/index'); > foreach($controls as $control) { > //do whatever} > > very simply this asks the controls controller to return the index > method so you can display the data however you want > > class ContolsController extends AppController { > > function index() { > > $contols = $this->Control->findAll(); > > //here is where the requesAction is handled so only the data is > returned > if(isset($this->params['requested'])) { > return $controls; > } > > $this->set('controls', $controls); > > } > } > > ?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Updated AppModel::expects() function for specifying which models should be returned
Mariano - you're a legend! On 13/03/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > > Ok after fixing that issue on the bakery the article has been updated: > > http://bakery.cakephp.org/articles/view/185 > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog: http://www.MarianoIglesias.com.ar > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
cakePHP with Xoops???
Has anybody tried to integrate cakePHP with Xoops? If not, can anybody help me or give a suggestion to integrate these two systems?? Thanks Saganxis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
GWT w/ CakePHP
Hello all, Anyone had any luck using GWT with CakePHP? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Showcase: inbeatstore.com using Cake.
I really like the selections on the left side - that's snazy. The design is original. However, I couldn't find an About Us page (I wasn't 100% sure what the site was), and I couldn't figure out how to buy stuff online. Is that an option? Overall, good stuff. On Feb 24, 1:15 am, "Tazz" <[EMAIL PROTECTED]> wrote: > Who ever is interested. I completed my first site using cake. It's for > a local record store here in Montreal. > > www.inbeatstore.com > > Cake Version: 1.1.13.4450 > > Additional Components: > > - ob_Auth for login to administration panel. > - Pagination from paging through "news letters" and record releases. > - Swift mailer to sends mail orders to staff. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Navigation element
This has come up a lot lately for some reason. I guess because there are not enough examples. Personally, I would setup and element. Lets calll it /app/views/ elements/menu.thtml add to this: $controls = $this->requestAction('controls/index'); foreach($controls as $control) { //do whatever } very simply this asks the controls controller to return the index method so you can display the data however you want Control->findAll(); //here is where the requesAction is handled so only the data is returned if(isset($this->params['requested'])) { return $controls; } $this->set('controls', $controls); } } ?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Navigation element
I'd say, likely you'll create a Model called Control And to get the list of menu items, use either the methods find() or findAll() to get data from the the Control Model instance. Explaining more than that would not help you.. make sure if you have not, you have run through the Blog Tutorial, and make sure you understand the basics of how the CakePHP framework works. http://manual.cakephp.org/appendix/blog_tutorial --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Navigation element
I'm trying to create a dynamic reusable navigation element that I can call where I need it, including from static pages. My menu items are stored in a table called "controls" with columns for name, path, id and display_order. I'd like to do this the correct cakePHP way instead of writing a verbose database query & output loop. I'd appreciate any help I can get. 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?hl=en -~--~~~~--~~--~--~---
Re: Suggestions on user authentication?
I also ended up writing my own. I would wager given the features you want, you will probably be writing your own Auth system also. It seems Cake lacks a standard Auth system. On the bright side, at least Cake is set up so that it comes out relatively quickly. They are working on making something for 1.2 (though I've not used it). If you write it as a Component, it is highly likely that it will work just fine on Cake 1.2 if/when you upgrade. /my2cents --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Suggestions on user authentication?
This won't answer your question (pros/cons of dAuth, obAuth, and othAuth), but when I checked out othAuth and obAuth (haven't looked at dAuth), I decided I would just write my own, because they either didn't do what I wanted, or I didn't like how they did it. The manual entry at http://manual.cakephp.org/appendix/simple_user_auth got me off the ground with handling authentication, so I recommend checking that out. On Mar 19, 9:06 am, "Michael Tuzi" <[EMAIL PROTECTED]> wrote: > Hello all. I've been looking for a way to authenticate users and there > seem to be three popular chunks of code available - dAuth, obAuth and > othAuth. Any opinions on the pros and cons for these? I'm using > CakePHP 1.1 and I don't want to setup something that will be > incompatible with CakePHP 1.2. I've been trying to wrap my head around > dAuth, so I know that, if I choose to implement it, that I would have > to make several modifications to certain parts of the code. For > example, I plan on having a user register (with a bit more info than > the current code requires), and send an email with a key to confirm a > registrants email address. Once confirmed, they can complete > registration (more fields) and then will be directed to login. > > Michael Tuzi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Menu element
I've added this code to my app_controller and changed it to reflect my data model (my table is called "controls" instead of "categories"). Now I get the following errors on every page: Notice: Undefined property: AppController::$Control in /Library/ WebServer/Documents/serials/app/app_controller.php on line 48 Fatal error: Call to a member function generateList() on a non-object in /Library/WebServer/Documents/serials/app/app_controller.php on line 48 What am I missing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Session expiring problems...
On Mar 19, 7:39 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote: > Do you mind expanding on which framework / language allows you to have > sessions automatically expire when the browser is closed? Do you just > mean that the session has a very long server side timeout, and by > closing the browser your own client just forgets its cookie (which > really hasn't closed the session), or is there something more advanced > going on? > I think that he refers to the default php behaviour when session.cookie_lifetime is set to 0, that means "until the browser is closed" http://php.net/manual/en/ref.session.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
Nate, John... I don't doubt his or anyone else's expertise around here. From my viewings and usage of Cake, the code is amazingly written, and the help around here has been about as good as I could hope for. No complaints from me. Yes I know everyone supports for free. I try to answer what questions I can in my still limited knowledge. I definately want to give back to the community which supplied this grand peice of software. Grant.. Ok then... I'll try not making a Model instance. I have no actual current need for it, I was just trying to consider the unkown future and what needs it might hold. . Actually I will try to set the UserModel->data Variable with the results from the find, and see what happens. Now that I think about it, that would actually solve my problem, the find returns results in the same format as model->data holds them from what I know. That should work quite well (in theory). Well directly or indirectly I think you've answered my question. 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?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
rtconnor: I still don't see a need for a model instance here. Your first query, User->find(), will return the User data (as an array), with appropriate associations loaded. Your second query, User->read, will return User data (as an array), with appropriate associations loaded. Instead, try $user = $this->User->find( ..your session hash conditions... ) $this->set( 'user', $user ) For future reference, model instances are used in cake as the interface to the data layer - and in any one request there will only be a single model instance created. All data is returned as arrays. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Validate a field against 2 rules in 1.2?
Hi all, I have been trying to set several validation rules for a field without much success, as the second rule always overwrites the fist. i have seen a few examples of multi rule validation but they are for 1.1 and all the info about 1.2 is single rule. can anyone 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?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
On Mar 19, 7:09 pm, "rtconner" <[EMAIL PROTECTED]> wrote: > John, Really?? I doubt you do need more information... but I'll play > along. rtconnor: John has been providing support on this mailing list pretty much since it's inception. If he didn't need more information, he wouldn't have asked for it. I'm sure I don't have to remind you that no one here is getting paid to answer your question, so it is most certainly in your best interest to help them help you. Also, asking for more information about a problem is often something that happens when it appears that the person asking the question is doing something they either shouldn't do or don't need to do. Reading the summary of your approach above, I would agree with that assessment. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
My typing skills suck. Sorry about the grammar errors. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
John, Really?? I doubt you do need more information... but I'll play along. The following two selects are summarized versions of what cakephp creates UserModel -> find() generates: > SELECT * FROM users WHERE > session_hash='thisisanobscurestringwhichcannotbeguessed'; Username comes from the session. ... Then later using that data (in a controller) I need a Model Instance. Right now I have $this->User->id = $user_id; $this->set('user', $this->User->read()); Which generates another query... > SELECT * FROM users WHERE id=4; Do you notice how I'm selecting the same data from the database twice? On Mar 19, 4:59 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Mar 19, 2007, at 4:55 PM, rtconner wrote: > > > > > Two different queries... same result.. caching does not help on this > > one. > > > Well, what is the point of having all of this nice Model Class code > > written if I'm not going to use it? Set/Get, Associations, Finds, all > > sorts of Nifty tools I should like to use when needed. > > I think we need to know a little more about what you're after in > order to help out. > > -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
On Mar 19, 2007, at 4:55 PM, rtconner wrote: > > Two different queries... same result.. caching does not help on this > one. > > Well, what is the point of having all of this nice Model Class code > written if I'm not going to use it? Set/Get, Associations, Finds, all > sorts of Nifty tools I should like to use when needed. I think we need to know a little more about what you're after in order to help out. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
License of CakePHP documentation
Hi cake-php, What is the license of the CakePHP manual? The index.html says: > Copyright © 2006 Cake Software Foundation Inc. > This work is licensed under the NEED TO CHOOSE LICENSE; you can see the > full terms of the license here where "here" is a link to http://cakephp.org. Can anyone enlighten me? I'm of course assuming that "NEED TO CHOOSE LICENSE" is not a real license. :] Kind regards, -- Chris Lamb, Leamington Spa, UKGPG: 0x634F9A20 signature.asc Description: PGP signature
OthAuth - Login link from email?
How can you construct a link from an email that automatically logs the user in to a cake site and links to the right action? I'm sending update emails to users, and if they want to do anything with their account, I want them to be able to access the relevant page directly with one click on a link from the email. I expect you can embed the login and password into the email, but I haven't been able to figure out how. I'm using OthAuth. Anyone have any ideas? Many 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?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
Two different queries... same result.. caching does not help on this one. Well, what is the point of having all of this nice Model Class code written if I'm not going to use it? Set/Get, Associations, Finds, all sorts of Nifty tools I should like to use when needed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Showcase: inbeatstore.com using Cake.
looks good man!! well done. cheers, mikee On 24/02/07, Tazz <[EMAIL PROTECTED]> wrote: > > Who ever is interested. I completed my first site using cake. It's for > a local record store here in Montreal. > > www.inbeatstore.com > > Cake Version: 1.1.13.4450 > > Additional Components: > > - ob_Auth for login to administration panel. > - Pagination from paging through "news letters" and record releases. > - Swift mailer to sends mail orders to staff. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to instantiate a model
How is a class instance going to help you here? Why not just store the result of the find in a variable, and use that the second time? However, it is probably a moot point - both cake and mysql will cache query results, so you will probably find that second query (if run at all) will take <1ms. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: about 2 db link
Make sure each database connection has a different username and password if using MySQL. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: newbie question, populate drop down box from other parent table
Hi... sorry... I am a bit thick and I have a problem with this dropdown. It works OK, just in the dropdown it shows only the category ID and not the category name any idea? (I did exactly as cc96i post) :F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to instantiate a model
Hello, I am writing a custom auth component (cake 1.2). I am doign a find $UserModel->find(), which works fine. But I would like to create an UserModel instance with the data from that find. Or possible alter the find so that it (or some other method) creates a UserModel instance with the needed data in is also. How can I do this? Really I am just doing this to minimize DB queries. $this->User->id = $id works fine... but now I am querying for the same row in the DB twice per page load. I'd prefer to avoid that. Thanks, Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Session expiring problems...
Do you mind expanding on which framework / language allows you to have sessions automatically expire when the browser is closed? Do you just mean that the session has a very long server side timeout, and by closing the browser your own client just forgets its cookie (which really hasn't closed the session), or is there something more advanced going on? On Mar 20, 5:04 am, "Andre" <[EMAIL PROTECTED]> wrote: > In other applications I've coded before (with another framework), I > used to implement a session-expires-when-i-close-the-browser-window > kind of system, but I don't know if that can be done with CakePHP. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Group , Permission to edit table
Hi cc96ai > in this scenario, > should I create "action" for all of them in product controller, > - user_view > - salesman_view > - salesman_edit > - admin_view > - admin_edit > - admin_delete > - admin_add > > and also create 7 View page (thml) ? > > > OR there has better solution to do this ? Have a look at the Cake manual and read up on ACL. It will take a while to get your head around it, but ACL will do everything you need here (when combined with DAuth, OthAuth etc). I use it to control access to both actions/views and to data, based on users and groups. Regards, Langdon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Group , Permission to edit table
we have 3 different groups - User - Salesman - Admin In product table, - User can view the product info - Salesman can update/edit some (not all) fields - Admin can add/delete/edit in this scenario, should I create "action" for all of them in product controller, - user_view - salesman_view - salesman_edit - admin_view - admin_edit - admin_delete - admin_add and also create 7 View page (thml) ? OR there has better solution to do this ? 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?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Session expiring problems...
On 3/19/07, majna <[EMAIL PROTECTED]> wrote: > > I think tehre is a bug when session is set to database. > expired sessions remains in db. > cake 1.1.13.4450 As someone who has used sessions in a database, I don't think that necessarily means that the session is still live. A custom session handler will be using the last activity time (whatever that is in your database) as a way to determine if the session is still active. If garbage collection hasn't removed that data yet, you will have session data that is expired in there with no way to be read...if you've written the session handler properly. At least that's how I've done it in the past. Your garbage collection routine will take care of deleting any expired data. Again, that's how I've done it in the past. Hope that helps. -- Chris Hartjes My motto for 2007: "Just build it, damnit!" rallyhat.com - digital photo scavenger hunt @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Session expiring problems...
I think tehre is a bug when session is set to database. expired sessions remains in db. cake 1.1.13.4450 can one confirm this? On Mar 19, 9:08 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Mar 19, 2007, at 1:54 PM, Andre wrote: > > > > > I've made a test. I've set the security level to 'medium', and set the > > CAKE_SESSION_TIMEOUT to 1, so that the session should expire after 100 > > seconds. > > After 100 seconds $this->Session->read('User') returns nothing (I've > > tried to print its value), and, in reply to your question, nope, my > > cookies aren't there anymore. > > That works as designed... if you want the session to last longer at > this point turn up the timeout value. > > -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Session expiring problems...
On Mar 19, 2007, at 1:54 PM, Andre wrote: > > I've made a test. I've set the security level to 'medium', and set the > CAKE_SESSION_TIMEOUT to 1, so that the session should expire after 100 > seconds. > After 100 seconds $this->Session->read('User') returns nothing (I've > tried to print its value), and, in reply to your question, nope, my > cookies aren't there anymore. That works as designed... if you want the session to last longer at this point turn up the timeout value. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Session expiring problems...
I've made a test. I've set the security level to 'medium', and set the CAKE_SESSION_TIMEOUT to 1, so that the session should expire after 100 seconds. After 100 seconds $this->Session->read('User') returns nothing (I've tried to print its value), and, in reply to your question, nope, my cookies aren't there anymore. On 19 Mar, 20:16, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > Set CAKE_SESSION_SECURITY to 'med' or lower. This stops the session > ID from being regenerated after every request. I wonder if your setup > is having issues with this. Are your session cookies still intact > when you notice the session has died? > > -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Planet
http://www.google.com/coop/cse?cx=006850030468302103399%3Amqxv78bdfdo On Mar 19, 12:40 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > https://trac.cakephp.org/ticket/1795 > > Comino soon... > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de digital spaghetti > Enviado el: Lunes, 19 de Marzo de 2007 01:27 p.m. > Para: cake-php@googlegroups.com > Asunto: Re: CakePHP Planet > > That is good, but certinly all the "big" projects like Drupal or > Ubuntu have their own planet subdomain - which people now more > commonly expect. Maybe pointing planet.cakephp.org to that site would > do it rather than develop another one? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Session expiring problems...
On Mar 19, 2007, at 1:04 PM, Andre wrote: > > I was looking at the user authentication example in the manual, and > I've noticed that the CakePHP Session do have a timeout after a > certain amount of time, based on the application's security level. > > So, since I'm trying to build a blog application, this could be a > problem, because if a session expires while I'm still writing my > article, as soon as I press the submit button all of my work becomes > dust. > > Besides incrementing the number that describes how many seconds does a > session lasts (which should be the CAKE_SESSION_TIMEOUT value, > right?), are there some other ways to avoid that session expiring > problem I've mentioned before? Set CAKE_SESSION_SECURITY to 'med' or lower. This stops the session ID from being regenerated after every request. I wonder if your setup is having issues with this. Are your session cookies still intact when you notice the session has died? -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP Session expiring problems...
I was looking at the user authentication example in the manual, and I've noticed that the CakePHP Session do have a timeout after a certain amount of time, based on the application's security level. So, since I'm trying to build a blog application, this could be a problem, because if a session expires while I'm still writing my article, as soon as I press the submit button all of my work becomes dust. Besides incrementing the number that describes how many seconds does a session lasts (which should be the CAKE_SESSION_TIMEOUT value, right?), are there some other ways to avoid that session expiring problem I've mentioned before? In other applications I've coded before (with another framework), I used to implement a session-expires-when-i-close-the-browser-window kind of system, but I don't know if that can be done with CakePHP. Thanks 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?hl=en -~--~~~~--~~--~--~---
Re: A bug in View constructor ?
Eliminating direct access to the controller from the view was a concious design decision because it violates the principles of MVC separation, and we saw that it was resulting in some very bad code, i.e. people doing things they shouldn't be doing. The only reason it was allowed in the first place was to provide convenient access to session data, which is now available via SessionHelper, which is automatically loaded for all views. On Mar 19, 2:23 pm, "bernardo" <[EMAIL PROTECTED]> wrote: > This seems to be the official > word:http://groups.google.com/group/cake-php/msg/0747a1a1eda5f143 > > On Mar 19, 3:17 pm, "djiize" <[EMAIL PROTECTED]> wrote: > > > Not sure, but I read somewhere that this will not be possible anymore > > to access controller in view, cause it breaks MVC rules. > > Any expert to confirm or not? > > > On 19 mar, 18:35, "Gilles Dubois" <[EMAIL PROTECTED]> wrote: > > > > Version : CakePHP version 1.2.0.4451alpha > > > > The class constructor is waiting for an argument name $controller. The > > > class has an attribute $controller. In previous versions, I was used > > > to reach the controller from the view (eg in a .thtml file) using > > > $this->controller. It doesn't work anymore with out-of-the-box CakePHP > > > version 1.2.0.4451alpha. > > > > So I modified the View constructor to add : $this->controller = > > > $controller; as shown below (third line) : > > > > function __construct(&$controller) { > > > if(is_object($controller)) { > > > $this->controller = $controller; > > > $count = count($this->__passedVars); > > > for ($j = 0; $j < $count; $j++) { > > > $var = $this->__passedVars[$j]; > > > $this->{$var} = $controller->{$var}; > > > } > > > } > > > parent::__construct(); > > > ClassRegistry::addObject('view', $this); > > > } > > > > Is it a bug ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: newbie. add inside a view
you can add a form (with Html helper for Cake 1.1 or Form helper for Cake 1.2) in you page, just specify the correct action for adding a comment (/comments/add ?) and to display the list of comments, if you setup your models associations (Comment belongsTo Post and Post hasMany Comment), when you read a post ($post = $this->Post->read(null, $id); ), you have comments in $post['Comment'] array try a pr($post) to see Cake magic ;) On 18 mar, 20:37, "sixlaneve" <[EMAIL PROTECTED]> wrote: > sorry for this very newbie questions, but between bakery, here and > google, still I haven't got an answer. > > let's take the blog tutorial in cakephp manual as example... when I > look at one of the post, how can I add a field for adding comments, > and how to display existing comments? > > Any examples? Tutorials? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: A bug about the AppHelper class
maybe if you create an app_helper.php in /app ? class AppHelper extends Helper { } so you don't touch core files... Or finding it in a nightly build to see what's in... On 19 mar, 18:41, "Gilles Dubois" <[EMAIL PROTECTED]> wrote: > CakePHP version 1.2.0.4451alpha > > Previously I was using an older version of CakePHP, which didn't used > an intermediary AppHelper class in helpers hierarchy between > HtmlHelper and Helper. > > I found out that sometimes, using HtmlHelper resulted in an error : > Cake complained about not being able to locate class AppHelper > (although the AppHelper was defined in /cake/app_helper.php file) > > So I had to modify the HtmlHelper to have it inheriting directly from > Helper, and therefore bypassing the AppHelper. > > Have you heard about this problem ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: A question about the Email component
did you create proper layouts in /app/views/layouts/email/ ? see http://bakery.cakephp.org/articles/view/203 for more info On 19 mar, 18:44, "Gilles Dubois" <[EMAIL PROTECTED]> wrote: > CakePHP version 1.2.0.4451alpha > > When calling the ->send() method on a EmailComponent object, CakePHP > try to used a unnamed layout. This generate an error. Here's a sample > code from me showing my use of this component : > > $this->Email->to = $aTask['Owner']['email']; > $this->Email->from = $this->Session->read('Uzer.email'); > $this->Email->cc[] = $this->Session->read('Uzer.email'); > $this->Email->subject = 'something'; > $this->Email->body = 'something'; > $this->Email->send(); > > Is it due to a mistake I made or to a bug ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: A bug in View constructor ?
This seems to be the official word: http://groups.google.com/group/cake-php/msg/0747a1a1eda5f143 On Mar 19, 3:17 pm, "djiize" <[EMAIL PROTECTED]> wrote: > Not sure, but I read somewhere that this will not be possible anymore > to access controller in view, cause it breaks MVC rules. > Any expert to confirm or not? > > On 19 mar, 18:35, "Gilles Dubois" <[EMAIL PROTECTED]> wrote: > > > Version : CakePHP version 1.2.0.4451alpha > > > The class constructor is waiting for an argument name $controller. The > > class has an attribute $controller. In previous versions, I was used > > to reach the controller from the view (eg in a .thtml file) using > > $this->controller. It doesn't work anymore with out-of-the-box CakePHP > > version 1.2.0.4451alpha. > > > So I modified the View constructor to add : $this->controller = > > $controller; as shown below (third line) : > > > function __construct(&$controller) { > > if(is_object($controller)) { > > $this->controller = $controller; > > $count = count($this->__passedVars); > > for ($j = 0; $j < $count; $j++) { > > $var = $this->__passedVars[$j]; > > $this->{$var} = $controller->{$var}; > > } > > } > > parent::__construct(); > > ClassRegistry::addObject('view', $this); > > } > > > Is it a bug ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: afterFind model problem
when you access to view, you have only one Employee in your array, so you cannot parse it the same way to determine which way, you can test isset($val['Employee']) On 19 mar, 17:14, "stevenoone" <[EMAIL PROTECTED]> wrote: > *bump* > > 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?hl=en -~--~~~~--~~--~--~---
Re: A bug in View constructor ?
Not sure, but I read somewhere that this will not be possible anymore to access controller in view, cause it breaks MVC rules. Any expert to confirm or not? On 19 mar, 18:35, "Gilles Dubois" <[EMAIL PROTECTED]> wrote: > Version : CakePHP version 1.2.0.4451alpha > > The class constructor is waiting for an argument name $controller. The > class has an attribute $controller. In previous versions, I was used > to reach the controller from the view (eg in a .thtml file) using > $this->controller. It doesn't work anymore with out-of-the-box CakePHP > version 1.2.0.4451alpha. > > So I modified the View constructor to add : $this->controller = > $controller; as shown below (third line) : > > function __construct(&$controller) { > if(is_object($controller)) { > $this->controller = $controller; > $count = count($this->__passedVars); > for ($j = 0; $j < $count; $j++) { > $var = $this->__passedVars[$j]; > $this->{$var} = $controller->{$var}; > } > } > parent::__construct(); > ClassRegistry::addObject('view', $this); > } > > Is it a bug ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
A question about the Email component
CakePHP version 1.2.0.4451alpha When calling the ->send() method on a EmailComponent object, CakePHP try to used a unnamed layout. This generate an error. Here's a sample code from me showing my use of this component : $this->Email->to = $aTask['Owner']['email']; $this->Email->from = $this->Session->read('Uzer.email'); $this->Email->cc[] = $this->Session->read('Uzer.email'); $this->Email->subject = 'something'; $this->Email->body = 'something'; $this->Email->send(); Is it due to a mistake I made or to a bug ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
A bug about the AppHelper class
CakePHP version 1.2.0.4451alpha Previously I was using an older version of CakePHP, which didn't used an intermediary AppHelper class in helpers hierarchy between HtmlHelper and Helper. I found out that sometimes, using HtmlHelper resulted in an error : Cake complained about not being able to locate class AppHelper (although the AppHelper was defined in /cake/app_helper.php file) So I had to modify the HtmlHelper to have it inheriting directly from Helper, and therefore bypassing the AppHelper. Have you heard about this problem ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with the value() function in dbo_oracle.php
Version : CakePHP version 1.2.0.4451alpha The value() function in the driver doesn't handle integer and null values. I modified it to this : function value($data, $column_type = null) { // this can also be accomplished through an Oracle NLS parameter if ($data == null) { return "NULL"; } switch ($column_type) { case 'date': $date = date('Y-m-d H:i:s', strtotime($data)); return "TO_DATE('$date', '-MM-DD HH24:MI:SS')"; case 'integer': return $data; default: $data2 = str_replace("'", "''", $data); return "'".$data2."'"; } } This way, it worked well ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
A bug in View constructor ?
Version : CakePHP version 1.2.0.4451alpha The class constructor is waiting for an argument name $controller. The class has an attribute $controller. In previous versions, I was used to reach the controller from the view (eg in a .thtml file) using $this->controller. It doesn't work anymore with out-of-the-box CakePHP version 1.2.0.4451alpha. So I modified the View constructor to add : $this->controller = $controller; as shown below (third line) : function __construct(&$controller) { if(is_object($controller)) { $this->controller = $controller; $count = count($this->__passedVars); for ($j = 0; $j < $count; $j++) { $var = $this->__passedVars[$j]; $this->{$var} = $controller->{$var}; } } parent::__construct(); ClassRegistry::addObject('view', $this); } Is it a bug ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Suggestions on user authentication?
Hello all. I've been looking for a way to authenticate users and there seem to be three popular chunks of code available - dAuth, obAuth and othAuth. Any opinions on the pros and cons for these? I'm using CakePHP 1.1 and I don't want to setup something that will be incompatible with CakePHP 1.2. I've been trying to wrap my head around dAuth, so I know that, if I choose to implement it, that I would have to make several modifications to certain parts of the code. For example, I plan on having a user register (with a bit more info than the current code requires), and send an email with a key to confirm a registrants email address. Once confirmed, they can complete registration (more fields) and then will be directed to login. Michael Tuzi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Introducing myself
"gwoo" <[EMAIL PROTECTED]> wrote: > I can assure you that if no one was moderating this group it would be > much uglier. Thank you for your efforts here. -- Chris Lamb, Leamington Spa, UKGPG: 0x634F9A20 signature.asc Description: PGP signature
RE: CakePHP Planet
https://trac.cakephp.org/ticket/1795 Comino soon... -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de digital spaghetti Enviado el: Lunes, 19 de Marzo de 2007 01:27 p.m. Para: cake-php@googlegroups.com Asunto: Re: CakePHP Planet That is good, but certinly all the "big" projects like Drupal or Ubuntu have their own planet subdomain - which people now more commonly expect. Maybe pointing planet.cakephp.org to that site would do it rather than develop another one? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Planet
That is good, but certinly all the "big" projects like Drupal or Ubuntu have their own planet subdomain - which people now more commonly expect. Maybe pointing planet.cakephp.org to that site would do it rather than develop another one? Tane On 3/19/07, djiize <[EMAIL PROTECTED]> wrote: > > I think that: > http://thinkingphp.org/cakenews/ > Thanks Felix ;) > > On 19 mar, 10:05, "Javier Ramirez Molina" <[EMAIL PROTECTED]> wrote: > > Hello, I don't know if this topic has been already discussed but I > > think it could be a great idea to create a "CakePHP Planet". > > > > As you can read from wikipedia[1]: "A planet is a web site that > > aggregates posts from a set of related blogs. Such sites are commonly > > associated with free and open-source software projects, where they are > > used to collect posts from the various developers involved in the > > project." > > > > What do you think? > > > > [1]http://en.wikipedia.org/wiki/Planet_%28blog%29 > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: afterFind model problem
*bump* 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?hl=en -~--~~~~--~~--~--~---
Re: cake with no db - forgotten how
If you are in need of validation, however, you can still set up the controllers and models and set the model class variable: var $useTable = false; This allows you to use the built-in Cake validation scheme on your data, but not use a database. On Mar 19, 7:44 am, "TWIOF" <[EMAIL PROTECTED]> wrote: > Hi, > > I remember setting up cake with no db recently (to use cakes > validation and various other helpfull bits) but have forgotten how I > did it. I had a search of the group and didn't find much. > > Any pointers would be much apreciated > > Thanks > > TWIOF --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: is acl.php not working?
Yeah, I ended up having to download 1.1 and run the script off that version, and then just use 1.2 for my site. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: R: Menu from database
Just a 'second thanks' as LSL said. I was looking for this same solution (seems others are too, in other threads) - and this seems to be the best solution/placement to get the desired effect. Seems simple now that I look at it. On Mar 19, 3:30 am, "GMail" <[EMAIL PROTECTED]> wrote: > I made a little test and I have put: > > pr($this->uses); > exit(); > > in cake/libs/controller/controller.php __construct() function, before it > exiting. > What I discovered was that if you set $uses to null or an empty array() in > your controller > it overrides the declaration in app_controller, dunno if it's a bug or a > features, but > I suggest to use this snippets, to dinamically load data from menu table, > that for me is preferred > method, or better you can write a component and a helper but this is another > story ;). > > class AppController extends Controller { >// var $uses=array('MenuItem'); // There is no more need for this > >function beforeFilter() { > parent::beforeFilter(); > loadModel("MenuItem"); > $menuItem = new MenuItem; > $this->set('menuElement', $MenuItem->findAll()); >} > > } > > I have not tested this, it's based on my little knowledge. > If there is somethingh wrong let me know. > cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Introducing myself
yes there are a couple of us that spend too many hours in the day moderating messages and approving new members. I have to say thise one gave me trouble, so I figured I would allow it through. It has a hint of spam, but then again everyone should know that this guys spams so no one goes to him for help. In any case, I can assure you that if no one was moderating this group it would be much uglier. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Introducing myself
Mariano, You can't imagine how many times I feel like this: "The silent and unheard scream of a fed up individual" I understand you had to do it... ;-) Is anyone cleaning the group from messages like this (or, I might add, from any messages that don't fit here, such as messages on native languages) ? Cheers! On Mar 19, 12:51 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > I know, I just can't seem to avoid doing so. > > "The silent and unheard scream of a fed up individual" > > -MI > > --- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -Mensaje original- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de Dr. Tarique Sani > Enviado el: Lunes, 19 de Marzo de 2007 09:25 a.m. > Para: cake-php@googlegroups.com > Asunto: Re: Introducing myself > > And most likely automated - reply to which would never be read! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake with no db - forgotten how
On Mar 19, 2007, at 8:51 AM, TWIOF wrote: > So no need to alter the database.php? Nope - just use PagesController for content delivery and you should be fine. > Even simpler than i thought! :o) -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake with no db - forgotten how
So no need to alter the database.php? Even simpler than i thought! 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?hl=en -~--~~~~--~~--~--~---
Re: cake with no db - forgotten how
On Mar 19, 2007, at 8:44 AM, TWIOF wrote: > > Hi, > > I remember setting up cake with no db recently (to use cakes > validation and various other helpfull bits) but have forgotten how I > did it. I had a search of the group and didn't find much. Just use the core PagesController by putting your views in /app/views/ pages. If you need your own controller for some reason, set $uses = null so that Cake knows you're not going to use any models. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
cake with no db - forgotten how
Hi, I remember setting up cake with no db recently (to use cakes validation and various other helpfull bits) but have forgotten how I did it. I had a search of the group and didn't find much. Any pointers would be much apreciated Thanks TWIOF --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
$this->set with email component don't working with php4 (1.2)
Hello, $this->set not working with email component in php 4. The same code is working in php 5. If I use $this->set('code', $id); I get an error message (with DEBUG,1) the $code not defined. -- Ámon Tamás http://linkfelho.amon.hu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: undefined stdClass::read() but model is included
Is Member extending from AppModel? -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Mattijs Enviado el: Lunes, 19 de Marzo de 2007 11:03 a.m. Para: Cake PHP Asunto: undefined stdClass::read() but model is included Fatal error: Call to undefined method stdClass::read() in app_controller.php on line 13 (which is a call to Member->read()). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: undefined stdClass::read() but model is included
I have solved a part: a view was named wrong which caused the error. However: why wont cake display "view not found" instead of this inappropriate error? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
undefined stdClass::read() but model is included
The situation is as follows: AppController has a function isLogged which is using the 'Member' model. AppController->uses = array('Member'); ContentController has a function index() which when called just shows the frontpage: no problems ContentController has a function page() which should display a page based on the url however I get the error ContentController->uses = array('Member','Page'); Fatal error: Call to undefined method stdClass::read() in app_controller.php on line 13 (which is a call to Member->read()). What could be going wrong? When outputting $this there is a Lid Object described so I can't believe that the model hasn't been loaded (also since ContentController index() gives no problems). What can I do to fix/find out more about this problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: R: Menu from database
Thanks a lot. It seems that Ganzino's solution is perfect and transparent. Now I can try to rewrite the rest of our web into CakePHP. Thanks again for this SW. Lukas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Introducing myself
I know, I just can't seem to avoid doing so. "The silent and unheard scream of a fed up individual" -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Dr. Tarique Sani Enviado el: Lunes, 19 de Marzo de 2007 09:25 a.m. Para: cake-php@googlegroups.com Asunto: Re: Introducing myself And most likely automated - reply to which would never be read! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Introducing myself
On 3/19/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > > I don't care if you are the CEO of IBM. > > THIS IS FREAKING SPAM! > And most likely automated - reply to which would never be read! Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: created-filed in db-table
Oh I please do not get me wrong! I really love the concept of cake and the restrictions it has because it really made me a better and tidier programmer since I use it. But sometimes - and really only sometimes - it lacks of fallback options. Like in this case. As far as I understand the code it checks the datatype of the field but it provides no fallback solution if it is not datetime. Why? But as I use the alpha-release I do not know if it will be changed in the final. And because it is free to use I really feel bad when I start nagging without providing a solution... Thanks for your tips. They seem to work and helped me out. I hope I can pay it back some time :-). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Thank You for CakePHP
And what about the guys at google group? Let us feel the love ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de digital spaghetti Enviado el: Lunes, 19 de Marzo de 2007 05:39 a.m. Para: cake-php@googlegroups.com Asunto: Re: Thank You for CakePHP Plus the guys in IRC are friendly and helpful, which is great for a community like this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Introducing myself
I don't care if you are the CEO of IBM. THIS IS FREAKING SPAM! -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de jfricci Enviado el: Lunes, 19 de Marzo de 2007 03:02 a.m. Para: Cake PHP Asunto: Introducing myself I am new to this group and would like to introduce myself. I am the President of US AngelInvestors,an angel investor group in Silicon Valley,and also founder of Bay Area Startup Network a networking group in the Bay Area. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: saving sensitive data with md5
Good point, I was assuming you would notice and unset() password on an edit (since the only way a user can edit it is by providing the unencrypted form.) Yours is a good solution *except* when the user enters a 32 character length password consisting of only 0-9, A-F or a-f characters ;) I know, what are the chances, but... Anyhow you could also add a validation (ON the controller side so you can still save a hashed password ;) to avoid user filling in a password with specific md5 rules. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Daniel.S Enviado el: Lunes, 19 de Marzo de 2007 01:49 a.m. Para: Cake PHP Asunto: Re: saving sensitive data with md5 Will that re-hash the MD5'ed password field when editing and then saving 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?hl=en -~--~~~~--~~--~--~---
Re: created-filed in db-table
hm... I wrote a pretty long answer but somehow it was not posted?!?! damn. ok, again but a little bit shorter. I have to use the unix timestamp because it is obligatory in our company. Using datetime simply would lead to not getting my app approved. Changing the name is the way I use now. But I do it using a hole in the rules here. There is some silent agreement to call fields with the creation date "created" but it is not obligatory. It leads to more work as I have to change all of the views to guarantee uniformity for the user. I simply do not understand why an essential field/-name like "created" is restricted so much?! I would open a ticket but I think it is a feature not a bug. Furthermore I cannot supply a solution as I seem to be too stupid - I simply do not know how I should change it. Maybe I can work it out later. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: created-filed in db-table
> I worked around the problem by changing the name but in my opinion > this is not how it should work. Ok, so you are only concerned about the data type. As I suggested you could get around this issue using callbacks: beforeSave() to change the Unix timestamp to a Cake friendly date/time on save, and back again with afterFind() when retrieving. The problem here isn't so much inflexibility (in my opinion) as a trade off. Cake could be made infinitely flexible, but it would then defeat the basic idea of the framework (i.e. rapid development). As it stands, your problem can likely be solved with a minimum of fuss by Cake's existing features. Regards, Langdon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: created-filed in db-table
I worked around the problem by changing the name but in my opinion this is not how it should work. Currently I am developing a system for project management in cake and we need the unix timestamp for interchanging purposes. It is the format which is understood by all of our (non-cake-)systems without conversation. So it is the most secure and the most simple solution and therefore obligatory at our company. So I cannot/should not change the datatype. This leaves only the option of changing name. But: "created" is some kind of unwritten rule for naming a field with the timestamp of the creation time in it. Of course I can name the field "registered" in the user-table, "added" in the products-table and so on but "created" would be the name one would normally choose. Furthermore I have to change the views in most of the cases because e.g. the xml-export has to have it called "created" - again for interchanging purposes. I do not know if I should open a ticket for this because I think it is a feature not a bug but when it comes to integrate cake in large environments this is an obstacle that is not necessary in my opinion. The simpliest would be to check the datatype in the db and it is is not datetime it is treated like any normal field is. I tried to do it myself but maybe I am simply too stupid and could not find a way to achiev it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: created-filed in db-table
Hi sunertl I don't use 1.2 yet, but in I expect that it is the same as 1.x the field 'created' (and the field 'modified') are special fields in Cake. It will automatically update these fields for you when you create and save models. They do require the data type of date/time to work and will cause problems if they are changed to say integer. I am unsure why you can't just choose another name for your field (if it has to contain different data). Or do you just want to store your created time in milliseconds? If so, why not use the afterFind() callback to convert the date/time into milliseconds, or something similar? If you provide a bit more info about what you are trying to achieve then I am sure that someone will have a solution for you. Regards, Langdon > I use the (amazing) 1.2 alpha-release for a few days now and have > problems with fields named "created" in db-tables. For some reasons I > do not use datetime but integer for "created". Cake seems to have > problems with that because I always get errors in line 1052 in cake/ > model/model.php. > I tried to figure it out myself but because I use this at work I could > not search for a very long time. As far as I can see the only problem > is the datatype because it is not datetime. Am I not free to choose > the datatype when I call the field "created"? That would be some very > hard restriction... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
created-filed in db-table
I use the (amazing) 1.2 alpha-release for a few days now and have problems with fields named "created" in db-tables. For some reasons I do not use datetime but integer for "created". Cake seems to have problems with that because I always get errors in line 1052 in cake/ model/model.php. I tried to figure it out myself but because I use this at work I could not search for a very long time. As far as I can see the only problem is the datatype because it is not datetime. Am I not free to choose the datatype when I call the field "created"? That would be some very hard restriction... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to identify the base path of a Cake installation?
look at the constants defined in cake/config/paths.php Peg a écrit : > Hi all, i'm quite new to Cake but I'm enjoiing it so much. > > I start writing a jQuery helper to include jQuery itself, packaged > plugins and named script like controller dependent, action, ecc. > > I'm trying to identify on the fly cake's intallation path to use it > into import rules. Let me say this information will be much important > for other applications... > > Examples: > // Local installation: > http://localhost/cms/controller/action > where "cms" it's cake's intallation. > > I neet to obtain: > var1 = /cms/ > var2 = http://localhost/cms/ > > > // Online test: > http://www.mysite.it/test/cms/controller/action > where "cms" it's cake's intallation. > > I neet to obtain: > var1 = /test/cms/ > var2 = http://localhost/test/cms/ > > > > // Online production: > http://www.mysite.it/controller/action > where root it's cake's intallation. > > I neet to obtain: > var1 = / > var2 = http://localhost/ > > > 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?hl=en -~--~~~~--~~--~--~---
Re: about 2 db link
search in the group, there were 1 or 2 series on that last week On 19 mar, 09:01, "Nosy!" <[EMAIL PROTECTED]> wrote: > i use 2 db link,but after the second link ,the first link will down. > only the second link is ok for the app. how to make the first link to > be ok? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: newbie question, populate drop down box from other parent table
from API: http://api.cakephp.org/class_model.html#e8844b859626edc554946480046e395f if you try to add a $conditions parameter, do it with an array: $conditions = array( 'active' => 1, 'created' => '>= 2007-03-15 00:00:00', ); On 19 mar, 02:01, "cc96ai" <[EMAIL PROTECTED]> wrote: > yes , i set it up already, > > in controller i added this variable > $this->set('groupArray', $this->User->Group->generateList()); > > and the view > > echo $html->selectTag( > 'User/group_id', > $groupArray, > null, > array(), > array(), > true >); > ?> > > now works fine. > > one other question is > $this->set('groupArray', $this->User->Group->generateList()); > I try to put parameter into generateList() , which is not working > any idea ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Planet
Thats perfect!!! I didn't know it. Thanks again. 2007/3/19, djiize <[EMAIL PROTECTED]>: > > I think that: > http://thinkingphp.org/cakenews/ > Thanks Felix ;) > > On 19 mar, 10:05, "Javier Ramirez Molina" <[EMAIL PROTECTED]> wrote: > > Hello, I don't know if this topic has been already discussed but I > > think it could be a great idea to create a "CakePHP Planet". > > > > As you can read from wikipedia[1]: "A planet is a web site that > > aggregates posts from a set of related blogs. Such sites are commonly > > associated with free and open-source software projects, where they are > > used to collect posts from the various developers involved in the > > project." > > > > What do you think? > > > > [1]http://en.wikipedia.org/wiki/Planet_%28blog%29 > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Planet
I think that: http://thinkingphp.org/cakenews/ Thanks Felix ;) On 19 mar, 10:05, "Javier Ramirez Molina" <[EMAIL PROTECTED]> wrote: > Hello, I don't know if this topic has been already discussed but I > think it could be a great idea to create a "CakePHP Planet". > > As you can read from wikipedia[1]: "A planet is a web site that > aggregates posts from a set of related blogs. Such sites are commonly > associated with free and open-source software projects, where they are > used to collect posts from the various developers involved in the > project." > > What do you think? > > [1]http://en.wikipedia.org/wiki/Planet_%28blog%29 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
about 2 db link
i use 2 db link,but after the second link ,the first link will down. only the second link is ok for the app. how to make the first link to be ok? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to identify the base path of a Cake installation?
Hi all, i'm quite new to Cake but I'm enjoiing it so much. I start writing a jQuery helper to include jQuery itself, packaged plugins and named script like controller dependent, action, ecc. I'm trying to identify on the fly cake's intallation path to use it into import rules. Let me say this information will be much important for other applications... Examples: // Local installation: http://localhost/cms/controller/action where "cms" it's cake's intallation. I neet to obtain: var1 = /cms/ var2 = http://localhost/cms/ // Online test: http://www.mysite.it/test/cms/controller/action where "cms" it's cake's intallation. I neet to obtain: var1 = /test/cms/ var2 = http://localhost/test/cms/ // Online production: http://www.mysite.it/controller/action where root it's cake's intallation. I neet to obtain: var1 = / var2 = http://localhost/ 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?hl=en -~--~~~~--~~--~--~---
Re: Many Controllers - one view
Thankis jitka, "$this->viewPath" was what I have been searching for and couldn't find. I guess my hack with viewRender() is obsolete now that I know of that one. On Mar 16, 10:55 pm, "jitka" <[EMAIL PROTECTED]> wrote: > in any controller's method: > > $this->viewPath = 'common'; > $this->render('some_view'); > //will force cake to look for view some_view.thtml in directory app/ > views/common. > > $this->viewPath = 'common'; > $this->action = 'some_view'; > //same as above but without manuall call of render() > > Is that what You want? If not then maybe API is Your friend, > especially arguments of method Controller::render()... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Associative arrays in this->data
Hi all. In my app i need to pass an associative array of data to my model, kinda like: [Model] => array ([someKey] => 'some value', ... [someOtherKey] => array([subKey1] => 'sub key 1 value', [subKey2] => 'sub key 2 value', [subKey3] => 'sub key 4 value')) I'm passing the data from the form in a flat format and then doing some mangling to put it in the proper format. Does cake provide a nicer/cleaner way of doing this? I was thinking something like 'Model/someOtherKey/subkey1' in the form field specification. Thanks in advance. Best regards. -- Gonçalo Marrafa <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP Planet
Hello, I don't know if this topic has been already discussed but I think it could be a great idea to create a "CakePHP Planet". As you can read from wikipedia[1]: "A planet is a web site that aggregates posts from a set of related blogs. Such sites are commonly associated with free and open-source software projects, where they are used to collect posts from the various developers involved in the project." What do you think? [1] http://en.wikipedia.org/wiki/Planet_%28blog%29 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: saving sensitive data with md5
On Mar 19, 5:48 am, "Daniel.S" <[EMAIL PROTECTED]> wrote: > Will that re-hash the MD5'ed password field when editing and then > saving again? > yes, beforeSave catches that --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Thank You for CakePHP
Definetly, I've been learning with CakePHP to just try things and see if they work (using the MVC principal) and been surprised to find that sometimes to do, with simplicity. I also have learned to just drive right into the code if I am looking for something - the details are all there how to use it and the API docs are very handy. Plus the guys in IRC are friendly and helpful, which is great for a community like this. On 3/18/07, junal <[EMAIL PROTECTED]> wrote: > > yes! Thank you all CakePHP developers. > > On Mar 18, 9:34 pm, "tracyfloyd" <[EMAIL PROTECTED]> wrote: > > Ditto. > > The Cake team is creating some amazing software here. > > > > On Mar 18, 9:49 am, "gerbenzomp" <[EMAIL PROTECTED]> wrote: > > > > > There's so much love put into the development of Cake, that anyone who > > > uses it, cannot but love it! Thanks so much, Cake has been an eye- > > > opener and is such a pleasure to work with! > > > > > Gerben. > > > > > On 18 mrt, 04:45, "phirschybar" <[EMAIL PROTECTED]> wrote: > > > > > > true that. > > > > > > On Mar 17, 2:38 pm, "yolabingo" <[EMAIL PROTECTED]> wrote: > > > > > > > Ditto all above. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---