linlu11 的博客

Drupal Forums instead of phpBB or vBulletin: A casestudy

 

5th Jan, 10

For years I have been using phpBB for a busy community website that has over 162490 registered members. It has been a great ride, members are happy with the functionality and ease of use BUT from a development and security point of view it has been a painful experience.

As anyone who has ever installed, hacked and setup phpBB forum will tell you that due to the lack of hooks or modular nature of phpBB you have to hack core to add any additional functions. Prior to Drupal this was "acceptable loss" to me, but I have "come to my senses" and it is something that I would hate to do now.

For one of the work websites (www.mychild.co.uk) that is currently running on Drupal 5, we decided to expand the website and expand it to incorporate a forum. Fun times!! After much deliberation and discussions about pros and cons of each package, here is a "must have" that we decided upon:

Must have features
  • Forums must share the same login as Drupal site
  • MUST look and feel like a phpBB/VB forum
  • Private Messenging
  • Private Forums (moderate only - access by role)
  • Email notifications of updates/comments
  • Avatars
  • Post count (in profile and forum posts)
  • Star Ranking (based on post count)
  • Rank Badge (based on role)
  • Custom folder icons (keeping the look and feel close to phpBB)
  • New posts since last visit
  • Custom breadcrumb
  • Banner blocks
  • Ability to cross promote other drupal content types (based on term relationships)
  • Attachments in comments (with limit)
  • Quote
  • Banwords
  • Offsite links open in a new window
  • Advanced search

It quickly became apparent that we were no longer looking at a standalone Forum package for which I could bridge the login/session with Drupal. Since we wanted to bring majority the Drupal and custom functionality over to the forums Drupal Forums was the way ahead.

So, how do you go about achieving the above with Drupal? Easy. Well, sort of easy. Drupal Forums are very basic out of the can. It is basically a node with comments enabled. Without going into coding specifics at this stage, here is a brief outline on how we added some more meat to the Drupal Forums, I installed the following helper modules to mimic a "proper forum":

Modules used
  • Advanced Forum
  • Author Pane
  • BBCode
  • Comment upload
  • Extended user status notifications
  • Flat comments
  • Quote
  • Upload max files
  • Signatures for forums
  • User badges
  • User Stats
  • Word Filter
  • Smileys
  • Subscriptions
  • jQuery Update
  • External Links
  • Forum Access
  • Abuse
  • Apache Solr
  • Statistics
  • Private messages

The above modules provided around 80% of the missing functionality. The remaining bits and pieces were down to writing my own custom modules and a custom theme for Advanced Forum. If the website had been running Drupal 6, we could have pushed the boat out even further, but that is for another day.

If you have any specific questions or coding queries, please post a comment and I will try to answer.

Now, for some screen shots:

Forum Home Page

Forum Node & User Info

Forum Stats

User Profile

Forum Private Msg

Your thoughts, feedback and comments are most welcomed.

Related blog posts: 

Drupal 5 - Disable FCKEditor per content type

Drupal 6: Define SEO Meta Tags dynamically using hook_nodewords_tags_alter

ApacheSolr search for Drupal on CentOS

Drupal 5: fix comment permalinks with pagination

Adding Custom Breadcrumb for Drupal nodes

Bookmark and
 Share

20 comments

Anonymous's picture

Eric
5th Jan, 10

A very useful post - I am in a similar situation. My site is using phpBB hooked into Drupal with one of the bridge modules. I would like to move to a Drupal only setup... at some point I need to migrate the old forum into Drupal.

I don't think it will be fun. Any thoughts on migrating the posts?

Also, do you allow attachments to forum posts/comments/

Eric

»

Janak's picture

Janak
5th Jan, 10

Hi, migrating posts from phpbb v2 and v3 to Drupal is possible using the importer module that comes bundled in with the phpbb-to-drupal bridge module. However, if you are using Drupal 5, there is no importer from phpbb v3, sadly you will have to write your own (upgrade module?) or upgrade your installation to drupal 6.

Yes we allow comment attachments, I am using the Comment upload module for that. For attachments on the nodes, you can either use cck filefield or the core upload module. I am using cck filefield as it allows me to specify a dedicated folder for forum uploads.

»

Anonymous's picture

Craig
5th Jan, 10

I've been considering making the move from vBulletin to Drupal for a large community site I run. However I'm curious about performance. I have 100k threads, 1.2M posts, 33k users and get around 65k unique hits / day (most from anonymous) users. How has the performance of your Drupal site faired?

»

Janak's picture

Janak
5th Jan, 10

As with any big Drupal site, performance is a concern if you are not on a dedicated server. Luckily, for the work sites we have 1 dedicated web server, 1 dedicated file server and 1 dedicated DB server. On top of that we are using OP Cache (Xcache) and mysql caching. Without which I am sure the servers would struggle to cope with the resource hungry beast that Drupal can be.

Although it is not a common practice on forums to cache the pages for anonymous users, we did implement a page cache of 10-15 min. This is to minimise resource drain due to anonymous trafic and also to add an incentive for the users to become a registered member.

So, I guess it will ultimately depend on what resource you have and also if there is a financial benefit to having a seamlessly integrated forum with the drupal website. If there is no "real" benefit or requirement to have seamless integration, it might be better to run a phpBB/VB package on a subdomain. I guess it all depends on what you are trying to do and how valuable you deem the community is to your main website!

For a forum only website that needs to run on a shared host, drupal might not be the ideal solution! It all depends...

»

Anonymous's picture

Michelle
5th Jan, 10

Nice writeup! It's too bad you're still on Drupal 5. AF 2.x gets a lot closer to the "expected" forum experience. Looks like you did a real nice job, though. I like your forum style.

