Removing white space of urls with - in cakephp routing?
I have a URL like http://abc.com/users/index/University of Kansas and i want to make it University-of-Kansas. How is it possible via mysql using Cakephp ??? ...
I have a URL like http://abc.com/users/index/University of Kansas and i want to make it University-of-Kansas. How is it possible via mysql using Cakephp ??? ...
Hi all, I'm using CakePHP 1.2 and I'm just wondering if there is any side affect on passing the $this->data to the View from the Controller. Ex: // inside PostsController, I have this code: $this->data['Posts'] = $this->Post->find('all'); instead of : $posts = $this->Post->find('all'); $this->set(compact('posts')); // inside the /...
I'm doing an jQuery ajax call to an XML page in my CakePHP site. For some strange reason CakePHP returns a 404 error when I do an ajax call, yet there is no problem going to the URL directly at http://imgfave.com/gragland/rss. You can see the issue by clicking the link on my test page: http://imgfave.com/ajaxtest The error page says: ...
how can i create a drop down list with action which allow me link to other page? i using cakephp to doing a system, which i wanna have a drop down list to let user select. when user selected the value, i wanted to call a function in controller.. izit available that i can using a $form->input to perform this?? how can i call a function ...
hi all, I am wondering if there is a way to specify the date format in the forms created using CakePHP's $form->inputs(); Please note that this is not the individual $form->input() but instead $form->inputs() that will create the whole form fields automagically. Any input will be appreciated. Thanks. ...
I'm trying to use an Acces (MDB) database from a CakePHP app. On a Windows machine this works fine. On a Linux machine using Unixodbc this doesn't work at all. The error is as follows: Warning (2): odbc_connect() [function.odbc-connect]: SQL error: [unixODBC][Driver anager]Data ource name not found, and no default driver specified, SQL ...
what would be the efficient way of saving the following array using php (cakephp)? each value needs to go into a new row in the table? Array ( [0] => 6786754654 [1] => 5643564545 [2] => 344544545 [3] => 233245654654 [4] => 453454654654 [5] => 6546542323 [6] => 654654654 [7] => 645654654 etc.... ) t...
how would you turn this array: Array ( [0] => 234234234 [1] => 657567567 [2] => 234234234 [3] => 5674332 ) into this: Array ( [contacts] => Array( [0] => Array ( [number] => 234234234 [contact_status] => 2 ...
Hello all, I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal. What would be the best PHP framework to use to build this quickly, efficiently and with the smallest learning curve? I have narrowed down to CodeIgniter as the major contender for this p...
i need some help which is when i on my index.ctp/view.ctp, i need to call to my controller function to perform some task. what code i can use to perform this action? i need to call to my controller function, which send in a value (user_id) to the function and get me a certain action. how can i do that? i might calling in a javascript ...
Problem: when i have a search resultset with pagination, the links next, prev and numbers do not keep the search parameters. Seems to be a common problem. I searched everywhere on the internet, and at last i found that i should put this statement in the view: $paginator->options(array('url' => $this->passedArgs)); However, i can't ...
I've got a cakephp app that I'm trying to get to serve up the Pages::404 function (and corresponding view) whenever Cake encounters any error (missing controller, action, etc). What's the best way to do that? ...
In CakePHP, it seems like a lot of functions can take their arguments as nested, multidimensional arrays, or as dotted strings: $this->MyModel->contain(array( 'Something', 'Something.Else', 'Something.Else.Entirely' )); $this->MyModel->contain(array( 'Something' => array( 'Else' => 'Entirely' ) )); Therefore, I fig...
Hi All, I'm trying to create a cron job that will send a weekly newsletter. I tried creating a shell task following what Cakephp manual says. Then I go to the Media Temple Cron jobs and type in the following: php /home/#####/domains/domain.com/html/cake/console/cake -app /home//#####//domains/domain.com/html/vendors/shells newslette...
which means, can i change the result of find() to another model using sth like: <?php fields = array('sum(vote.score) as Post__score_sum'), ?> and return: array( 'Post'=> array( 'score_sum' => 5 ) ); related: http://stackoverflow.com/questions/1611311/cakephp-pagination-sort-data-out-of-model ...
i plan to set a checkbox with selected option in my form. but i am unable to show my checkbox content in the form, i cant see any value instead of just a box for me to select. how to show value while i using checkbox? i able to show my value while i using select. this is in a HABTM model. any hints? here is my selection code. input...
Hi there, I have a model where everything is associated somehow to a single user (e.g. User->Client->Profile). Now a user should only be allowed to (C)RUD on his data (only a profile's owner should be successful accessing /profile/edit/[hisId]), so on nearly every database operation a condition like "'User.id' => $this->Session->read('A...
Using cakePHP my goal is to combine the index view of two or more controllers in one layout page. Example: I have controllers for: news, events, links. I want to show the last five entries from each table in one layout page. Also, when one of the links from the views is selected it should take the user to the respective view for that re...
Hello, I'm having an issue with one of my cake apps. It's actually pretty custom, so I'm not surprised Cake isn't handling this very special case gracefully. I want my application to have a baseUrl = 'addonmodules.php?module=phusion' I've tried a few variations of the change in my config.php: Configure::write('App.baseUrl', env('SCRI...
Hello, I have a model where I need to do some processing before saving (or in certain cases with an edit) but not usually when simply editing. In fact, if I do the processing on most edits, the resulting field will be wrong. Right now, I am working in the beforeSave callback of the model. How can I tell if I came from the edit or add...