PHPBB great program, not so good at playing with others
August 18th, 2005I’ve just spent the past 10 hours or so working on integrating PHPBB2 into singletracks.com. The installation is a snap, one of the easiest scripts I’ve ever installed. The problem, however, is figuring out how to integrate the thing into my existing user, state, and country tables and my overall navigation. Let me say it has not been easy.
I initially set out to create my own forum scripts (I know, it’s crazy). I had used PHPBB on Safarium before so I knew what a great program it was but I also knew how difficult it is to integrate into existing user schemes. I wanted to be able to use my existing HTML headers and footers, advertisement keys (I have a key for each page to tell the ad script which ad category to show), user data, etc. AND integrate all the forums into my existing content pages. For example, if you’re reading about a mountain bike trail in Alaska, you would be able to click a link on the page to join the discussion in the Alaska trail forum.
But building a (good) forum system from scratch is tough. There are tons of features that users expect from forums that are difficult to build yourself. In the past I’ve built everything from scratch because I have had a difficult time finding scripts that fit my needs exactly: from inventory management systems to data recommendations and sorting, I’ve built it myself. But this is VERY time consuming and I just have too many projects I would like to work on instead. So I decided to give PHPBB another shot.
So far I’ve had a few problems. For one, on singletracks and Safarium we use cookies to keep track of user logins while PHPBB uses sessions. Arguably sessions are the better way to go for logins but it’s nearly impossible to get the two in sync without destroying your current login scripts or modifying the crap out of PHPBB. I chose to modify PHPBB login scripts (and my own), and (for now) everything seems to be working ok. I’ve also spent the better part of my time syncing the singletracks user tables with the ones in PHPBB. So when a new user creates an account, their username and email are saved in two tables; once they update their location, that information is synced as well (and each time they modify their info).
I had also hoped that PHPBB would be using Smarty templates for the HTML output. Instead the latest version uses some strange templating format with .tpl extensions. It looks a little like Smarty but unfortunately BBEdit doesn’t recognize the syntax and all I see is gray text as opposed to the Christmas tree view I get for HTML, PHP, Perl, etc. The templates also make it tough (probably not impossible) to include other scripts. I would love to be able to include the singletracks header file in the PHPBB header template so I can use my existing headers (and not have to worry about 2 header and footer files each time I add a site navigation link).
