Sometimes, or very rarely we might need to access model from controller or AppController (Application Controller). This could be for fetching values from a table and make it available for all the controllers in the application (AppController is inherited by all the other controllers). Also, often we need to access models that are not associated with a controller. I faced ... Read More »
Frameworks
Feed SubscriptionSelf join in CakePHP
I tried to explain how to do a self join in CakePHP I use this in my Gallery Model: var $hasMany = array( ‘Galleries’ => array( ‘className’ => ‘Gallery’, ‘order’ => ‘Galleries.ord ASC’, ‘foreignKey’ => ‘parent_id’)); var $belongsTo = array( ‘Galleries’ => array( ‘className’ => ‘Gallery’, ‘order’ => ‘Galleries.ord ASC’, ‘foreignKey’ => ‘parent_id’)); First, note the ‘Galleries’ (you change that ... Read More »
cakephp include javascript file in view
You probably know that if you have $scripts_for_layout in your site’s layout, then you can do a Cakephp include javascript file in view. For example, if you’d like to include ‘myScript.js’ from some view you would add the following code: $javascript->link(‘myScript’, false); Basically the second param (false), will tell CakePHP not to include the file in-line, but rather where the ... Read More »
CakePHP email handler
CakePhp email handler ’emailComponent’ (cakelibscontrollercomponentsemail.php) is a way for you to using the same concepts of layouts and view ctp files to send formatted messages as text, html or both. It supports sending via the built in mail functions of PHP, via smtp server or a debug mode where it writes the message out to a session flash message. It ... Read More »
Opening Cake THTML file with Dreaweaver CS4
Just go to: C:Program FilesAdobeAdobe Dreamweaver CS4configuration Open file: Extensions.txt edit line 16 and add THTML Save and Close the File Next, Open MMDocumentTypes.xml at C:Program FilesAdobeAdobe Dreamweaver CS4configurationDocumentTypes Add THTML online 75 : winfileextension=”thtml,php,php3,php4,php5″ macfileextension=”thtml,php,php3,php4,php5″ Save, close and Restart Dreamweaver! For more Info :- http://keithics.com/blog/article/opening-cake-thtml-file-with-dreaweaver-cs4/118/ Read More »
Cake php tutorials
At this link you can find nice cake php tutorials http://cakebaker.42dh.com/tags/tutorial/ Read More »
Jquery plugings for codeigniter
At this link you can find many jquery plugins for code ignitor http://malsup.com/jquery/form/ Read More »
developing facebook application with cakephp
Here you can find something useful for developing Facebook application in cake PHP http://facebook-developer.net/2007/10/18/building-your-first-facebook-application-with-cakephp/ Read More »
download php frameworks
you can download all PHP frameworks (popular) from this link. http://www.phpframeworks.com/php-frameworks-download/ Read More »
Pagination in codeigniter
I’ve often see forum posts asking why the Pagination class isn’t working. I decided to create a tutorial on the Pagination class for those who need to learn about the pagination class. Let’s now start with the pagination tutorial. This tutorial assumes that you have connected your CodeIgniter application to the database. First, we need to create a table. CREATE ... Read More »