Articleshttp://bakery.cakephp.org/Latest Articlesen-usAWS 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 +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 +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 +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 +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 +0000Force saving with know primary keyhttp://bakery.cakephp.org/articles/2012/03/26/force_saving_with_know_primary_keyhttp://bakery.cakephp.org/articles/2012/03/26/force_saving_with_know_primary_keyAt first time insert in the app_model this function:<br /><br/><code>public function beforeSave{ parent::beforeSave; if && !is_null) { if) { $this-data[$this-alias][$this-primaryKey] = $opt['id'];} } return true;}</code><br/><br/>so, when you make a save in your code use this:<br/><br/><code>$this-save, array)</code><br/><br/>replace $fields with the fields array but NOT INSERT IN IT THE PRIMARY KEY FIELD.replace $newId with the know value of the primary key.u...ModelsMon, 26 Mar 2012 09:58:18 +0000Redis DataSource for cakePHP 2http://bakery.cakephp.org/articles/iban_1/2012/03/15/redis_datasource_for_cakephp_2http://bakery.cakephp.org/articles/iban_1/2012/03/15/redis_datasource_for_cakephp_2If you need to connect your application with Redis database , I published my Connector at github. Feel free to use it and improve it as well.<br/> Download from githubCodeThu, 15 Mar 2012 22:04:53 +0000TreeLiHelper http://bakery.cakephp.org/articles/filippi/2012/03/15/treelihelperhttp://bakery.cakephp.org/articles/filippi/2012/03/15/treelihelperNo controller coloque:[PHP]public function index{$this-loadModel;$this-set);}[/PHP]na View: [PHP]echo '<ul data-role="listview" data-divider-theme="a" data-inset="true">';echo $this-TreeView-createTree);echo '</ul>';[/PHP]Crie um arquivo com o nome TreeLiHelper.php na pasta /app/View/Helper/ com o seguinte conteudo:[PHP]App::uses;class TreeLiHelper extends AppHelper {public $helpers = array; public $link; public function createTree{ $this-link = $link;$out = '';$c...HelpersThu, 15 Mar 2012 13:24:59 +0000AjaxMultiUpload Plugin for Cake 2.0.x and 2.1http://bakery.cakephp.org/articles/srs2012/2012/03/12/ajaxmultiupload_plugin_for_cake_2_0_x_and_2_1http://bakery.cakephp.org/articles/srs2012/2012/03/12/ajaxmultiupload_plugin_for_cake_2_0_x_and_2_1# AjaxMultiUpload Plugin for CakePHPA full-blown AJAX file uploader plugin for CakePHP 2.0.x and 2.1.Using this, you can add multiple file upload behaviour to any or allof your models without having to modify the database or schema.You can click on the Upload File button, or drag-and-drop files into it. You can upload multiple files at a time without having to clickon any button, and it shows y...PluginsMon, 12 Mar 2012 22:25:21 +0000Report Manager Plugin for CakePHP 2http://bakery.cakephp.org/articles/luisedudias/2012/02/23/report_manager_plugin_for_cakephp_2http://bakery.cakephp.org/articles/luisedudias/2012/02/23/report_manager_plugin_for_cakephp_2Changelog for version 0.4* Load and Save reports* Export to XLSChangelog for version 0.3* One to many reports* Sortable fields by drag and drop * Click to add field change background color * Click in model name check/uncheck all fields * SmartWizard validation * Datepicker for date fields * Checkbox to enable counter option * Check box for one to many reports : show items with no related record...PluginsThu, 23 Feb 2012 15:50:53 +0000Sphinx Search Behavior for Cake 2.0+http://bakery.cakephp.org/articles/nabeel/2012/02/21/sphinx_search_behavior_for_cake_2_0http://bakery.cakephp.org/articles/nabeel/2012/02/21/sphinx_search_behavior_for_cake_2_0https://github.com/nshahzad/Sphinx-CakePHPBehaviorsTue, 21 Feb 2012 17:27:22 +0000CakePHP Big Data Behaviorhttp://bakery.cakephp.org/articles/jarriett/2012/02/18/cakephp_big_data_behaviorhttp://bakery.cakephp.org/articles/jarriett/2012/02/18/cakephp_big_data_behavior<h2>Background</h2><hr/><p> My company uses CakePHP for most of our applications. However, we were running into efficiency issues when working with large amounts of data. It’s not uncommon for us to insert hundreds of thousands of rows with a single process. Additionally, we needed an efficient way to work with those hundreds of thousands of pieces of data.</p><p> So, after some investigation I narrowed our efficiency...</p>BehaviorsSat, 18 Feb 2012 05:05:24 +0000reCAPTCHA Plugin for CakePHP 2http://bakery.cakephp.org/articles/jahdrien/2012/02/15/recaptcha_plugin_for_cakephp_2http://bakery.cakephp.org/articles/jahdrien/2012/02/15/recaptcha_plugin_for_cakephp_2<p><h1>1. Get reCAPTCHA key.</h1>http://www.google.com/recaptcha</p><p><h1>2. Setting.</h1>Download recaptchalib.php.<br>And put it in "Recaptcha/Vendor".<br>http://code.google.com/p/recaptcha/downloads/list?q=label:phplib-Latest</p><p><h1>3. Config.</h1>Insert keys in Recaptcha/Config/key.php .<br>&nbsp;&nbsp;&nbsp;&nbsp;$config = array,<br>&nbsp;&nbsp;&nbsp;&nbsp;);<br></p><p><h1>4. Bootstrap.</h1>if you load your plugins one by one add<br>CakePlugin::load;<br><br>ReCaptcha/Config/bootstrap.php only reads your key.php con...</p>PluginsWed, 15 Feb 2012 11:29:55 +0000