Pagination Sort

2010-05-03 Thread sijo jose
Hi guys, I have this model Structure - Model 1 - Union var $belongsTo = array( 'Address' => array( 'className' => 'Address', 'foreignKey' => 'address_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); Model 2 - Address var $belongsTo = array( 'District' => array( 'className' => 'Dist

Re: 404 error when I call controller

2010-05-03 Thread John Andersen
Disregard my last! Early in the morning, my sleepy eyes didn't see the route! Sorry for the inconvenience, John On May 4, 9:38 am, John Andersen wrote: > Your controllers name is Logins, which means that in your URL you must > use logins, not login! > Enjoy, >    John [snip] Check out the new

Re: 404 error when I call controller

2010-05-03 Thread John Andersen
Your controllers name is Logins, which means that in your URL you must use logins, not login! Enjoy, John On May 3, 5:49 pm, gannher wrote: > Hello > > I am trying to build a controller but when i call it, i have a 404 > code error. > > Here the controller "logins": > > class LoginsController

Re: Displyaing two models data in a view

2010-05-03 Thread aveev
Thanks for your pointer.. I've tried using saveAll method to save parent and related models. and it works.. Trying to look at containable behavior now... Jeremy Burns wrote: > > Rather than walk through your code correcting it, I can give some hints > and point you at the guide - because the a

Re: Simple assoication not working

2010-05-03 Thread Ed Propsner
Have another look at your naming conventions, most notably those for your models. http://book.cakephp.org/view/24/Model-and-Database-Conventions On Mon, May 3, 2010 at 10:43 PM, Rodney Chan wrote: > I try to follow the example from a book called "CakePHP Application > Development" > > I have cr

Re: Editing Multiple Records - Problem with selected options

2010-05-03 Thread abocanegra
Well, the structure I wanted proved too difficult to update so I went with the tag plugin instead. i recommend checking it out. http://sonnygauran.co.cc/blog/2010/03/28/cakephp-tags-plugin-documentation/ On May 3, 1:36 pm, abocanegra wrote: > the view is the problem, the tags should be a drop d

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread abocanegra
I forgot to mention this belongs in the photosController function beforeFilter() { if ($this->action == 'upload') { $this->Session->id($this->params['pass'][0]); $this->Session->start(); } parent::beforeFilter(); } On May 3, 1:03 pm, Sam Sherlo

Simple assoication not working

2010-05-03 Thread Rodney Chan
I try to follow the example from a book called "CakePHP Application Development" I have created the following table under MySQL books(id, isbn, title, description, author_id) authors(id, name, email, website) And created 4 .php files: C:\xampp\htdocs\relationship\app\models\authors.php C:\xam

Re: Multiple Undo/Redo!!

2010-05-03 Thread Mike
Hey Jason, you have an interesting idea and done some nice work. I had to do something similar in the past as well. How I approached it was to add a version to my model and then everytime the model was saved, re-save the entire model and increment the version number . Mike On May 2, 8:53 pm, pa

Re: Sessions working in one controller and not the other

2010-05-03 Thread LordZardeck
Ok, I found out that the problem arises when I use a model. When I set the $uses varibale to an empty array, it works. What would cause this? On May 3, 6:21 pm, thatsgreat2345 wrote: > Include the session component > > On May 3, 3:59 pm, LordZardeck wrote: > > > > > > > For some reason, the

Re: Sessions working in one controller and not the other

2010-05-03 Thread LordZardeck
Also, shouldn't there be an error if I try to use the Session component when it isn't included? On May 3, 6:21 pm, thatsgreat2345 wrote: > Include the session component > > On May 3, 3:59 pm, LordZardeck wrote: > > > > > > > For some reason, the session handling works in one controller and n

Re: Sessions working in one controller and not the other

2010-05-03 Thread LordZardeck
But the sessions controller works without it. Shouldn't the messages controller work without it also? I added it anyways, and it still didn't work. On May 3, 6:21 pm, thatsgreat2345 wrote: > Include the session component > > On May 3, 3:59 pm, LordZardeck wrote: > > > > > > > For some reason

Re: Sessions working in one controller and not the other

2010-05-03 Thread thatsgreat2345
Include the session component On May 3, 3:59 pm, LordZardeck wrote: > For some reason, the session handling works in one controller and not > the other. I can't figure out why. I am using CakePHP 1.2.5. > > // > //Does work > // > > sessions_controller.php: > > class SessionsController extend

Sessions working in one controller and not the other

2010-05-03 Thread LordZardeck
For some reason, the session handling works in one controller and not the other. I can't figure out why. I am using CakePHP 1.2.5. // //Does work // sessions_controller.php: class SessionsController extends AppController { var $name = "Sessions"; var $layout = "ajax"; var $uses = arr

model testing - any ideas?

2010-05-03 Thread euromark
unit testing with cake usually is very nice but what model testing is concerned it drives me nuts if i want to work on fixtures i have to include all related models of any submodel as well (MANUALLY). var $fixtures = array('app.daily_stat', 'app.country', 'app.country_province', 'app.user_stat

Re: 404 error when I call controller

2010-05-03 Thread Don Drake
A 404 error? I'm gonna guess that your .htaccess file is missing. Don On Mon, May 3, 2010 at 7:49 AM, gannher wrote: > Hello > > I am trying to build a controller but when i call it, i have a 404 > code error. > > Here the controller "logins": > > class LoginsController extends AppController {

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Sam Sherlock
Thanks Miles, Aran, @miles I will also try it out this evening hopefully. Had some nice success with commentia last night also I am fairly certain that the data was in correct format as I checked this early on (when using multi upload I made some of my additional fields default) but i will check

404 error when I call controller

2010-05-03 Thread gannher
Hello I am trying to build a controller but when i call it, i have a 404 code error. Here the controller "logins": Here routes.php: Router::connect('/', array('controller' => 'homes', 'action' => 'index')); Router::connect('/login', array('controller' => 'logins', 'action' => 'display'));

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread abocanegra
Your uploader looks great and will be useful to me on many levels. I actually had planned on extending this to send files to s3. The one i was using was designed for cakePHP http://sabbour.wordpress.com/2008/07/18/enhanced-image-upload-component-for-cakephp-12/ thought its a bit older. I'll let you

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread abocanegra
I pass the session id to the upload script, the auth session as never timed out on me while using it. Each upload sends the session id, it is in the javascript. -a On May 3, 1:03 pm, Sam Sherlock wrote: > Hi Miles, > > have you tried to use your uploader with uploadify or swfupload? > > @abocaneg

Re: Editing Multiple Records - Problem with selected options

2010-05-03 Thread abocanegra
the view is the problem, the tags should be a drop down and those selected should be, well selected. but that is only working in the edit view, and failing in the edit all view. in edit all it lists all the options but fails to select those that are already chosen for the record. On May 3, 5:24 

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Miles J
If the $data passed to the controller is correct, the uploader should work. I have not tested it personally but I can test case it when I get home. On May 3, 1:03 pm, Sam Sherlock wrote: > Hi Miles, > > have you tried to use your uploader with uploadify or swfupload? > > @abocanegra > > I mean th

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Sam Sherlock
Hi Miles, have you tried to use your uploader with uploadify or swfupload? @abocanegra I mean that the user is logged in through auth. I think that the follow up requests that uploadify uses to check success of queued items are passed with out Session ID (appened to query string) and so the aut

cakephp 1.3 plugin layout path

2010-05-03 Thread davido
Hi! I wanted to ask if somebody can help me with the 1.3 versions plugin. I ´ve used a plugin in 1.2.6 and everything was working great. On version 1.3 the same plugin delivers me an error message on call: Error: The layout file www.mydomain.at/app/views/plugins/about/layouts/About.Pages.ctp

Re: How create a observeField with the new JSHelper?

2010-05-03 Thread cguyer
i'm also trying to figure out this myself, hacking through the new help and learning jquery. any help would also be appreciated. On Apr 30, 2:38 pm, Celso wrote: > Hi ! I want using the new JSHelper with Jquery, i need create a > observeField to fill a combo with another combo that changed > > Th

Re: Selected option in select

2010-05-03 Thread Ed Propsner
@Andrei Not sure if it will help but I've been using $form->input myself and haven't had any real issues. echo $form->input('User.gender', array( 'label' => 'Gender:', 'empty' => '-', 'selected' => 'M', 'options' => array(

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Miles J
It would be better to actually use an uploader that was built for Cake. http://github.com/milesj/uploader On May 3, 5:28 am, abocanegra wrote: > Could you clarify what you mean by admin routing. I have it working > solidly in my multi-user admin system. I have chosen to save the data > outside o

Re: I need full ORM example

2010-05-03 Thread gremlin
The point here is that you obviously haven't read the manual. Why should we be helping someone who hasn't bothered to read the excellent materials provided? Second, your question is answerable with a quick google search. Google for "cakephp complete application tutorial" and *READ THE ENTIRE MANUAL

ACL with routes

2010-05-03 Thread alaxos
Hi all, I have a question regarding the usage of ACL with routes. A long time ago (when ACL was only based on the INI file...) I wrote a component that allows me to easily grant/block access to actions depending on roles the authenticated users are linked to. Its configuration allows to check for

CakePHP on IIS with UrlScan on shared hosting

2010-05-03 Thread rei...@gmail.com
Hello, i'm trying to setup a CakePHP applicatie on a shared IIS hosting, this is working but when i use a colon in the url i get a '400 bad request'. Is there a way to avoid the colon and replace it with something else? Greetings, Reijer Check out the new CakePHP Questions site http://cakeqs.org

Re: Problem setting the page title with the $pageTitle variable

2010-05-03 Thread ale3andro
A change brought by Cake 1.3.0... Thank you for pointing this out! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, s

Re: Newbie problem with 15 minute blog in Cake 1.3

2010-05-03 Thread calvin
http://yourapp/foos/bar/id:1/ will not work when Cake is expecting http://yourapp/foos/bar/1 Cake doesn't know the name of your function variables (I don't even think there's a way to determine that in PHP). So it wouldn't know that the 'id' named param is supposed to be the first argument in Foos

Re: fresh install of cakephp 1.3, Fatal Error: Call to a member function cd()

2010-05-03 Thread mikeottinger
I should mention I'm on apache2, php 5.3.2 as well. On May 2, 11:16 pm, mikeottinger wrote: > Hi Guys, > > I saw one post on this that seemed to peter out...  I've a fresh > install of 1.3, I'm running this in my own installations of apache, > php and mysql on mac osx snow leopard. All of which r

Cakephp.org having trouble

2010-05-03 Thread Dave
Website is grinding pretty bad and poppin internal server errors every now then. Looks like it is swapping Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups

Re: How to get the data form the different table.

2010-05-03 Thread Jonathon Musters
WeLl you would need to have told cake there relationship and then you can use contianable to get the fields you are after On 5/3/10, Master Ram wrote: > hi.. all > > i what to show 3table data in one table. > > i have to add 3table fields in one place like: > > i have table name called "adb_cam

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread abocanegra
Could you clarify what you mean by admin routing. I have it working solidly in my multi-user admin system. I have chosen to save the data outside of the cakePHP admin section for this specific project. I have everything routing based on roles. Sorry i am unclear on some terminology, if you can clar

Re: Editing Multiple Records - Problem with selected options

2010-05-03 Thread Andrei Mita
Your problem is in the view? On Mon, May 3, 2010 at 3:15 PM, abocanegra wrote: > I have created a multiple image upload that needs to have multiple > records edited to add in content such as title and tags. When I do a > regular edit it works fine, when I try to do the multiple edit the tag > s

Editing Multiple Records - Problem with selected options

2010-05-03 Thread abocanegra
I have created a multiple image upload that needs to have multiple records edited to add in content such as title and tags. When I do a regular edit it works fine, when I try to do the multiple edit the tag select function fails to load the selected options as it does in a regular edit. I have been

How to get the data form the different table.

2010-05-03 Thread Master Ram
hi.. all i what to show 3table data in one table. i have to add 3table fields in one place like: i have table name called "adb_campaign" in this table i want fields "campaign_id",jobno..etc and also i want fields form the table adb_clients, and user name form the table adb_users. how to get the

Re: Selected option in select

2010-05-03 Thread Andrei Mita
I've tried what you suggested and I doesn't work. I believe it's because the list of options is static and defined in the view. In some other view, where the select is populated from the DB, it works and I don't even need to specify the Model :) Thanks a lot On Sun, May 2, 2010 at 10:21 AM, Webb

Re: PHP CodeSniffer

2010-05-03 Thread Braindead
I use this plugin with NetBeans, too. Which coding standard you want to use is just a matter of taste. In every case you have to make the standard follow Cake conventions and this is my problem. Is there really no one who uses CodeSniffer in a Cake project? Check out the new CakePHP Questions site

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Sam Sherlock
Hi Aaron, Sure I would love to see how you have used uploadify in a component. Have you managed to get it working with admin routing? The code you posted so far does not use the admin prefix - S On 3 May 2010 08:47, Andrei Mita wrote: > Your timing could not be better. Thanks > > > > On

Re: need help

2010-05-03 Thread Andrei Mita
What do you get from the secont query? And why do you need to specify 'fields' if you are doing a count? On Mon, May 3, 2010 at 8:08 AM, chandrasekhar reddy wrote: > hi all, > > i am new to cake php can any 1 help me plz, > > > 1).. $rsProfile = pg_exec($conn,"SELECT strprofilename FROM > tblmus

Re: notEmpty validation for the Selectbox

2010-05-03 Thread Andrei Mita
Check out the cookbook: http://book.cakephp.org/view/125/data-validation On Mon, May 3, 2010 at 7:42 AM, Ram wrote: > Hello friends, > > In my application I have a select option to select the > country, I need to apply the notEmpty validation to that, can anyone > help me to fix thi

notEmpty validation for the Selectbox

2010-05-03 Thread Ram
Hello friends, In my application I have a select option to select the country, I need to apply the notEmpty validation to that, can anyone help me to fix this? Thanks in advance, M. Ramkumar. Check out the new CakePHP Questions site http://cakeqs.org and help others with their Cake

Re: PHP CodeSniffer

2010-05-03 Thread gabriel Tessier
Hi, I want to use coding standards with my cake app too. The default coding standard is pear. You can change default standard see the Code Sniffer doc. If you use netbeans there's a plugin to check your code. http://www.amaxus.com/cms-blog/coding-standards-netbeans-php-codesniffer I don't find a c

Re: The docs for Containable does not work for complex search. Complex search is 2 models away. For cake 1.3

2010-05-03 Thread AD7six
On May 2, 1:45 pm, Jon Bennett wrote: > > i need to use Merchant model to do a find of all 4 related data. > > notice that Domain is the only one NOT directly related to Merchant. > > > i tried this in a method inside Merchant model: > > > $this->Behaviors->attach('Containable'); > > $this->User

Re: The docs for Containable does not work for complex search. Complex search is 2 models away. For cake 1.3

2010-05-03 Thread AD7six
On May 3, 7:02 am, Kei Simone wrote: > Hi i did this > > $this->Behaviors->attach('Containable'); >                 $this->User->Behaviors->attach('Containable'); >                 $this->Shop->Behaviors->attach('Containable'); >                 $this->Shop->Domain->Behaviors->attach('Containabl

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Andrei Mita
Your timing could not be better. Thanks On Mon, May 3, 2010 at 9:05 AM, abocanegra wrote: > I have it working - > > photoController - > > function upload(){ > >if (isset($this->params['form']['Filedata'])) >{ >$tempFile = $this->params['form']['Filedata']

Re: The docs for Containable does not work for complex search. Complex search is 2 models away. For cake 1.3

2010-05-03 Thread Andrei Mita
Or here is another idea. Make a find('all') query with $recursive = 2 and see how much information is there that you don't need. On Mon, May 3, 2010 at 10:33 AM, Andrei Mita wrote: > Simone, > > Containable is extremely powerful. I am just amazed how little time it > takes me to write complex q

Re: The docs for Containable does not work for complex search. Complex search is 2 models away. For cake 1.3

2010-05-03 Thread Andrei Mita
Simone, Containable is extremely powerful. I am just amazed how little time it takes me to write complex queries. Give me the structure of the tables and an example of what do you want to retrieve from them and I might be able to help you around. On Mon, May 3, 2010 at 8:02 AM, Kei Simone wrot

Re: Selected option in select

2010-05-03 Thread Andrei Mita
I'll give it a try right now, thanks. On Sun, May 2, 2010 at 10:21 AM, WebbedIT wrote: > Glad u got it working :o) > > If you change the file name to Profile.group, you should be able to > remove the 'selected' =>$this->data['Profile']['group'] attribute. > > P.S. to show the input without a la