Re: Grabbing only records with associated records in a linked table

2009-04-05 Thread mscdex
Why not also have PageSnippet belongs to Page? That way you can then just do a find on PageSnippet instead and get the associated Pages. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this

Re: Problem in session management in Cakephp

2009-04-05 Thread SeeVik
Regarding this problem, can anybody tell me where the log files are stored in cakephp? On Apr 3, 1:43 pm, SeeVik wrote: > Hello all > > I have a question regarding our website built using cakephp. I have > some idea of php but I am completely new to the frameworks. The thing > is our company got

Re: i18n of a Page Title

2009-04-05 Thread Miles J
If the file name is titles.po it would be __d('titles', 'key'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this

Re: i18n of a Page Title

2009-04-05 Thread Dardo Sordi Bogado
> If I use default.po instead, the translation also works. There you have it ;) You have to use the domain family of __() functions if you use different filenames, have a look at this: http://api.cakephp.org/file/basics.php#function-__d HTH, - Dardo. --~--~-~--~~~-

Grabbing only records with associated records in a linked table

2009-04-05 Thread mattalexx
Hi. Page has many PageSnippets. When I use Model::find() to grab the pages, I'd like to only get pages that have associated page snippets. Is this something I should handle in the model or in the Model::find() method? Thanks --~--~-~--~~~---~--~~ You received this

Re: Controller default method

2009-04-05 Thread Miles J
I wasn't aware of that function, but you should probably listen to brian. :] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscri

Re: Controller default method

