Blogs, Forums and CakePHP

In one of my contracts, I am writing a full application with membership, conference signups, information pages, and a small little forum. This is all per the customer’s request. The solution I decided on, was CakePHP for the framework. It is not going to be a big, full site like a MySpace, or Facebook. It is a small local non-profit group who will be able to have its membership keep in touch via the site. So the main pages are not hard. Most of the pages will follow a simplistic CRUD (create, read, update and delete) format, with the site admins being able to create, update and delete most pages. But instead of having a static site, they wanted the membership to be able to interact with the authors of the pages, and themselves.

The pages are not hard to enable this. I could have just as easily installed a WordPress instance for the solution, themed it up, and be done. Which I was seriously considering, as this already has the permissions, updates, management, etc. However, they were not too happy with something like this. So I looked elsewhere. Drupal would provide a good out of the box solution, but there were problems with the modules, and it seemed to take too much overhead to get the groups, permissions and other CMS features set up for this small site. The next idea I looked at was going the CakePHP route.

The pages were easy to set up. Permissions were not too much, as they really did not need a full blown ACL/Auth module (which I wrote about earlier). Comments on pages were few, and the real design portion came to the “forum” area. They did not want a full forum, they basically wanted topics they could post to, and have the members and “others” reply to those topics. This was more of a hybrid blog/forum. The key was creating the right tables in the database.

Right now I have 2 tables, one for forums, and one for posts. Each topic is contained in the Posts table, and has an “on/off” switch to delimit it as a topic in the forum. All posts for that topic have the topic id as their “parent”. I thought of creating 3 tables, (Forums, Topics, Posts), and for a high traffic site, I may have done that as well. For right now, the two tables are good. As I get further along on this track, I will post some of the methods I used to create this concept.

One thought on “Blogs, Forums and CakePHP”

Comments are closed.