Articleshttp://bakery.cakephp.org/Latest Articlesen-usFixing 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 +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 +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 +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 +0000ThumbnailHelper, a thumbnail generator with cache dynamichttp://bakery.cakephp.org/articles/emersonsoares/2012/02/13/thumbnailhelper_a_thumbnail_generator_with_cache_dynamichttp://bakery.cakephp.org/articles/emersonsoares/2012/02/13/thumbnailhelper_a_thumbnail_generator_with_cache_dynamicOn every site I've ever worked had the problem of image thumbnails, because we always have to have thumbnails of certain images to display them in views in cakephp was no different. I found the behavior that makes MeioUpload everywhere upload images, but it uses to generate the thumbnails phpThumb but I could not use it in any way without mentioning that it would generate the thumbnail image at...HelpersMon, 13 Feb 2012 22:29:53 +0000Custom RSS-Helper that actually works with namespaces for Cakphp 2.0http://bakery.cakephp.org/articles/benni/2012/02/08/custom_rss-helper_that_actually_works_with_namespaces_for_cakphp_2_0http://bakery.cakephp.org/articles/benni/2012/02/08/custom_rss-helper_that_actually_works_with_namespaces_for_cakphp_2_0I've described my problems in [this thread] over in the cakephp google group.My own solution consists of a very simple little helper class which I posted to the bin: [Cakephp bRss Helper]For how to use it have a look at the official cakebook [here].But unlike there, use [this layout] and [this view]. Note how I ignore the 'documentData' and create the surrounding rss tag with the necessary name...HelpersWed, 08 Feb 2012 11:34:39 +0000AJAX Helper with jQuery (for CakePHP 2.x)http://bakery.cakephp.org/articles/jozek000/2011/11/23/ajax_helper_with_jquery_for_cakephp_2_xhttp://bakery.cakephp.org/articles/jozek000/2011/11/23/ajax_helper_with_jquery_for_cakephp_2_xHi!<br />On my site you can find AJAX Helper with jQuery for new version of CakePHP . <br /><br />All functions that were introduced in last version are supported and compatibile with CakePHP 2.0.<br /><br />Actual function list:<br /><ul> <li><strong>link</strong> - Returns a link to a remote action that's called in the background using XMLHttpRequest when the link is clicked. The result of that request can then be inserted into a DOM object</li> <li><strong>remoteFunct...</strong></li></ul>HelpersWed, 23 Nov 2011 07:02:23 +0000Extensible Calendar Pluginhttp://bakery.cakephp.org/articles/passionforcode/2011/10/10/extensible_calendar_pluginhttp://bakery.cakephp.org/articles/passionforcode/2011/10/10/extensible_calendar_pluginGreetings Bakers,This is the first round of this calendar, and there are many more to come. Basically, just add the helper to your controller [code]var $helpers = array;[/code]In your view, you can draw it out like this[code type=php]echo $this-Calendar-draw;[/code]The method [i]draw[/i] accepts an array of options.[b]month[/b] -- Pass a month value to specify a month [b]year[/b] -- Pass a mont...HelpersMon, 10 Oct 2011 06:34:49 +0000Youtube Helper using Youtube iFrame Player APIhttp://bakery.cakephp.org/articles/pavlatka/2011/09/09/youtube_helper_using_youtube_iframe_player_apihttp://bakery.cakephp.org/articles/pavlatka/2011/09/09/youtube_helper_using_youtube_iframe_player_api[b]Requirements[/b]The end user must be using a browser that supports the HTML5 [i]postMessage[/i] feature. Most modern browsers support [i]postMessage[/i], though [b]Internet Explorer 7 does not support it[/b]. Any web page that uses the iFrame API must also implement the following JavaScript function:[list][*] [i]onYouTubePlayerAPIReady[/i] – The API will call this function when the page has ...HelpersFri, 09 Sep 2011 07:42:28 +0000Yet Another JQuery AutoComplete Helperhttp://bakery.cakephp.org/articles/matt_1/2011/08/07/yet_another_jquery_autocomplete_helper_2http://bakery.cakephp.org/articles/matt_1/2011/08/07/yet_another_jquery_autocomplete_helper_2Create auto_complete.php in view/helpers directory.[code]?php/* * Creates a text input field that triggers an autocomplete on keyup. * * autocompleterequestitem = attribute equal to name of variable to send in ajax request * retrieve with $this-params['url']['yourvariable'] * autocompleteurl = request url to get the autocomplete terms via getJSON * autocompletetext = attribute to identify the t...HelpersSun, 07 Aug 2011 19:05:04 +0000Override HtmlHelper for Acl component. Hide links where users don't have privileges.http://bakery.cakephp.org/articles/aalexgabi/2011/07/26/override_htmlhelper_for_acl_component_hide_links_where_users_don_t_have_privilegeshttp://bakery.cakephp.org/articles/aalexgabi/2011/07/26/override_htmlhelper_for_acl_component_hide_links_where_users_don_t_have_privilegesCopy HtmlHelper in your app directory.Use $options['extern'] = true to skip right check.Find link method and just before the return statement add this code[code]function link, $confirmMessage = false) { /** * .. * ...Original code here * .... */ /** * Override link method for Acl rights checking */ $extern = false; if ) { $extern = $options['extern']; unset; } $parsedUrl = Router::parse; if && ...HelpersTue, 26 Jul 2011 12:04:49 +0000SkitterHelperhttp://bakery.cakephp.org/articles/thiagosf/2011/07/13/skitterhelperhttp://bakery.cakephp.org/articles/thiagosf/2011/07/13/skitterhelper<p>See the work: http://thiagosf.net/projects/cakephp/skitter_helper/<br />Download the files: skitter_helper.zip</p><h4>How to use?</h4><p>Download the files here and unzip the corresponding directories. Follow the steps below to install the Helper.</p><h4>1) controllers/app_controller.php</h4><p>Add the helper in your Controller.</p><code>?phpclass AppController extends Controller{ var $helpers = array;}?</code><h4>2) views/helpers/skitter.php</h4><p>Unzip the ...</p>HelpersWed, 13 Jul 2011 16:48:46 +0000"ShareThis” Social media helperhttp://bakery.cakephp.org/articles/rightwayindia/2011/06/25/sharethis”_social_media_helperhttp://bakery.cakephp.org/articles/rightwayindia/2011/06/25/sharethis”_social_media_helperThe SharethisHelper Class?phpclass SharethisHelper extends Helper{ var $helpers = array; /** * Initial call to load the required javascript code on the page. * @param string $pubid Publisher Id; Provided in user's account at sharethis.com * @param string $wtype Widget Type; It can be either o|c [o]auth | [c]lassic * @return string $sthis A string containing the initial call of a javascript. */ ...HelpersSat, 25 Jun 2011 11:15:56 +0000Fechashttp://bakery.cakephp.org/articles/ricardosiri68/2011/06/13/fechashttp://bakery.cakephp.org/articles/ricardosiri68/2011/06/13/fechas[code]?php class FechasHelper extends AppHelper{private function segundos{if{$fa = date_parse;return mktime;}else{return false;}}public function duracion{$div_años = 31125600;$div_dias = 86400;$div_horas = 3600;$div_min = 60;$tiempo = $this-segundos - $this-segundos;$duracion = ? array : false;if{$duracion['años'] = round;$dias_sec = $tiempo % $div_años;$duracion['dias'] round;$horas_sec = $dia...HelpersMon, 13 Jun 2011 00:48:33 +0000ExcelHelperhttp://bakery.cakephp.org/articles/thiagosf/2011/05/27/excelhelperhttp://bakery.cakephp.org/articles/thiagosf/2011/05/27/excelhelper<code>?php class ExcelHelper extends AppHelper {var $filename = 'arquive';var $rows = array;var $header = "?xml version=\"1.0\" encoding=\"UTF-8\"?\<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns:html=\"http://www.w3.org/TR/REC-html40\">"; var $footer = "</Workbook>";var $worksheet_title = "Table";function getHeaders {header;header;}function addRow ) {foreach {$data[$key] = "<Cell><Data ss:Type=\"String\">![CDATA[" . $value . "]]</Data></Cell>\n";}$this-rows[] = $data;}function setTitle { $title = preg_replace ; $title = substr ; $this-worksh...</code>HelpersFri, 27 May 2011 11:13:26 +0000star rating helper with jQueryhttp://bakery.cakephp.org/articles/infest696/2011/05/21/star_rating_helper_with_jqueryhttp://bakery.cakephp.org/articles/infest696/2011/05/21/star_rating_helper_with_jquery<p>You can see see how it looks like on my blog: http://techblog.pierrekrohmer.de</p><p>It's also a sandbox available: cakePHP sandbox. There you can rate a movie. The possible ratings are stored in the database so you can create a new rating to extend the rater dynamiclly. Of course it&#39;s also possible to use the star rating without an database backend so you just have to provide an array with options.</p><h3>Fe...</h3>HelpersSat, 21 May 2011 13:53:21 +0000Jquery Engine Helper patch for updating multiple divs via AJAXhttp://bakery.cakephp.org/articles/lucabelluccini/2011/05/15/jquery_engine_helper_patch_for_updating_multiple_divs_via_ajaxhttp://bakery.cakephp.org/articles/lucabelluccini/2011/05/15/jquery_engine_helper_patch_for_updating_multiple_divs_via_ajax# Edit Cake HelperIf you want to update multiple div elements using a link or ajax call, you have to edit the file `cake/libs/view/helpers/jquery_engine.php`.In `function request.html;';It is necessary to add a check before this line of code, resulting in: if){ $success .= 'var temp = ' . $this-jQueryObject . '.html;'; foreach{ $success .= $this-jQueryObject . '.html.html);'; } } else { $succes...HelpersSun, 15 May 2011 13:47:36 +0000Number Plus Helperhttp://bakery.cakephp.org/articles/xsaint/2011/05/12/number_plus_helperhttp://bakery.cakephp.org/articles/xsaint/2011/05/12/number_plus_helper<p>I needed a method of making very large numbers more readable. For instance, taking a number like 7000 and making it 7K. It allows for setting a precision decimal value as well making 7500 look like 7.5K.</p><pre>App::import;// app/views/helpers/number_plus.phpclass NumberPlusHelper extends NumberHelper {function toReadableQuantity{if{switch{case :return $this-precision/1000,$decimals).'K';case :return $...</pre>HelpersThu, 12 May 2011 09:17:29 +0000MenuBuilder v1.0.1http://bakery.cakephp.org/articles/rifat/2011/05/08/menubuilder_v1_0_1http://bakery.cakephp.org/articles/rifat/2011/05/08/menubuilder_v1_0_1## Features* Generate menu based on current user type/group/permission/level * Provide various useful CSS class* Multi-level menu support* Supports [ACL Menu Component] by [Mark Story]* CakePHP Unit Test Check out my Git repository for details https://github.com/torifat/cake-menu_builderHelpersSun, 08 May 2011 04:41:48 +0000CakeGridhttp://bakery.cakephp.org/articles/robertross/2011/05/02/cakegrid_7http://bakery.cakephp.org/articles/robertross/2011/05/02/cakegrid_7To get cakegrid, go to https://github.com/rross0227/CakeGrid to clone it. Use issues if you find any bugs!$this->Grid->addColumn;$this->Grid->addColumn);$this->Grid->addColumn);$this->Grid->addAction, array);echo $this->Grid->generate;The README in the repo has everything you should need to know.HelpersMon, 02 May 2011 23:26:25 +0000