Re: validates() in controller doesn't work

2012-01-29 Thread Ivo Wolgensinger
No there aren't any errors. I simplyfied the code for testing: [code] public function signup() { if ($this-request-is('post')) { $this-User-set($this-data); if ($this-User-validates('email')) { // this validation does not

How to create and save a file as .rtf?

2012-01-29 Thread supp...@deep-coding.net
Hey, I have a problem, I have a layout for an .rtf file, called data.ctp, in this file I have my rtf code (I justed opened my rtf in editor and copied out the code...). And now I want to create a .rtf file in my controller and replace some vars from my template and then I want to save this, that

Re: How to create and save a file as .rtf?

2012-01-29 Thread euromark
what version are you using? that is the most crucial information when asking for help^^ anyway, for 2.x I use this: http://www.dereuromark.de/2011/11/21/serving-views-as-files-in-cake2/ On 29 Jan., 13:28, supp...@deep-coding.net supp...@deep-coding.net wrote: Hey, I have a problem, I have a

Re: How to create and save a file as .rtf?

2012-01-29 Thread Matt Murphy
There's LiveDocx. http://www.phplivedocx.org/. I think it's in Beta. I'm not sure if it will handle the header modification, but that's not exactly rocket surgery... Cheers, M On Sun, Jan 29, 2012 at 2:40 PM, supp...@deep-coding.net supp...@deep-coding.net wrote: Hey, thanks for your reply.

Problem with ordering by a calculated field

2012-01-29 Thread Daniel
I am trying to sort some query results using a distance field which is calculated from longitude and latitude fields as follows: $this-paginate = array( 'User' = array( 'recursive' = -1, 'limit' = 10, 'conditions' =

Re: Problem with ordering by a calculated field

2012-01-29 Thread Andras Kende
I would start the find on Postcode and contain the User Would do a $locations = find('all' ….) as its easier to debug($locations) , once thats working correctly then change it to paginate... try order :'order' = 'distance ASC' Andras Kende On Jan 29, 2012, at 3:35 PM, Daniel wrote: I

how to confiure myproject with cakephp 1.3 on shaing host

2012-01-29 Thread ahmed fakher
At first I prefer to explaine important things First, this question very basiclly but I'm Newbie To Cake Second,doesnt have a place with experts in the cake Except this place, so I hope that you help me Third, I've made ​​several attempts but failed So please do not let me without any help ..

Re: Problem with ordering by a calculated field

2012-01-29 Thread Daniel
On Jan 29, 9:56 pm, Andras Kende and...@kende.com wrote: I would start the find on Postcode and contain the User Would do a $locations = find('all' ….)  as its easier to debug($locations) , once thats working correctly then change it to paginate... OK I didn't try this. try order :    

Re: Error using CakeDC search plugin in a CakePHP 2 app

2012-01-29 Thread Daniel
OK I found the answer. I was using Cake 1.3 code to do the pagination in the view. When I replaced the code with code baked by Cake 2 the problem went away. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Re: Error using CakeDC search plugin in a CakePHP 2 app

2012-01-29 Thread Daniel
Oops, I wrote too soon. I still get the second error: Warning (2): Invalid argument supplied for foreach() [APP\Controller \Component\PrgComponent.php, line 76] -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Re: How to create and save a file as .rtf?

2012-01-29 Thread Matt Murphy
Scratch that... Try: http://ask.cakephp.org/questions/view/phprtflite_with_cake M On Sun, Jan 29, 2012 at 3:01 PM, Matt Murphy mattyh...@gmail.com wrote: There's LiveDocx. http://www.phplivedocx.org/.  I think it's in Beta. I'm not sure if it will handle the header modification, but that's not

Re: Error using CakeDC search plugin in a CakePHP 2 app

2012-01-29 Thread Daniel
... and here is the code/context: $args = $this-controller-passedArgs; foreach ($this-controller-presetVars as $field) {$model = User $data = array( User = array() ) $args = array( min_age = 10, max_age = 45 ) PrgComponent::presetForm() -

Re: Error using CakeDC search plugin in a CakePHP 2 app

2012-01-29 Thread Daniel
OK, I finally sussed it out. I forgot to declare $presetVars at the top of my controller. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.

Re: How to create and save a file as .rtf?

2012-01-29 Thread Matt Murphy
And that's the wrong URL. I'm such a big help. http://stackoverflow.com/questions/6802359/cakephp-with-phprtflite M On Sun, Jan 29, 2012 at 6:35 PM, Matt Murphy mattyh...@gmail.com wrote: Scratch that... Try: http://ask.cakephp.org/questions/view/phprtflite_with_cake M On Sun, Jan 29,

$persistModel is removed in Cake 2.0?

2012-01-29 Thread Perry
in Cake 2.0, controllers don't persistent models in tmp/cache/persistent/ directory, right? then where does it store those cached objects? or model objects are not cached any more? i do see some files in tmp/cache/models, but those are table structures i guess. -- Perry | 彭琪 http://pengqi.me --

ACL manager plugin

2012-01-29 Thread Justin Edwards
Hello all! I am currently managing ACL by hand, and have seen a couple of projects that do some ACL management (croogo and quickapps I believe). I am developing a framework for all of my SaaS cakephp applications that allows for unification of applications and centralized billing / accounting

Associations model linking

2012-01-29 Thread succer...@tiscali.it
Hi everybody! I want to know if i'm doing things right, please! I have 3 kind of users: admin,teacher,students, so i've created 3 different groups (for ACL). For the users, I've made 3 separated tables: users (for login), teachers, and students. So: Users $belongsTo Group teachers $belongsTo