Posting for, someone searched for terms “cakephp what is the difference between app:import model and loadmodel” and “cakephp what is the difference between app:import and loadmodel” and landed on my blog page but unfortunately i could not provide the answer that time, perhaps. I hope it helps future visitors with similar queries. Continue reading
Category Archives: CakePHP
SQL dump file for CakeDC comments plugin for CakePHP
If they (CakeDC people) don’t have complaint of any kind or whatsoever i would like to post the SQL dump code for comments table used in CakeDC comments plugin. Especially, those having problems with generating database table or query through cake console could find this sql dump useful. But, before using this dump, please try to compare it with the latest schema file that could be found in config/schema.php file of the plug-in, it is possible that they might have altered the structure of the table in the meantime (It is Nov 02, 2010 today), so please use it at your own risk. Continue reading
Auto linking text string having image tags using Text Helper in CakePHP
Recently I found that auto linking urls and emails of a string having image tags within was not possible using text helper in CakePHP. It would try to autoLink url of image src and thus it is broken. I am not sure what the issue is in including a fix or solution which could avoid image tags while auto-linking. Then, perhaps you would have to consider other tags like object src and video urls etc. In fact it would be too tedious to handle all kind of html tags and so and so.. Continue reading
Field type tinyint(1) would not save values other than 0 and 1 in CakePHP
Just a quick note. I had a “is_active” field in my users table which i had been using to store boolean 0 and 1 values. Later, i mean today, i decided to save a new value -1 to this field but when i did try, it would’t save -1 and would always save it as 1. After looking at a few blog posts around the web i found that in CakePHP every time you try to save a value other that 0 or 1 into a tinyint(1) field it would save it as 1 (as according to Nate, Continue reading
Croogo – A free open source CakePHP powered CMS for PHP
Croogo is a free web based CMS (Content Management System) for PHP built on the top of CakePHP MVC framework. It was first released on October 07, 2009 by Fahad Ibnay Heylaal. It’s latest version is Croogo-1.3.2 and it could be downloaded here. Continue reading
New improved CakePHP cookbook documentation
Gone are the old days when CakePHP developers would complain about the in-sufficient documentation available in CakePHP. CakePHP community has not only improved existing documentations but going a step further they have added separate tabs for all three main versions (1.1, 1.2, 1.3) to make it easy for the readers to switch into one version and another. Continue reading
CakePHP 1.3.4 released, 2.0 on the way!
The CakePHP core team announded the release of CakePHP 1.3.4 recently (on Sep 12, 2010). It was almost within month since the last CakePHP release i.e. 1.3.3. The team announced that there had been a few changes which could affect applications built in 1.3.3. Continue reading
Use of custom displayField paramater in CakePHP
The $this->displayField is used to define custom display field while doing ‘list’ or scaffolding in CakePHP. It can be specified either in Model class or just before making a db call. Continue reading
Using Inflector singularize and camelize for taking out model name in CakePHP
We can use CakePHP library’s Inflector::singularize() and Inflector::camelize() methods for taking out corresponding model name from a controller name (provided we follow CakePHP’s naming conventions well). Continue reading
Security component black hole, form submit dies on a blank page with no error
The problem started when i used Auth component in my current CakePHP project. Everything seemed working fine until i created an html form, submitted it and tried to retrieve this form’s data in controller action. I tried to print $this->data in controller action but it showed nothing and ended on a blank white page (which is called “blackHole” in Security component’s language). Continue reading