Archive for June, 2009

Math Captcha Component

30, Jun 2009

I don’t like CAPTCHAs. I don’t know anyone who does. But most forms need some sort of protection against spam, especially where heavyweight spam detection services (e.g. Akismet) aren’t suitable. The downfalls of CAPTCHAs are many – hard to read, annoying, impossible for those with vision difficulties – and the benefits are slim. So, a [...]

I read a lot about CakePHP almost every day at work, since I’m writing a CMS that will become the standard for most of our new sites. I’m constantly coming across useful tips, code, and tutorials that save me a lot of time. So I thought it might be useful to others to gather up [...]

The ability to put a website into offline or ‘maintenance’ mode seems like a pretty common request these days – it certainly was one of the more important things in the list for me when I was beginning my CMS. Thanks to the beforeFilter() method in CakePHP’s AppController, we can add the ability to turn [...]

It’s not normally a pain to add new HABTM relationships in CakePHP: just edit two the two model files, throw in some almost-stock code, and bob’s yer uncle. But I found myself in a sticky situation: I’m writing (almost done!) a general-purpose CMS, the core of which will be used by multiple sites. The ‘base’ [...]

Attachable Behavior

19, Jun 2009

It’s not normally a pain to add new HABTM relationships in CakePHP: just edit two the two model files, throw in some almost-stock code, and bob’s yer uncle. But I found myself in a sticky situation: I’m writing (almost done!) a general-purpose CMS, the core of which will be used by multiple sites. The ‘base’ [...]

New Theme

19, Jun 2009

Trying out a new WordPress theme (again) – the layout is still familiar but I think it’ll work out better. More CakePHP code coming tonight.

In the course of developing my general purpose CakePHP CMS, I needed a way to manipulate the meta tags, page title, and page heading for every URL in the website. Now, this task is pretty simple when dealing with the pages controller – just add the appropriate meta columns to the pages table and you’re [...]

In one of my side projects, which I’m currently refactoring to use CakePHP, I needed to have certain dynamic (i.e. database-retrieved) elements on every page: the three latest entries from the articles section, certain user details, etc. I could add a whole lot of models to the $uses array of my individual models or AppModel, [...]


top