2009 Archives
Jun
Coming soon: Cake tutorials
by George in Computing, Uncategorized, Web Development
I’ve just installed the SyntaxHighlighter plus plugin for Wordpress! I think it looks pretty cool…
/**
* Handles a soft delete of a record i.e. one that sets the Model.status field to 0
*
* @param string $id The id of the record to delete
* @return bool success or not
* @author George Edwards
*/
function __delete($id) {
$model = $this->name;
$record = $this->find('first', array('conditions' => array($model.'.status' => 1, $model.'.id' => $id), 'recursive' => -1));
if ($record) {
// we have a result from the find
// set the id to work with
$this->id = $id;
// try to save the info
if ($this->saveField('status', 0)) {
return true;
}
}
return false;
}
Also, watch this space, as I hope to publish a couple (or at least a mini-series) of CakePHP tutorials soon. I thought it’s about time I gave something back to the Cake community and to those people who are struggling to get to grips with the framework.
May
2009 Update
by George in Computing, Site Issues, Thoughts, Web Development
Well it’s been a while… a very long while.
First things first – you will have noticed a theme change. Previously I was using a custom WordPress theme that I’ve grown bored of. So recently I’ve decided to change it in order to inspire me to blog a bit more. This seems to have worked well so far, as I’m writing this!
Secondly, one interesting thing I’ve been meaning to share. I use TextMate a lot, and recently went on the hunt for a decent new theme that works well in highlighting different types of syntax. Then I discovered Monokai. Put simply, it is pure syntax highlighting beauty and works a treat when I’m coding in the usual (x)HTML, CSS and PHP. I particularly find it works well with OO PHP and more specifically, CakePHP, which I am now using pretty much everyday.
So go download it, you won’t be disappointed!

A preview of some CakePHP client work using Monokai TextMate highlighting