Articleshttp://bakery.cakephp.org/Latest Articlesen-usCakeFest 2012http://bakery.cakephp.org/articles/predominant/2012/05/08/cakefest_2012http://bakery.cakephp.org/articles/predominant/2012/05/08/cakefest_2012CakeFest is the annual CakePHP Conference. It brings together developers, users, and interested parties from all over the world for a four day event filled with workshops, talks, dinners, social events and plenty of fun!If you are interested in giving a talk at CakeFest, we still have submissions open! Just head over to the [CakeFest], sign up and submit your talk proposal via your account page...NewsTue, 08 May 2012 08:34:36 +0000CakePHP 2.1.2 & 2.2.0-beta releasedhttp://bakery.cakephp.org/articles/markstory/2012/04/30/cakephp_2_1_2_2_2_0-beta_releasedhttp://bakery.cakephp.org/articles/markstory/2012/04/30/cakephp_2_1_2_2_2_0-beta_released<p>The CakePHP core team is proud to announce the immediate availability of both CakePHP 2.1.2 [1], and 2.2.0-beta [2]. 2.1.2 is a bugfix release for the 2.1.x branch, while 2.2.0-beta is the first release for 2.2.x.</p><h2>CakePHP 2.1.2</h2><p>There are a number of bugfixes in 2.1.2, the most notable of those changes is:</p><ul><li><tt>Set::insert</tt> now overwrites values that were previously string values.</li><li>AuthComponent now uses <tt>l...</tt></li></ul>NewsMon, 30 Apr 2012 01:58:38 +0000AWS SES component for CakePHP2.0 +http://bakery.cakephp.org/articles/kvijay/2012/04/24/aws_ses_component_for_cakephp2_0http://bakery.cakephp.org/articles/kvijay/2012/04/24/aws_ses_component_for_cakephp2_0We use Amazon services for our day today applications & we use their SDK & write normal code to required controllers, So we planned to create a component for AWS service.Amazon Simple Email Service is a very popular email SMTP service by Amazon. It has lots of advantages like, Easy to use Good documentation Good fault tolerance Easy to integrate with existing architecture Detailed reporting abo...ComponentsTue, 24 Apr 2012 13:49:54 +0000Breadcrumbs trail for unordered pageshttp://bakery.cakephp.org/articles/webrene/2012/04/23/breadcrumbs_trail_for_unordered_pageshttp://bakery.cakephp.org/articles/webrene/2012/04/23/breadcrumbs_trail_for_unordered_pagesI also played with $referer variable, back button usage and javascript back-functions but in the end the trac was always getting kind of mixed up by functions / methods like save, edit, etc. This Component/Helper pack will allow you to customize methods and controllers to be ignored and to display a nice, clickable trail in the form ofComponent Component Component2 This bundle consists of a C...ArticlesMon, 23 Apr 2012 15:12:08 +0000GoogleChart helperhttp://bakery.cakephp.org/articles/segy/2012/04/23/googlechart_helperhttp://bakery.cakephp.org/articles/segy/2012/04/23/googlechart_helper<p>I needed simple access to Google Chart API for generating images. Please see examples below and method comments in source file to see how it works.</p><p>This plugin is for CakePHP 2.x</p><p>Example:</p><code>// Controller:public $helpers = array;</code><p>&nbsp;</p><code>// View:// example of bar chartecho $this-GoogleChart-create-setType)-setSize-setMargins-addData)-addMarker)-addData)-addMarker)-addAxis))-addAxis);// example of pie chartec...</code>PluginsMon, 23 Apr 2012 07:45:31 +0000from Cake to Bakehttp://bakery.cakephp.org/articles/mainiabhay/2012/04/22/from_cake_to_bakehttp://bakery.cakephp.org/articles/mainiabhay/2012/04/22/from_cake_to_bake1. Download the latest version of Cake from http://cakephp.org/2. Go to your Download folder , Extract the folder in the same location.3. Move the folder to your application root. if you face permission denied while copy/paste, use "gksu nautilus" to open the target location.4. Rename the folder, MyCake5. Use this to change permissions, "sudo chmod -R 777 /var/www/MyCake/"6. Delete the folder n...ArticlesSun, 22 Apr 2012 23:18:10 +0000Prevent render layout elements with the render of some views!http://bakery.cakephp.org/articles/saidbakr/2012/04/20/prevent_render_layout_elements_with_the_render_of_some_viewshttp://bakery.cakephp.org/articles/saidbakr/2012/04/20/prevent_render_layout_elements_with_the_render_of_some_viewsConsider the following example, there is an element that displays the top searched keywords and it is named top_searches.ctp. This element is placed in the layout to be rendered under the search box element.Suppose now, we have an index view that lists all searched keywords and we don't want to make the top_searches elements to be rendered while we call the index view.We should add the followin...SnippetsFri, 20 Apr 2012 00:07:03 +0000Fixing and improving the TextHelperhttp://bakery.cakephp.org/articles/darkdragon/2012/04/20/fixing_and_improving_the_texthelperhttp://bakery.cakephp.org/articles/darkdragon/2012/04/20/fixing_and_improving_the_texthelper[b][u]General[/u][/b]I created a new helper which the following file in "/app/view/helpers/Text2Helper.php":[code]?phpApp::import;class Text2Helper extends TextHelper {public function function_name {// some code// if you want to extend functionality, maybe you want// to call the parent functionparent::function_name;}}?[/code]You can overwrite and create new functions in this file.Note that you ...HelpersFri, 20 Apr 2012 10:05:13 +0000User Management Premium Plugin for cakephp 2.xhttp://bakery.cakephp.org/articles/chetanvarshney/2012/04/16/user_management_premium_plugin_for_cakephp_2_xhttp://bakery.cakephp.org/articles/chetanvarshney/2012/04/16/user_management_premium_plugin_for_cakephp_2_xI have launched premium version of User Management PluginDemo at http://umpremium.ektasoftwares.comThere are lots of features and you will like them definitely......So guys don't go here and there just look these features at demo site. PluginsMon, 16 Apr 2012 18:24:06 +0000SELECT FOR UPDATE (hack) (kind of ugly but it works) (PostgreSQL and MySql)http://bakery.cakephp.org/articles/arod/2012/04/14/select_for_update_hack_kind_of_ugly_but_it_works_postgresql_and_mysqlhttp://bakery.cakephp.org/articles/arod/2012/04/14/select_for_update_hack_kind_of_ugly_but_it_works_postgresql_and_mysqlSometimes one needs to do a SELECT ... FOR UPDATE in order to preserve the integrity of our transactions. The problem can be seen easily with the following example:Suppose we have a user, an `account table` with the `account.available_money` field on it. Suppose the user has initially $100.The problem arrives if the hacker manages to concurrently run two processes ` and `save` are shown) :One p...ArticlesSat, 14 Apr 2012 04:16:22 +0000CakeApp with TwitterBootstraphttp://bakery.cakephp.org/articles/alairock/2012/04/13/cakeapp_with_twitterbootstraphttp://bakery.cakephp.org/articles/alairock/2012/04/13/cakeapp_with_twitterbootstrapTwitter Bootstrap appears to be a very successful CSS framework, and I must agree. There is a js library that you can include which will help you get TB setup, but I wanted to take it one step further.I created "CakeApp" Which is a CakeApp with some niceties already added in there for you. Including Jquery and a pre-configured TB, which should have everything as of 4/13/12. Also, the homepage h...CodeFri, 13 Apr 2012 22:21:53 +0000Zhen CRM: open-source CakePHP CRM applicationhttp://bakery.cakephp.org/articles/telerim/2012/04/13/zhen_crm_open-source_cakephp_crm_applicationhttp://bakery.cakephp.org/articles/telerim/2012/04/13/zhen_crm_open-source_cakephp_crm_applicationWe are pleased to announce the release of Zhen CRM, an open source CRM solution built on CakePHP.Project page: http://telerim.github.com/Zhen-CRM/GitHub project: https://github.com/telerim/Zhen-CRMWhile this does not have the complicated features of enterprise CRMs, it has the basic features that most small businesses could use - such as contacts, tasks, "deals" and a calendar.In contrast to th...Case StudiesFri, 13 Apr 2012 04:27:04 +0000Helper TinyMCE for CakePHP 2http://bakery.cakephp.org/articles/galitul/2012/04/11/helper_tinymce_for_cakephp_2http://bakery.cakephp.org/articles/galitul/2012/04/11/helper_tinymce_for_cakephp_2[h3]TinyMCE[/h3]1. Download TinyMCE : [url]http://www.tinymce.com/download/download.php[/url] 2. Copy [i]/tinymce/jscripts/[b]tiny_mce[/b][/i] folder to [i]/app/webroot/js[/i] .[h3]Controller[/h3][code]public $helpers = array;[/code][h3]Helper code[/h3]app/View/Helper/TinymceHelper.php[code]?php App::uses; class TinymceHelper extends AppHelper { // Take advantage of other helpers public $helper...HelpersWed, 11 Apr 2012 09:11:44 +0000Custom Fields Plugin for CakePHP 2.xhttp://bakery.cakephp.org/articles/srs2012/2012/04/11/custom_fields_plugin_for_cakephp_2_xhttp://bakery.cakephp.org/articles/srs2012/2012/04/11/custom_fields_plugin_for_cakephp_2_xGitHub page: https://github.com/srs81/CakePHP-CustomFields# CustomFields Plugin for CakePHPA custom fields plugin for CakePHP 2.x. Now you can add custom fields to your CakePHP app and individual models/controllers without having to worry about database changes.## How to Use### Download or checkoutYou can either download the ZIP file:https://github.com/srs81/CakePHP-CustomFields/zipball/mastero...PluginsWed, 11 Apr 2012 03:10:16 +0000Auth – inline authorization the easy wayhttp://bakery.cakephp.org/articles/euromark/2012/04/07/auth_–_inline_authorization_the_easy_wayhttp://bakery.cakephp.org/articles/euromark/2012/04/07/auth_–_inline_authorization_the_easy_way### Status quoWe would need to check the session manually against the roles we want to grant access to. This can get pretty hairy with more than one role allowed .### PreparationsWe first need to make the class usable by putting this in our `/Config/bootstrap.php`:// these IDs match the role_ids in the DBdefine;define;define;define;// enable the Auth classApp::uses;I like to use constants as th...SnippetsSat, 07 Apr 2012 12:35:42 +0000AddressFinderHelper, a widget for cakephp 2.x formshttp://bakery.cakephp.org/articles/-Ste-/2012/04/06/addressfinderhelper_a_widget_for_cakephp_2_x_formshttp://bakery.cakephp.org/articles/-Ste-/2012/04/06/addressfinderhelper_a_widget_for_cakephp_2_x_formsThe helper is based on http://tech.cibul.net/geocode-with-google-maps-api-v3/ - most of the credit goes to their script.The code and usage instructions on Github:https://github.com/stefanomanfredini/AddressFinder-Helper---Plugin-for-cakephp-2I started using cakephp 2.x quite recently - this is my first helper for cakephp 2.x.. suggestions are welcome!HelpersFri, 06 Apr 2012 11:04:11 +0000Minify plugin for CakePHP 2.0+http://bakery.cakephp.org/articles/maurymmarques/2012/04/04/minify_plugin_for_cakephp_2_0http://bakery.cakephp.org/articles/maurymmarques/2012/04/04/minify_plugin_for_cakephp_2_0### InstallationYou can clone the plugin into your project ):`cd path/to/app/Plugin or /plugins``git clone https://github.com/maurymmarques/minify-cakephp.git Minify`Bootstrap the plugin in app/Config/bootstrap.php:`CakePlugin::load));`### ConfigurationSet the configuration file in your app/Config/core.php`Configure::write;`If you do not want to use compression, set false.Create a folder called...PluginsWed, 04 Apr 2012 02:09:17 +0000PhpExcel helper for generating excel fileshttp://bakery.cakephp.org/articles/segy/2012/04/02/phpexcel_helper_for_generating_excel_fileshttp://bakery.cakephp.org/articles/segy/2012/04/02/phpexcel_helper_for_generating_excel_files<p>PHPExcel is a great library that can create XLS files. For more information see PHPExcel project homepage.</p><p>I added method for setting font and for easy table data adding .</p><p>This plugin is for CakePHP 2.x</p><p>Short example:</p><code>// Controller:public $helpers = array; </code><p>&nbsp;</p><code>// View:$this-PhpExcel-createWorksheet;$this-PhpExcel-setDefaultFont;// define table cells$table = array, 'width' = 'auto', 'filter' = true),ar...</code>PluginsMon, 02 Apr 2012 09:36:56 +0000CakeHtmlHelper speed up your site enabling html cache - Cakephp 2.xhttp://bakery.cakephp.org/articles/eugenioclrc/2012/04/01/cakehtmlhelper_speed_up_your_site_enabling_html_cache_-_cakephp_2_xhttp://bakery.cakephp.org/articles/eugenioclrc/2012/04/01/cakehtmlhelper_speed_up_your_site_enabling_html_cache_-_cakephp_2_xOkey, first you must have mod_rewrite enable to make the html cache working;[code]<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_METHOD} ^GET$ RewriteCond %{DOCUMENT_ROOT}/cache/$1/index.html -f RewriteRule ^$ /cache/$1/index.html [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^$ index.php?/$1 [QSA,L]</IfModule>[/code]Now create the helper in the file View/Helper/CacheHtm...ArticlesSun, 01 Apr 2012 03:47:28 +0000ToastyCMS a CMS for people who love bread that is baked twicehttp://bakery.cakephp.org/articles/icompuiz/2012/03/28/toastycms_a_cms_for_people_who_love_bread_that_is_baked_twice_1http://bakery.cakephp.org/articles/icompuiz/2012/03/28/toastycms_a_cms_for_people_who_love_bread_that_is_baked_twice_1I didn't follow any real software process so I lack documentation. I am still working on it but I am looking for some feedback. I have included some getting started information https://github.com/icompuiz/ToastyCMS/blob/master/READMEIt is built on CakePHP 2.0.1.I am thinking about reimplementing it with cakephp 2.1.1 and using more of the cakephp conventions like plugins to support extensibilit...General InterestWed, 28 Mar 2012 17:29:49 +0000