Shared Server - changing the paths

2011-06-28 Thread Sanfly
Hi All Im just uploading a site to a shared server for the first time in quite a while and I cant remember how to change the paths Have read previously that you shouldnt keep your cake/ and app/ folders in the webroot, so have bumped them out. All files from the webroot are now in my webroot fol

Creating shell tasks in a plugin possible?

2011-06-28 Thread _k10_
Greetings, Is it possible to create a task (shell tasks) inside a plugin? I tried creating one and executed via a shell. Cakephp doesnt complain about anything but the task doesn't get run either. Any inputs would be highly appreciated. thanks, -K -- Our newest site for the community: CakePH

Callback afterSave

2011-06-28 Thread Krissy Masters
I have a model with afterSave() function that deletes the saved cache data. afterSave() { Cache::delete( 'basic_list', 'inmemory'); } Now controller has 2 functions that save data, one is a form is submitted save data, delete cache return updated data, Other is a simple saveField to save a sing

Re: How to get something to show onscreen

2011-06-28 Thread euromark
maybe a recursion problem? bake your app without scaffolding and manually set the recursion level (or use containable behavior) On 27 Jun., 19:53, Magician wrote: > Hi.  I am new to cake php and am in the middle of making a blog. > Right now, I am stuck on a section.  I have created two tables.

Re: controller's save method is not working

2011-06-28 Thread varai
Hi Jeremy, The following is what i'm getting if I added die(debug($this->Student- >ValidationErrors)) to the else stmt merry_flowers\controllers\students_controller.php (line 12) Array ( ) thanks varai On Jun 28, 4:35 pm, Jeremy Burns | Class Outfit wrote: > Add an else to the if (save) comman

Re: What to do before deployment

