Tag Archives: CakePHP

How to set Cakephp paginator url for custom Route

I was making a url route like this:

Router::connect('/ca/assets', array('plugin' => 'file_manager', 'controller' => 'file_manager', 'action' => 'assets', 'ca'));

It worked alright with normal urls as- /ca/assets. However when i used paginator in view as

echo $this->Paginator->numbers();

it generates url as- /assets/ca/page:2

I tried different things and at the end, as a work around to this problem I figured out that the following trick works. So make some heck in the $this->Paginator->options() function as the following:

$this->Paginator->options(array(
'url'=>array('controller' => 'ca', 'controller'=>'action', 'plugin'=>false)
));

CakePHP captcha support for CakePHP 2.x and 3.x

Here is the latest CakePHP Captcha support for CakePHP Version upto 3.x.

Download for CakePHP 3.x
Download for CakePHP 2.x

NOTE:For best Image Captcha results this component requires GD and Freetype support enabled. Please check your phpinfo() to know whether your server supports this (See image below). Contact your hosting provider if any of these libraries is not enabled.

Continue reading