Re: CakePHP Helper

2010-06-13 Thread nurvzy
Hi Marc, First I'd like to thank you for taking the time to submit your article. I've seen and posted feedback on your original article. I see you've posted the same article again. I respectfully ask that in the future you do not post duplicate articles in the bakery, as all it does is cause

Cake 2.0 Roadmap - must it be all at once?

2010-06-13 Thread keymaster
Please don't throw eggs, but.. ...after looking over the 2.0 roadmap, I am wondering about the relative benefit of major shock and awe releases vs. the continuation of the successful 1.x pattern of smaller, but still significant, incremental releases (where applicable). I am a tad concerned the

Pagination: Sort by count of related model (e.g. User - Posts)

2010-06-13 Thread DigitalDude
Hey, I have a problem here and need to fix it. It's about the following situation: I have a model User that has a relation to some entrie, let's say Posts. I want to paginate the User-Model and add a counting of the user's posts to my index of Users. So I will have the following table- structure

Re: CakePHP Helper

2010-06-13 Thread euromark
maybe its helpful to automatically send emails witht the current status after giving feedback etc so that the author is informed about it On 13 Jun., 08:44, nurvzy nur...@gmail.com wrote: Hi Marc,  First I'd like to thank you for taking the time to submit your article.   I've seen and posted

Re: Pagination: Sort by count of related model (e.g. User - Posts)

2010-06-13 Thread calvin
Ideally, you should be able to create post_count as a virtualField and then sort by that, by as the cookbook states, the paginator can't order by virtualFields of associated models, so you wouldn't be able to sort by it. But there are two simple workarounds for this:

Hi to all

2010-06-13 Thread Developer
I am a new member of this group , i am a PHP developer and want to learn CakePHP , plz help if any body have data or material for a Beginers. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because

Re: Pagination: Sort by count of related model (e.g. User - Posts)

2010-06-13 Thread John Andersen
Would using the belongsTo models counterCache not be a better solution, so that it will not be necessary to perform the counting every time the users are listed with the post count? Mentioned in the CakePHP book at: http://book.cakephp.org/view/1042/belongsTo Enjoy, John On Jun 13, 3:42 pm,

Re: 3 models and search condition

2010-06-13 Thread viciat
Solution After reading this: http://bakery.cakephp.org/articles/view/get-the-find-query-sql-rather-than-query-result First get the id's of the locations from the offers corresponding to a certain category $this-Offer-recursive = 0;

Re: 3 models and search condition

2010-06-13 Thread John Andersen
Ok, if you accept using two finds, then you can do it with CakePHP find types. [code] $offer_locations = $this-Offer-find( 'list', array( 'fields' = array( 'id', 'location_id' ), 'conditions' = array( 'Offer.category_id' = $id ) ) );

Re: Hi to all

2010-06-13 Thread Flavia Missi
Hi! I'm new at cake too, but maybe I can help you ;) I'm following this tutorial at ibm's site, it's a little old, but is helping me so much: http://www.ibm.com/developerworks/views/opensource/libraryview.jsp?search_by=cook+web+sites+CakePHP

Re: Cake 2.0 Roadmap - must it be all at once?

2010-06-13 Thread calvin
Which roadmap are you referring to? The one I'm looking at (http:// cakephp.lighthouseapp.com/projects/42648/2-0-development-roadmap) doesn't mention anything about PHP5 hacks, only removing PHP4 hacks, which is pretty reasonable since people have had nearly 6 years to upgrade to PHP5, and the PHP

RE: Hi to all

2010-06-13 Thread Meroe Kush
Thanks for the links. I'm new as well that they should help. From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Flavia Missi Sent: Sunday, June 13, 2010 11:06 AM To: cake-php@googlegroups.com Subject: Re: Hi to all Hi! I'm new at cake too, but maybe I can

Re: Set format for DATETIME in model

2010-06-13 Thread Jonas
I am on a cake v1.2 system so I don't think I have access to virtualFields...guess I have to get the [0] index and then use a helper to format the data... On Jun 11, 6:46 pm, calvin cal...@rottenrecords.com wrote: You're going to have to use the virtualFields model property. Otherwise, it will

Re: Cake 2.0 Roadmap - must it be all at once?

