Probelm with hasMany relationship and find/paginate

2011-02-27 Thread heohni
Hi, I may have a basic missunderstanding of cakephp, but I do the following: I have a Member Model with some belongsTo and 1 hasMany relations. A 'member' hasMany 'payments'. A 'payment' belongsTo a 'member' Now I need to create a new page where I want to show a summary of all members with are

Re: pages_controller

2011-02-27 Thread AD7six
On 26 feb, 22:58, Krissy Masters naked.cake.ba...@gmail.com wrote: Maybe because I never used it in my journey with Cake so far, but the pages controller. I understand the basic idea of rendering static pages display = some_page but how can you define different layouts for each rendered

Re: Rendering a view without layout

2011-02-27 Thread Brie
$this-layout = false; worked for me :) -- 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. To unsubscribe from this group, send email

Re: Rendering a view without layout

2011-02-27 Thread Brie
$this-layout = false; worked for me :) -- 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. To unsubscribe from this group, send email to

Re: Rendering a view without layout

2011-02-27 Thread Tilen Majerle
wtf?? -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/2/27 Brie livelifeinspi...@gmail.com $this-layout = false; worked for me :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org

Re: Fat Models vs. App Controller

2011-02-27 Thread AD7six
On 27 feb, 00:02, Eric Anderson andersoneric...@gmail.com wrote: Hi everyone, Just wondering when it comes to performance and any other factors you may deem important, what's the better option for storing functions that I will use among many controllers: A function in the model that I can

Re: Admin Route or Admin Password

2011-02-27 Thread AD7six
On 26 feb, 20:53, amarradi radis...@googlemail.com wrote: i added an password from login into the mysql db and now i'm ready for login But where i set the hashing algorithm i dont know You don't need to think about that unless you need to change it. Assuming you haven't written a user

Re: Rendering a view without layout

2011-02-27 Thread euromark
@jitka you mean $this-autoRender = false; ^^ On 27 Feb., 12:49, Tilen Majerle tilen.maje...@gmail.com wrote: wtf?? -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/2/27 Brie livelifeinspi...@gmail.com $this-layout = false; worked for me :) -- Our newest site for the

Array formatting from XML web service using Set::combine

2011-02-27 Thread Greg Skerman
I'm having a bit of trouble with Set::combine when using it to deal with xml converted into an array. I am using the XML utility library, then Set::reverse() to flip it from an object into an array for easy traversal The problem is that if a child element only contains 1 record, it is formatted

Re: Array formatting from XML web service using Set::combine

2011-02-27 Thread Greg Skerman
sorry, second array should be: array( 'Result' = array( 0 = array( 'userID' = 5, 'name' = 'bill' ), 1 = array( 'userID' = 25, 'name' = 'jane' ) ) ); On Sun, Feb 27, 2011 at 11:34 PM, Greg Skerman

Re: Rendering a view without layout

2011-02-27 Thread AD7six
Can we stop replying to threads which are a year old please. On 27 feb, 13:59, euromark dereurom...@googlemail.com wrote: @jitka you mean $this-autoRender = false; ^^ On 27 Feb., 12:49, Tilen Majerle tilen.maje...@gmail.com wrote: wtf?? -- Lep pozdrav, Tilen

Re: how to redirect and let the server do some lengthy job in the background?

2011-02-27 Thread Ryan Schmidt
On Feb 27, 2011, at 09:06, Tan Cheng wrote: I have a question. I'm using cakephp to develop a video site, like youtube, I want the user to upload their video to the site, but I only want them to wait for the upload, after it is uploaded, I hope the converting process ( using ffmpeg ) run in

Re: how to redirect and let the server do some lengthy job in the background?

2011-02-27 Thread Tan Cheng
WOW, thanks a lot, Ryan. That makes much more sense. I have never used a daemon before. I think I need to investigate into that more. Do you happen to know some keywords or article to take a look at? Sorry, I'm really a newbie to php... Thanks a lot! -David On Feb 27, 10:13 am, Ryan Schmidt

EmailComponent improvements

2011-02-27 Thread Juan Basso
Hey guys, The core team is working in changes to improve the form to send e- mails for cake 2.0. With these changes will be possible send e-mail from others layers of the application, like in shells. I would like your help to say what is the good and bad points from the actual solution. What is

Re: CakePHP form validation before sending post to the requested controller function

2011-02-27 Thread kdubya
Sorry, you are absolutely right, redirecting causes the validation error messages to be lost. So, reverse the logic. You currently have a view that renders the form that collects the search criteria (you don't say what this is but I'll call it search_form as I did above). So there is an action

Re: CakePHP form validation before sending post to the requested controller function

2011-02-27 Thread kdubya
Oops, I neglected to say the your create() needs to change: echo $this-Form-create('Plan', array('action' = 'search_form')); instead of: echo $this-Form-create('Plan', array('action' = 'search')); On Feb 26, 2:01 pm, kdubya kenwin...@winanstech.com wrote: So, in your search() action, call the

RE: pages_controller

2011-02-27 Thread Krissy Masters
LOL...right! Thanks man. So simply overlooked. K -- 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. To unsubscribe from this group, send

error with database

2011-02-27 Thread a17s
Hello, I am having an issue with a cakephp site. I keep having an error in connecting to mysql database though my database config seems correct. Any suggetions. Find below error messages Warning (2): mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket

Re: Allow empty selection for relationship id (NULL)

2011-02-27 Thread euromark
@Ryan Schmidt in case you are intested i just updated my templates the way to proposed they now display the empty row by default it was quite simple (form.ctp): # display empty default value for belongsTo relations $relations = array(); foreach

