Author Archives: cakebaker

cakebaker moves to a new kitchen

After some thoughts I decided to leave the kitchen and to move to my own kitchen where I will have more freedom. What does that mean for you? Well, for you the urls change. The new urls are respectively for the RSS feed. I am sorry for the inconveniences… This is the […]


As I got an invitation to test the pic2color service, here a short review. The goal of pic2color is to extract a color scheme from an image. It is an interesting idea, but the service is not really practical yet. You can select or upload an existing image, and it creates a WordPress theme with […]

Getting Things Read

As a blog reader you probably know the “problem” of the daily information flood from the blogosphere. If you have subscribed dozens of feeds you usually get dozens of new posts a day. In this post I will show you how I deal with that “problem”. My strategy consists of two elements: scanning phases and […]

Don’t forget to exit after a redirect

Last weekend I discovered something I was not aware that it works that way: that code defined after a redirect is executed. A simple example: class UsersController extends AppController { function beforeFilter() { // not logged in, so redirect to the login page $this->redirect(‘/login’); } function delete($id) { $this->User->delete($id); } } This example redirects _and_ […]

findABaker job board started

This week there was a discussion in the IRC channel about a missing job board for cake related jobs. VoilĂ , here it is: findABaker. Feedback is as always welcome :) Btw: I switched to a minimalist blog theme which should fix the issues with displaying code snippets in some browsers (and it is a good […]

Selecting data in a specific date range

Sometimes, you have to return all objects created in a specific date range, e.g. you want to return all posts created in the last thirty days. Thanks to the nice functions for date operations provided by MySQL this task is simple: $this->Post->findAll( ‘WHERE Post.created >= DATE_SUB(CURDATE(), INTERVAL 30 DAY)’);


An interesting site: CSSplay provides a lot of examples of what can be done with CSS. It is impressive what can be done with CSS (especially for someone like me who often struggles with CSS *g*).

YAML in a cake? No, thank you!

While implementing fixture support in the testsuite the question arised which format should be used for the fixtures? The first answer was: YAML, of course. It is used in Ruby on Rails, so it cannot be bad ;-) Hm. Let’s have a look at a simple YAML example: // urls.yml cakephp: id: 1 name: CakePHP […]

Updating multiple divs with Ajax. Without crashing Firefox

In an earlier post I showed you how you can update multiple divs with Ajax. But there was one problem: it crashed Firefox on my machine, and other people reported the same problem, whereas it worked for others… In a comment, Josh Southern, pointed me to the cause of the problem: the “latest” version, 1.4, […]

Take over the “control” of some urls from CakePHP

By default, CakePHP takes full “control” of all URLs at the point where it is installed. Sometimes that behaviour is not desired. For example, my hoster defines an url like where the statistics are available. If I install CakePHP in the root, this url no longer works resp. causes an error in CakePHP. The […]