2010-06-13 Thread keymaster
Which roadmap are you referring to? ... doesn't mention anything about PHP5 hacks, only removing PHP4 hacks, I meant PHP4 hacks. It was a typo, sorry. incremental upgrades defeats the purpose of a major version number change. If it is possible to decouple some of the new development items

Re: Hi to all

2010-06-13 Thread hugom
The best way to learn CakePHP is to try making a project with it. And here you will find alot of information about it: http://book.cakephp.org/view/876/The-Manual Regards! On 13 jun, 07:19, Developer cute.princess0...@gmail.com wrote: I am a  new member of this group , i am a PHP developer and

Re: Hi to all

2010-06-13 Thread cricket
On Jun 13, 2:08 pm, hugom ham1...@gmail.com wrote: The best way to learn CakePHP is to try making a project with it. And here you will find alot of information about it:http://book.cakephp.org/view/876/The-Manual An excellent suggestion. The manual, despite its warts, does contain a lot of

Re: find list, filtered

2010-06-13 Thread cricket
On Jun 12, 8:49 pm, calvin cal...@rottenrecords.com wrote: Ah, I misunderstood you. I think you should be able to just use the 'join' and 'group' keys, e.g.: $countries = $this-Country-find('list', array(   'joins' = array(     array(       'table' = 'cake_members',       'alias' =

should I know php in order to learn cakePHP

2010-06-13 Thread Jahongir Abdurahmonov
I wonder if one should know PHP in order to learn and use CakePHP? Should I first learn PHP and then CakePHP? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google

Re: CakePHP Helper

2010-06-13 Thread nurvzy
Indeed, you can set your account to send emails on any article update. He has read it once because he set the author pm comment to unpublished a few days after the feedback was posted. Nick On Jun 13, 6:23 am, euromark dereurom...@googlemail.com wrote: maybe its helpful to automatically send

Re: should I know php in order to learn cakePHP

2010-06-13 Thread Chris Hanson
ye i would probably learn the basics and do some playing around with PHP before jumping into a frameworkbut thats just my opinion. :D welcome to CakePHP :D On 13 June 2010 20:04, Jahongir Abdurahmonov abdurahmo...@gmail.com wrote: I wonder if one should know PHP in order to learn and use

HABTM product-category relationship for multilevel category tree

2010-06-13 Thread madcousinphil_
Hi eveyone. This is for a shop. The problem is retrieving the products for a given category. Categories can have many products and products can belong to many categories. Categories are stored in a tree structure, with parent_id, lft and rght fields. I have a table called categories_products

admin routing.prefix

2010-06-13 Thread Davor Ilic
Hi caker, i try to use the Prefix Route from cake to say which of my root the admin is but i have some issue to get to the right site because i do not wanna for the user to say them the hole root where they have to go like this /admin/users/login i just wanna say add in the after .com/ admin.

Re: admin routing.prefix

2010-06-13 Thread Davor Ilic
i´ve forgot to say i´ve try this but i only get this issue to ad an method with : admin_admin_login() and if i comment Configure::write('Routing.prefixes', array('admin')); it works but when it try to login it gives me back the login site again i do not know what i am doing wrong...

Re: admin routing.prefix

2010-06-13 Thread Davor Ilic
with this i mean this link: http://groups.google.com/group/cake-php/browse_thread/thread/4a445f48dbc2f726 2010/6/14 Davor Ilic webfa...@gmail.com i´ve forgot to say i´ve try this but i only get this issue to ad an method with : admin_admin_login() and if i comment

test cases with private vars/methods

2010-06-13 Thread euromark
some of my classes are already php5 like with private variables and methods if i would like to test them via simple test cases how could i do that. usually you cant just echo the content of the var or the return value of this private method (if would throw an error) private $someVar; private

Re: should I know php in order to learn cakePHP

2010-06-13 Thread Tomasz Brymora
If you plan on sticking with Cake (or any other framework for that matter) you won't be able to help but pick up on php. You can pick up on both at the same time and cake will make a lot more sense then as well. It will make life a lot easier. On 06/13/2010 05:46 PM, Chris Hanson wrote: ye i

Re: admin routing.prefix

2010-06-13 Thread Andy Dirnberger
Sounds like you have private function admin_login() in UsersController. Try public function admin_login() instead. On Jun 13, 7:05 pm, Davor Ilic webfa...@gmail.com wrote: with this i mean this link:http://groups.google.com/group/cake-php/browse_thread/thread/4a445f48... 2010/6/14 Davor Ilic

Remove cakephp references from cookies

2010-06-13 Thread sherzo
Hi all I wonder to know if any of you knows how to remove the cakephp references from cookies name?? the name is cakeCookie[cookiename] at the moment!!! Thanks Sherry -- View this message in context: http://old.nabble.com/Remove-cakephp-references-from-cookies-tp28874781p28874781.html Sent

Validation - Multiple attempts

2010-06-13 Thread Ed Propsner
I notice that when I submit a form to a url such as http://mysite.com/controller/action/25 If validation fails on the first attempt the form reloads under the exact same url and retains all of $this-data but if the validation fails on subsequent attempts the form reloads but the record id gets

editing *.po files - internationalization

2010-06-13 Thread huoxito
I've been trying to translate the commom messages and words inside cakephp core to portuguese using the internationalization feature... i generated the default.pot file, put it in the right directory /app/ locale/por/LC_MESSAGES/default.po and then start translating the messages, with Poedit,

Re: Remove cakephp references from cookies

2010-06-13 Thread Ed Propsner
I haven't toyed with the cookies yet but it looks like they can be configured in app/config/core.php Configure::write('Session.cookie', 'CakePHP'); HTH - Ed On Sun, Jun 13, 2010 at 7:50 PM, sherzo shahrzad.azimi...@gmail.com wrote: Hi all I wonder to know if any of you knows how to remove

Re: should I know php in order to learn cakePHP

2010-06-13 Thread huoxito
I've been working with PHP for about 6 months and only recently started studying cakephp. It's been interesting but not even close to easy for me. Maybe because PHP is my first experience with programming languages and i had no experience with OOP before start taking cakephp. On 13 jun, 20:16,

cakePHP emai component

2010-06-13 Thread Dmitry Shevchenko
I have tried to import email component in my model, and seems all is ok, except I CAN'T send data to template, but sender addr, subject and other looks ok. I do this like: App::import('Component', 'Email'); $this-Email = new EmailComponent(); $this-Email-to =

Re: admin routing.prefix

2010-06-13 Thread Davor Ilic
i thought it too but i didn´t use private function and i try this but it gives the same issue back 2010/6/14 Andy Dirnberger andy.dirnber...@gmail.com Sounds like you have private function admin_login() in UsersController. Try public function admin_login() instead. On Jun 13, 7:05 pm, Davor

Re: Updating is creating new record

2010-06-13 Thread Sergei
Try this $user['User']['id']=... $user['User']['field']=... $user['User']['anotherfield']=... $this-save($user); also there is updateAll() function. On Jun 13, 5:05 am, WhyNotSmile sharongilmor...@gmail.com wrote: Thanks John, but saveField isn't doing the job either. Sharon On 12 June,

Re: cakePHP emai component

2010-06-13 Thread Sergei
Because $this-set in model != $this-set in controller. You should set() varibales for template from controller. set() from model sets data for DB. Use it from controller. On Jun 14, 10:00 am, Dmitry Shevchenko dmitr...@gmail.com wrote: I have tried to import email component in my model, and

Re: test cases with private vars/methods

2010-06-13 Thread nurvzy
You convert private to protected and then create a test class extend the model/controller you want to test, letting your extended model call parent::method and return its value. HTH, Nick On Jun 13, 5:15 pm, euromark dereurom...@googlemail.com wrote: some of my classes are already php5 like

Re: admin routing.prefix

2010-06-13 Thread Sam
You should specify the route without the prefix in the action name.. the routing prefix is passed as a separate parameter. Try: *Router::connect('/admin', array('controller' = 'users', 'action' = 'login', 'admin' = true)); However, do you really want /admin to point to the login page even if

Re: find list, filtered

2010-06-13 Thread Dr. Loboto
public function getActiveCountries() { return $this-Country-find( 'list', array( 'joins' = array( array( 'table' = 'members',

Re: Validation - Multiple attempts

2010-06-13 Thread John Andersen
I can't tell you why it happen, but I can tell you how I work with editing an existing record. When a record is chosen for editing, I store the record id in the session. Upon saving the record I take the id from the session. I don't rely on the record id being in the url. If I did that, then the