Re: error with database

2011-02-27 Thread OldWest
Is your MySQL server running in your services? This does not sound like a CakePHP issue (but I am willing to be wrong about it :) ) -- 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

Re: RE: pages_controller

2011-02-27 Thread OldWest
Wish I would have made it to this post earlier : ) ... I ran into the same issue and complicated it beyond belief! But it's as simple as stated above. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Re: error with database

2011-02-27 Thread Ryan Schmidt
On Feb 27, 2011, at 13:54, a17s wrote: I am having an issue with a cakephp site. I keep having an error in connecting to mysql database though my database config seems correct. Any suggetions. Find below error messages Warning (2): mysql_connect() [function.mysql-connect]: Can't connect

Re: requestAction question

2011-02-27 Thread Dr. Loboto
So my first assumption was right - you need to have common element in non-AJAX layout. In this case all you need is call model function Apple::getAppleInfo() in AppController beforeFilter/beforeRender that will retrieve and set data for view and put $this- element('show_apples') into layout. And

Re: how to redirect and let the server do some lengthy job in the background?

2011-02-27 Thread Ryan Schmidt
On Feb 27, 2011, at 09:48, Tan Cheng wrote: On Feb 27, 10:13 am, Ryan Schmidt wrote: On Feb 27, 2011, at 09:06, Tan Cheng wrote: I have a question. I'm using cakephp to develop a video site, like youtube, I want the user to upload their video to the site, but I only want them to wait for

RE: requestAction question

2011-02-27 Thread Krissy Masters
I ended up doing just that. Thanks all, K -- 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. To unsubscribe from this group, send email

Re: how images stored in database

2011-02-27 Thread Elvis Nguyen
I love this way because it is very simple and easy. When browsing the images, the application saves the path to database. However, we have app/webroot/img folder contains all images of the application. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

Can't Save to DB

2011-02-27 Thread theweirdone
Hi, I'm new to CakePHP, and I'm working on a personal project. I've run into a small problem, which is I can't save certain things to the database. I've tried a few different sources for help (3 seperate forums) with no success. So I'm trying here now. The only problem is there's no formating in

loadModel() and App::import('Model', 'ModelName')

2011-02-27 Thread iainjames
Hey guys, I'm having some trouble telling my controller actions which model to use. My controller is structed like so: == class AdminController extends AppController { var $name = 'Admin'; var $uses = array('News', 'User'); function

What is = in an Array?

2011-02-27 Thread nicolas
hi, in this code: $this-redirect(array('action'='index')); I am absolutely new to cakePHP. the = really confuses me a lot. I couldn't find it in PHP documentation. Can anybody tell me what = means exactly? and explain the syntax of =? Thanks a lot! REgards, Nicolas -- Our newest site for

Re: What is = in an Array?

2011-02-27 Thread Jeremy Burns | Class Outfit
http://php.net/manual/en/function.array.php Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 28 Feb 2011, at 04:47, nicolas wrote: hi, in this code: $this-redirect(array('action'='index')); I am absolutely new to cakePHP. the = really confuses me a lot. I

Re: What is = in an Array?

2011-02-27 Thread Anatoliy Dimitrov
'=' is one way to assign a value in an array in PHP. For more info check: http://php.net/manual/en/book.array.php Regards, Anatoli On Feb 28, 6:47 am, nicolas xu.shen...@gmail.com wrote: hi, in this code: $this-redirect(array('action'='index')); I am absolutely new to cakePHP.  the = really

Re: Containable Query Slow - Am I doing it wrong?

2011-02-27 Thread TimG
It looks like it's just the way it is. Because of the way the associations are it has to query each variation. I just removed the variations from the containable and queried them separately and then combined the arrays in PHP. Much quicker now. Thanks for everybody's help! -- Our newest site

Re: how to redirect and let the server do some lengthy job in the background?

2011-02-27 Thread Zaky Katalan-Ezra
On a Linux machine create a bash file like this - #!/bin/sh ffmpeg -i $1 -r $2 $3 - The ampersand at the end tell the bash to run in the background. the $n is parameters. From php call it like this: $command = mybashpath.sh inputfile.mpg 24 outputfile.flv; *exec* ( $command ); As

Re: Can't Save to DB

2011-02-27 Thread Ryan Schmidt
On Feb 27, 2011, at 09:01, theweirdone wrote: I'm new to CakePHP, and I'm working on a personal project. I've run into a small problem, which is I can't save certain things to the database. I've tried a few different sources for help (3 seperate forums) with no success. So I'm trying here

Re: loadModel() and App::import('Model', 'ModelName')

2011-02-27 Thread Ryan Schmidt
On Feb 27, 2011, at 13:18, iainjames wrote: Hey guys, I'm having some trouble telling my controller actions which model to use. My controller is structed like so: == class AdminController extends AppController { var $name = 'Admin'; var $uses =

Re: how to redirect and let the server do some lengthy job in the background?

2011-02-27 Thread Ryan Schmidt
On Feb 28, 2011, at 01:14, Zaky Katalan-Ezra wrote: On a Linux machine create a bash file like this - #!/bin/sh ffmpeg -i $1 -r $2 $3 - The ampersand at the end tell the bash to run in the background. the $n is parameters. .yes. well, you've forgotten to properly

Re: how to redirect and let the server do some lengthy job in the background?

2011-02-27 Thread Zaky Katalan-Ezra
You have the ff log to check if every thing is ok and the progress. You can create PID file to check if the process ended. Form my experience when dealing with files its better to inspect the filesystem in order to know what you have. The information from the database may conflict with the