2009-04-05 Thread brian
Better to use $this->setAction('action_name') rather than redirect() as the latter forces a new request. On Sun, Apr 5, 2009 at 7:08 PM, Miles J wrote: > > Besides using the index action, there is no such feature. You could > however do something like this: > > function beforeFilter() { >      

Re: Controller default method

2009-04-05 Thread Miles J
Besides using the index action, there is no such feature. You could however do something like this: function beforeFilter() { if (!in_array($this->params['action'], get_class_methods($this))) { $this->redirect(); // to some action } } --~--~-~--~~--

Re: Controller default method

2009-04-05 Thread websurfshop
If you do not specifically name an action in the url it will default to the index action. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.c

Re: Load a Behavior on every model

2009-04-05 Thread jsundquist
So add the var $actsAs = array(); to the AppModel is your suggestion? On Apr 5, 4:46 pm, Marcelo Andrade wrote: > On Sun, Apr 5, 2009 at 6:01 PM, jsundquist wrote: > > > What is the best way apply a behavior to all models?  I have two > > custom behaviors that I would like to apply to all model

Re: Load a Behavior on every model

2009-04-05 Thread Marcelo Andrade
On Sun, Apr 5, 2009 at 6:01 PM, jsundquist wrote: > > What is the best way apply a behavior to all models?  I have two > custom behaviors that I would like to apply to all models.  Whats teh > best way of getting that done?  I know i can apply them to each > individual model using $actsAs. Can I

Re: Tagging system in Cake - hasAndBelongsToMany problems

2009-04-05 Thread Ben Coleman
Thanks for the input I've tried everything suggested, and none of them work. The strange thing is my save/create/update behaviour is working, so Tags and Games are getting created and linked properly during updates & deletes - I infer from this that my associations & models are set up OK. With t

RE: Get value no ID from query

2009-04-05 Thread Dave Maharaj :: WidePixels.com
Thanks for the info from everyone. I did hard code it in the end since the rank options will not change, took it out of the table all together. Dave -Original Message- From: Walther [mailto:waltherl...@gmail.com] Sent: April-05-09 5:50 PM To: CakePHP Subject: Re: Get value no ID from q

Load a Behavior on every model

2009-04-05 Thread jsundquist
What is the best way apply a behavior to all models? I have two custom behaviors that I would like to apply to all models. Whats teh best way of getting that done? I know i can apply them to each individual model using $actsAs. Can I apply the same method to the AppModel instead of the individu

Re: Offline version of the CakePHP manual.

2009-04-05 Thread Dardo Sordi Bogado
> Dardo, if I could ask you to either send me the source or publish it, > as it looks like a nice script to have for creating a pdf snapshot of > the manual. Hope you don't take offence, Mike, but Dardo's version is > just in a format that is more easy to read. I'll send you a copy of the source

Re: Get value no ID from query

2009-04-05 Thread Walther
If you have a hard coded set of ranks which will not change and you don't want to use a another table/model then just make an array with the various rank words and use the rank value as the key for each rank. On Apr 5, 4:59 am, "Dave Maharaj :: WidePixels.com" wrote: > How can I get the value of

Re: Tagging system in Cake - hasAndBelongsToMany problems

2009-04-05 Thread Walther
Use the containable behaviour. $this->Game->Tag->find('all', array('conditions' => array('Tag.name' => 'foo'), 'contain' => array('Game' => array('Genre', 'System')); As long as your associations are correctly configured it should work. Read up about it at http://book.cakephp.org/view/474/Contai

Re: Get value no ID from query

2009-04-05 Thread Walther
If you have a hard coded set of ranks which will not change and you don't want to use a another table/model then just make an array with the various rank words and use the rank value as the key for each rank. On Apr 5, 4:59 am, "Dave Maharaj :: WidePixels.com" wrote: > How can I get the value of

Re: Offline version of the CakePHP manual.

2009-04-05 Thread psykro
Thanks Mike and Dardo, both look like good options. Dardo, if I could ask you to either send me the source or publish it, as it looks like a nice script to have for creating a pdf snapshot of the manual. Hope you don't take offence, Mike, but Dardo's version is just in a format that is more easy

Re: What do ARO and ACO stand for?

2009-04-05 Thread dr. Hannibal Lecter
http://book.cakephp.org/view/465/Understanding-How-ACL-Works Answers are drawing near.. On Apr 5, 8:56 pm, bearlee wrote: > It a novice quesiton, but these acronyms bother me if I don't know > what they mean (my pet-peeves). > > What do ARO and ACO stand for? > > -Brian --~--~-~--~~

What do ARO and ACO stand for?

2009-04-05 Thread bearlee
It a novice quesiton, but these acronyms bother me if I don't know what they mean (my pet-peeves). What do ARO and ACO stand for? -Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to th

Re: Offline version of the CakePHP manual.

2009-04-05 Thread Dardo Sordi Bogado
Psykro, I've a script that I use to build a pdf version of the manual for those times when I'm offline. The script is in bash, the syntax highlighting in php and uses htmldoc ( www.htmldoc.or ) for nice pdf output. If you or anyone is interested I could send you the source or publish it in gith

Re: Get value no ID from query

2009-04-05 Thread brian
You have another table/model named ranks/Rank? Just use containable and grab it from $result['Rank']['name'] (or whatever the field is). Although, your users table should have a field rank_id, not rank, if this is the case. On Sat, Apr 4, 2009 at 10:59 PM, Dave Maharaj :: WidePixels.com wrote:

Certain type of floats interpreted as String in queries

2009-04-05 Thread Adr
Hello, I have a perplexing problem that may actually be a PHP problem rather than CakePHP 1.2 (rev 8134) but since the problem appears for me when I am using the Model class methods in CakePHP I'm posting here hoping at least for a few pointers. The Problem: I read in rows from a csv file with

Re: Sending emails in console scripts

2009-04-05 Thread tekomp
This works for me... class ExampleShell extends Shell { var $uses = array('Example'); function main() { App::import('Component', 'Email'); $this->Email = new EmailComponent(null); $body = 'asdf'; $this->Email->fro

Re: Sub Controller

2009-04-05 Thread majna
Bok, Ja sam iz Varaždina, HR pa nemoramo ne engleškom :) Javi ako zapne. Pozdrav! 2009/4/3 stain > Thanks for reply > Must be some typo there, it was 2 am here in Belgrade when i worked on > that, must have been too tired to notice error, anyway my fix was (and i > think i'll keep to that in fut