Michelle

»

Janak's picture

Janak
5th Jan, 10

Thanks Michelle, without Advanced Forum and all other addon modules it wouldnt have been as easy.

In an ideal world we should have upgraded to D6 but we have so many custom modules on the website (banner system, co-reg system, lead collection, payment gateways etc etc) that it would have turned out to be a much bigger project. So sadly we have to make do with D5.

D6 upgrade is on the cards for this quarter of the year, lets see how smooth that goes. We needed to get something off the ground quickly and test the waters to see if it is something that we want to pursue long term, so a big thank you to you and all the team behind all the modules that I had to rely on :)

»

Anonymous's picture

Adrian
6th Jan, 10

What are the remaining 20% functionality required to write custom modules ?

»

Janak's picture

Janak
6th Jan, 10

its mainly:

- Star Ranking (based on post count)
- Custom folder icons (keeping the look and feel close to phpBB)
- New posts since last visit
- Custom breadcrumb
- Ability to cross promote other drupal content types (based on term relationships)
- Custom theme
- Online members
- Hall of fame

»

Anonymous's picture

Eelke
6th Jan, 10

I'd be very interested to learn how the user experience is, both for site users and site staff. I am in a similar situation, although my site is not yet in production, I am developing a site based on both Drupal and phpBB. I have shied away from trying to duplicate phpBB functionality in Drupal because of the sheer number of extra modules that would be required (and the associated evaluation work). Incidentally, I don't see having to "hack" phpBB as that big of a deal; having a good version control system up and running, that allows you to merge in changes from one version of phpBB to the next, is 80% of the headache gone. Of course a hooks system is better and there is a clear trade-off here, but for me, the sweet-spot still seems to be a bridge solution. But again, I would be interested to learn how the user experience is; if there is a pre-made list of Drupal modules that will result in functionality close or equal to a "proper" forum, that's a lot of the work already done.

»

Anonymous's picture

Michelle
9th Jan, 10

Weird... This looks threaded but there's no reply links. Anyway, this is to Eelke:

http://drupal.org/node/227121

Michelle

»

Janak's picture

Janak
11th Jan, 10

thats odd, you should be able to see "reply", I'll check. Cheers for the link btw.

»

Anonymous's picture

Murali
7th Jan, 10

Hi Janak:

Looks great.

What is the style you used?

Thanks,

Murali.

»

Janak's picture

Janak
7th Jan, 10

thank you. This was a custom style I made for to match the website! You can take one of the default Advanced Forum themes and easily customise that I suppose!

»

Anonymous's picture

Pat Campbell
9th Jan, 10

Great post, very helpful. Am trying to get a forum running on my site at the moment. Having trouble getting author pane working but it is coming along.

Any reason you are using Drupal 5? I am too but it was initially so I could get the phpBB integration working smoothly (which I ditched anyway to go with this method)

Do you also know if there is a way to create a back button without using breadcrumbs when you are looking at a thread? There seems to be one missing.

PS: How are you doing the nice jQuery comment submission?

»

Janak's picture

Janak
11th Jan, 10

Look fwd to seeing you work, please drop a link here when your site is live.

We have a lot of custom modules that are mission critical and it will take a while to upgrade them all! We didnt want to delay the launch of the forum until that upgrade happens.

Sorry, back button to go back to where? The main forum listing page or the forum (taxonomy term) itself? Either are possible and I think they might be implemented in D6 version of advanced forum already! If not, I might be able to help you figure out the code.

jQuery Comments are done using this wonderful AJAX Comments module by neochief

»

Anonymous's picture

Todd
11th Jan, 10

Amazing writeup....did you send your theme to drupal garden or upload back to community?

Great work!

»

Janak's picture

Janak
11th Jan, 10

No this one was quite a custom theme for MyChild website and wasnt really developed with drag-drop functionality in mind. You can quite quickly modify one of the Advanced Forum stock theme to mimic what you see here. Besides, D6 branch of Advanced Forum is already much better and I guess the theme is very close to a "proper forum" look and feel!

»

Anonymous's picture

David Sanchez
13th Jan, 10

Nice post. I'm running a large forum site with Simple Machines Forum (SMF), which I'm planning to switch for Drupal. However, first I need to convert to PHPBB, then Drupal. I'd like to know if you had problems with the passwords when converting from PHPBB to Drupal?

Also, most forums have the possibility to jump directly to the "Last post" from the Boards index. In Drupal, this option brings you to the page Index, where you have to manually look for the last post. Could you solve this problem?

Cheers

»

Anonymous's picture

Pat Campbell
17th Jan, 10

Hey there,

http://student-in-law.com/forum/ is my Advanced Forum, with most of the theming done (much helped by your site as an example of where to find the relevant lines of CSS that I had trouble locating).

Am having two major troubles though. Post reply button does not work, the comment/post form does not display when it is clicked. Also, the author panel still is not showing up on people's posts. Infuriating! Any ideas off the top of your head what that could be? Is my panel too narrow? I don't quite get it.

»

Anonymous's picture

Steward
24th Feb, 10

Hello Janak,

i just visited mychild - great site! and the first time, that I consider in keeping the drupal forum. One question: How did you manage it, that the link "last post" on a page like http://www.mychild.co.uk/forum/welcome-to-the-forum-1848 contains the "...page=14..."? We use 'speaking urls' but if the number of comments exceeds the number displayed on one page, in our forum the "last post" link doesn't work :(

In other words: how to implement the number(s) of a page (I use the autopath modul).

with Kind Regards,
Steward

»

posted on 2010-03-18 22:09  linlu11  阅读(612)  评论(1编辑  收藏  举报

导航