Code Exchange Forums

Note: this is one of a series of posts about the creation of the King Design web site.

One of the new customer resources launched with the new King Design web site are private Code Exchange forums for Tasks Pro™ and Tasks customers. In these forums, my customers can discuss customizations and changes they have made or wish to make to the products.

PunBB 1.1.x didn’t have any mechanism for restricting access to forums to only certain users, so I was looking into ways I could add this functionality in. About that time, I was contacted by one of the folks working on PunBB 1.2 and had a chance to see early versions of 1.2 (and did some Mac browser compatibility testing of the new code).

When I found out what was coming in PunBB 1.2, I decided it would be better to wait and use the groups features of PunBB 1.2. It’s always better to make as few changes as possible. The decision to wait for 1.2 postponed the launch of the Code Exchange forums by a few months.

Since the forums are intended to be used to post and discuss HTML, PHP, Javascript and CSS code, I thought it was important to make code display nicely in the forums.

I initially looked at using Dunstan Orchard’s excellent syntax coloring code; I even modified it so that it would return the code for display in a page instead of outputting to a file. However, integrating this into the forum was still going to require mucking with PunBB’s internals – in the BBCode realm that I wanted to stay far, far away from. 🙂

Luckily for me, Alex Gorbatchev released a JavaScript syntax coloring script before I got around to working on the PunBB integration. I had to make a few changes in the script to make it work with the PunBB output, but the results are pretty good. You can see a sample of it in action here. I’ll try to package it as a mod for PunBB soon.

One related note: I was receiving pressure to launch the Code Exchange forums before I was ready. I’m glad that I didn’t allow a vocal minority dictate my schedule. As a developer, it’s often easy to do whatever a customer is asking of you, but you have to remember that your customers may not have a full understanding of your long range plans and goals.

This post is part of the project: Tasks Pro™. View the project timeline for more context on this post.