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
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:
'url'=>array('controller' => 'ca', 'controller'=>'action', 'plugin'=>false)
Got a working copy of https://blueimp.github.io/jQuery-File-Upload/ file upload plugin for CakePHP 2.5.5 built as a plugin. Forked and modified from the original repository https://github.com/hugodias/FileUpload into https://github.com/inimist/FileUpload to incorporate latest files and functionality. Continue reading
Relating to a post I submitted a while back, along with creating a data connection on the fly I had to switch between two connections. That is, file based default connection and a dynamic connection based on user. Here is the scenario. Continue reading
I had a directory named sites added to my git repository. As it contained a bootstrap file having names of each new domain in multiple sites setup hosted in the single CakePHP application it contained different domain entries and folders as compared to my application in my local machine. Continue reading
As you know one would generate the cakephp table schema as:
$ cake schema generate
Want to switch between different databases in a CakePHP action? Do you want to use different database for different clients or sites? Don’t worry the solution more simpler than you thought it to be.
Following this link and few other similar links this is how I connected to different datasource in CakePHP. Continue reading
I am in a Task model.
I build following options to load the Task and associated User model data. Continue reading
I have a database table field defined as decimal(10,5). I want to use it for various purposes so I don’t want to change the datatype. In most of the forms however I want to keep this field showing none or very limited number of decimal points. Continue reading
Here’s an example of CakePHP Containable behaviour. Although, it was not a very complex find call but the beauty of the containable is this that you can fetch records using “tricky ways” which normally may not be possible with straight associations find calls. Continue reading
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.