Skip to content

The Bakery, Everything CakePHP
Syndicate content
Recent Articles at The Bakery.
Updated: 3 hours 53 min ago

AggregateCache Behavior

Mon, 08/23/2010 - 09:17
AggregateCache behavior caches the result of aggregate calculations (min, max, avg, sum) in tables that are joined by a hasMany / belongsTo association. I usually think of aggregates as being easy to calculate when needed, though in situations where the aggregate value is needed more often than the underlying data changes it makes sense to cache the calculated value. Caching the result of the aggregate calculation also makes it easier to write queries that filter or sort on the aggregate value. This behavior makes caching the result of aggregate calculations easy. AggregateCache is based on the CounterCache behavior (http://bakery.cakephp.org/articles/view/countercache-or-counter_cache-behavior).
Categories: Open Source

Persian Date Helper

Mon, 08/23/2010 - 09:08
As there is no method for using Persian dates in PHP we had to use some codes to convert the dates. Using this helper you can convert the dates in a view. Use pdate_format() just like date() function in PHP. Note: It seems that some Persian characters are missing in the code below, please download the helper from here: http://hemmat.net/downloads/persian_date_component.zip
Categories: Open Source

Configure Plugin

Sun, 08/22/2010 - 14:57
Override and set new values from an admin interface. Allowing you to distribute a default /app/configs/core.php and then customize it for a specific installation of a site. Updated to work with the newest RC of cake 1.2. Replace your plugins/configs/vendor/import.php with the new one in this article.
Categories: Open Source

Sexy Cake with Krumo: Say Goodbye to print_r()

Sun, 08/22/2010 - 14:45
Debugging nested arrays with print_r() can be wicked tough but Krumo makes this task a little less crack-a-lackin.
Categories: Open Source

How to build a Digg or Reddit clone with CakePHP

Sun, 08/22/2010 - 07:05
Bump or dump? That’s the theme behind the newly launched Link Bump (http://www.linkbump.com), where users "bump" the most interesting videos and news to the top and "dump" the trash into oblivion. The website was created with CakePHP and MySQL.
Categories: Open Source

CakePHP 1.2.8 released

Sat, 08/21/2010 - 22:05
The CakePHP development team is happy to announce the release of CakePHP 1.2.8. 1.2.8 is a maintenance release for the 1.2 branch and contains bugfixes and optimizations for features found in 1.2.
Categories: Open Source

Debugging with FirePHP

Fri, 08/20/2010 - 07:22
This is a quick hack to have the debugger use FirePHP for debugging.
Categories: Open Source

AJAX star rating plugin

Thu, 08/19/2010 - 16:43
In the days of social networks, you often want to give users the possibility to rate things and to show the average rating. The most common user interface implementation is a star rating system. This plugin offers you an easy, customizable way to enable your users to star rate any CakePHP model you want.
Categories: Open Source

Component to send SMS/text messages

Sat, 08/14/2010 - 18:25
This is a quick guide demonstrating the use of the PanaceaSms component (written for the Panacea Mobile SMS Gateway / www.panaceamobile.com / free test credits given) which allows you to easily send SMS from your application, as well as receive delivery reports.
Categories: Open Source

Optimizing Model loading with LazyModel

Tue, 08/10/2010 - 16:22
If you are running PHP5, this is what you need. This LazyModel optimizes the loading of the models. It limits the number of loaded models to only the ones that are actually used. When using this, you can improve speed and decrease memory usage significantly. You should use LazyModel in every project you build. That said, it is easy to see this as so called ‘premature optimization’ and maybe it is, but adding this to your project will only take like 10 seconds and it will pay off most of the time.
Categories: Open Source

Model Repletion

Sun, 08/08/2010 - 16:17
Take a quick look at some of the common model related issues that affect many users in #cakephp, and potential solutions to keep your controllers skinny, and fatten up your models.
Categories: Open Source

CakePHP 1.3.3 rainbow icing edition released

Sun, 07/18/2010 - 22:59
The CakePHP development team is happy to announce the release of CakePHP 1.3.3[1]. 1.3.3 is a maintenance release for the 1.3 branch and contains bugfixes and optimizations for features found in 1.3.
Categories: Open Source