Category Covered

Cakephp acl makes application slow  

If you are using ACL on cakephp you may face that the application is very slow because its load a lot of query from database.  My application became very slow but right not its in a faster than the last moment.   So you have to be very careful on the following thing to make it speed up. Make sure that your database is normalized properly You index field properly You table engine is innoDB. If you dont  
By: Tech writer  |   Total Read: 974  |   Read more..

How to encrypt and decrypt data on cakephp url  

Encrypt your secret password with my_key

$secret = Security::cipher('my secret value', 'my_key');

By the follwoing line you can decrypt your secret vale

$nosecret = Security::cipher($secret, 'my_key');  
By: Tech writer  |   Total Read: 2765  |   Read more..

CSS stylesheet not working on mail body  

Style not found on my email? I have a cakephp application and on the application i have a style sheet that i added on my page like echo $this->Html->css('style.css');   I have a mail function on cakephp and added to class which are being used on the mail. But i am not geting any property from that CSS. Your css will not work on that way. There are two way you can use css on your email Inline CSS on your mail body Incl  
By: Tech writer  |   Total Read: 610  |   Read more..

how to validate cakephp form using jquery  

  To validate cakephp form using jquery follow the most easiest step using jquery validation. Add jquery to your default or any layout for that page For example here is the cakephp function that you want to validate by jquery on both client and server side       function add() {
        if($this->data['Enquiry']['form_submit']=='yes'){
       &  
By: Tech writer  |   Total Read: 8529  |   Read more..

cakephp auth configuration  

If you want your cakephp website with user registration and want differenet types of user then this tutorial will help you. At first you will be needed to add Auth component on your controller.

class UserController extends AppController {
var $components = array('Auth');

On every controller you need to add the following things

public function beforeFilter() {
parent::beforeFilter(); $thi  
By: Tech writer  |   Total Read: 714  |   Read more..

cakephp how to get the current url  

To get the cakephp current url just use the following code <?php debug($this->params['url']); ?> Or You may also try with  <?php echo $this->here; ?>  
By: Tech writer  |   Total Read: 667  |   Read more..

Cakephp search pagination result not working on 2nd page  

If you use any search functionality on your cakephp application then  paginate not working on search results  the pagination may not work on the second page. Firstly, I would recommend not using a POST for your search form.  Use a GET instead. Then you have to use the code on search function just before the cakphp pagination condtions  
By: Tech writer  |   Total Read: 1380  |   Read more..

cakephp dropdown list without id  

After baking i got a generated code on drop down list of category in the form where category id is showing instead of category name. If this is the case then you can use the fields on the arrey as i did on the sample. $categories = $this->Content->Category->find('list', array('fields'=>'name','order' => array('name' => 'asc')));   $this->set(compact('categories'));  
By: Tech writer  |   Total Read: 1090  |   Read more..

cakephp ajax pagination using jquery  

If you want paginate data in cakephp using jquery then just follow the step. Suppose you are in index.ctp page and already your pagination is working as cakephp format. Now replace your pagination div with the following code.            
<div class="paginator">
        <?php echo $paginator->first(' First ', null, null, array('class'  
By: Tech writer  |   Total Read: 6674  |   Read more..

cakephp update query  

To update on cakephp just use the way.   $this->data['Model']['id'] = $id;
$this->data['Model']['status'] = 0;
$this->Model->save($this->data);  
By: Tech writer  |   Total Read: 1616  |   Read more..
Top 15 Posts
Google+