Re: New website help...

2011-06-28 Thread Ryan Smith
Very true, but I'm actually an electrician aiming to make my work life easier as opposed to being a designer :-) On Jun 27, 6:34 am, Ryan Schmidt google-2...@ryandesign.com wrote: On Jun 24, 2011, at 12:47, Ryan Smith wrote: I've been making a website for the past few days now, and it's

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 prabha.ridd...@gmail.com 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

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: 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

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 ?php class StudentsController extends AppController{ function add(){ if

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

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 jamie@gmail.com wrote: Why would you tell him to use allowEmpty instead of

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

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

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

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

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,

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 with that

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

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

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 funco...@web.de wrote: Hey guys, i'm having a formular present on all sites with the action for this formular located in the

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 tilen.maje...@gmail.com wrote: www.croogo.org CakePHP powered CMS -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/6/27 Prabha Vathi

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: 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 sicapi...@gmail.com 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

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 santiago.basu...@gmail.com 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.

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 jeremybu...@classoutfit.com wrote: Add an

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 davis_justinmich...@yahoo.com 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.  

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