2011-06-28 Thread euromark
change the security salt the cookie name isnt that important because it is public anyway On 27 Jun., 23:21, Santiago Basulto wrote: > Hello People. > > Would like to make a good list of "things to do" before deploy my App > in production. Here things i do right now: > > 1. Configure::write('debu

Re: any example project

2011-06-28 Thread euromark
there is also miles' forum http://milesj.me/code/cakephp/forum or many hundred other projects on github On 29 Jun., 01:36, Ryan Snowden wrote: > Also check out the CakeDC plugins (although some parts are inconsistent) > they do put on a good show > > On 27 June 2011 22:44, Tilen Majerle wrote:

Limiting Find Queries by Fields in the Associated Table

2011-06-28 Thread andrewperk
Hello, I'm trying to figure out how to limit my find query to a field that is in the related table. My associations are like so: User hasMany Message Message belongsTo User User hasOne Avatar Avatar belongsTo User In my Message model, I'm finding all messages that belong to a user. I'm using a re

Re: any example project

2011-06-28 Thread Ryan Snowden
Also check out the CakeDC plugins (although some parts are inconsistent) they do put on a good show On 27 June 2011 22:44, Tilen Majerle wrote: > www.croogo.org > > CakePHP powered CMS > > -- > Lep pozdrav, Tilen Majerle > http://majerle.eu > > > > 2011/6/27 Prabha Vathi > >> Hi, >> >> Is there

Re: Form-Helper (kind of disfunction)

2011-06-28 Thread Francisco ACLima
try to go directly to the url in $this->Form->Create $this->Form->Create('pages',array('url'=>''/admin/pages/display/ admin_home)); On 24 jun, 19:10, func0der wrote: > Hey guys, > > i'm having a formular present on all sites with the action for this > formular located in the beforeFilter funct

Re: get input value to perform a custom search

2011-06-28 Thread Facu Siracusa
Hi, I tried previously to this post to use a Form, but it doesn't work to me... can you post a brief code example to show me hoy to use the form?? Do I have to create a Film like $this->Form->create('Film')??? and in the controller i have to use $title = $this->data, instead of use $title as a par

Re: Multiple images in one row - David Perssons Media Plug-in

2011-06-28 Thread Jeremy Burns | Class Outfit
Slightly odd behaviour. I added hidden fields to populate: - Profile.Logo.foreign_key to the id of the associated record in Profile: this is fine (in my test it's 1) - Profile.Logo.model to 'Profile': this is losing it's first character and being replaced by '1' - a text value of 'logo' for Profi

What to do with LC_MONETARY?

2011-06-28 Thread func0der
Hey guys, i was just wondering what you should do with the "default.po" or whatever filename it has in the "LC_MONETARY" category folder. What content should be in there? I know that i can set the currency "view" in php with "setlocalte(LC_MONETARY, "de_DE")" but i don't know what i should do wit

Re: Multiple images in one row - David Perssons Media Plug-in

2011-06-28 Thread Jeremy Burns | Class Outfit
Bingo. Perfect, thanks. I worked out that the 'm' at the beginning refers to the 'medium' size, which explained why it was rendering a zoomed and constrained image. I changed that to 'l' and the proper sized image appeared. Jeremy Burns Class Outfit http://www.classoutfit.com On 28 Jun 2011, a

Re: Multiple images in one row - David Perssons Media Plug-in

2011-06-28 Thread Jeremy Burns | Class Outfit
Fabulous - thanks for the answer. I did a bit more RTFM after posting and implemented the $hasMany (as you suggested here) and that works well to. I'll try the render method you suggest. Jeremy Burns Class Outfit Tel: +44 (0) 208 123 3822 Mob: +44 (0) 7973 481949 Skype: jeremy_burns http://www.

Re: Multiple images in one row - David Perssons Media Plug-in

2011-06-28 Thread jeremyharris
I have experience with the Media plugin. First, congrats on getting it up and running w/o docs ;) What you want is Profile hasMany Image. That way a user can have multiple images. If you want "types" of images per user, you can use the 'group' field included in the SQL he provides. Or, you can

Multiple images in one row - David Perssons Media Plug-in

2011-06-28 Thread Jeremy Burns
I've installed this plugin to the point where it works, but not exactly how I want to use it. I'm using it for a profile model. I want to be able to: - add more than one image per db row (say, a logo and an image) - render the uploaded images from the media/transfer/img folder in a view (when dis

Re: Query Help

2011-06-28 Thread Johan
Are these the conditions for a model related by a HasMany relationship? Most probably CakePHP is using PHP's empty() function [http://php.net/empty] to check the value of the foreignKey. If that's the case, you may want to fill a ticket, but I doubt they would fix it as it would change the current

Re: My Model doesn't validate anything

2011-06-28 Thread euromark
exactly for somebody that doesnt know this required is always the wrong way to go and in most other cases as well see http://www.dereuromark.de/2010/09/21/saving-model-data-and-security/ On 27 Jun., 22:41, Jamie wrote: > Why would you tell him to use allowEmpty instead of required? They > perfo

Re: controller's save method is not working

2011-06-28 Thread Jeremy Burns | Class Outfit
Add an else to the if (save) command: die(debug($this->Student->validationErrors)); Maybe it's failing at the db level. Jeremy Burns Class Outfit http://www.classoutfit.com On 28 Jun 2011, at 12:20, varai wrote: > Hi > > my following students_controller.php is not saving the student info in

controller's save method is not working

2011-06-28 Thread varai
Hi my following students_controller.php is not saving the student info in the form. I have no idea on what is the prob. I have already checked the data to be saved using var_dump($this->data) students_controller.php data)){ var_dump($this->data); if ($this->Student->save($this->da

Re: About belongsTo relation in models

2011-06-28 Thread Jens Dittrich
You do not have to do anything in case there is no B. CakePHP will not enforce that there is an B for every A as long as you do not enforce that in your validation rules or eventually in your database. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check o

About belongsTo relation in models

2011-06-28 Thread castarco
Hello, I have a doubt about the belongsTo relation between A and B. If I make a belongsTo relation, it's mandatory that all the A entities refers to B entities? In my case, there are cases where the reference exists, and in other many cases, the reference don't exists. Should I to create a "null"

Re: Render

2011-06-28 Thread Dr. Loboto
Just do not redirect in view. Redirection must be done in controller. On Jun 25, 3:16 am, Prabha Vathi wrote: > Hi, > > I have two actions in post controller > > view and random > > in random i render view action. But in view action i check the id for empty. > If it is empty then i redirect it to