Introducing CakeBattles

20th November 2008 CakePHP
CakeBattles

CakeBattles is an online application that allows Contenders to be pitted against each and allows users to vote on who/what would win. Each Contender can be assigned to multiple Tags which are used to create battles with similar Contenders. Each Contender can also have multiple images and these are displayed at random to keep the battles fresh.

The application was written in CakePHP and was inspired from CommandShift3 which allows users to vote on website designs. I wanted to create something similar and have been developing it in my spare time between work and freelance projects with the intent to release it online.

An example of the application in action can be seen here. Whilst developing the application I wanted to look at something pretty so I've used a bunch of hot women but I've tried to make the system as generic as possible and anything could be used e.g. films, TV shows or music albums.

6 comments Read More

Using Ajax to Populate a Select Box in CakePHP

16th October 2008 CakePHP jQuery

My apologies for the lack of articles recently, after completing the monster Dvd application I've been pretty busy with regular work and a few freelance gigs. In a project I've been working on I had to dynamically grab some data and then use it in a select box, I thought this would be a great example to go through since its quite a common process in web development.

In this article I'm going to be using jQuery as my Javascript library, I know that CakePHP has built in support for script.aculo.us but its something I've never used and jQuery will do the job just fine.

2 comments Read More

Full CakePHP 1.2 App Part 12

5th September 2008 CakePHP
CakeCatalog Main Index Page

OK so finally the full CakePHP application is coming to a close and this article is just going to wrap up a few loose ends. I've noticed a few errors and layout issues that I'm going to fix and hopefully by the end of the article the app will be fully complete.

Like all applications you could probably keep going forever adding new features, tweaking code and cleaning things up but there must come a time when you have to release it and the close the door. After this I probably wont be adding more features for some time but I do have a few ideas about great features you could try and implement.

The application can be found online at cakecatalog.jamesfairhurst.co.uk with a few more DVDs added.

15 comments Read More

Validating CakePHP Data From Another Model

29th August 2008 CakePHP

In this article I'm going to go through the steps of validating CakePHP data from another Model. More specifically if you are building a Blog Application this article will demonstrate a way of validating Comment data if the add comment form is on the Post view Page.

This is something which pops up frequently on the CakePHP Google Group and is something that I've always wanted to achieve but never got round to coding a solution.

3 comments Read More

CakePHP Image Resizer

21st August 2008 CakePHP

I'm currently in the process of building a new CMS in CakePHP and wanted to beef up the image capabilities so that I could upload an image once and then be able to resize the image on the fly by specifying a width/height.

I found a nice plain PHP script which does the job but I wanted something that works with CakePHP so I initially went the Helper route using this I found in the bakery. Although this is great I really wanted to resize images by changing values in the url and this is what I came up with.

1 comment Read More

Recently Watched Films

Mr Brooks Rec Pathology Diary of the Dead

TV Shows

The Shield Flight of the Conchords

Site by James Fairhurst 2008, all rights reserved and all that malarky