Your premium source for custom modification services for phpBB

HomeForumsBlogMOD ManagerFAQSearchRegisterLogin

Comments May 17, 2008

Do you really need subforums?

Filed under: MOD Writing, phpBB — Dave Rathbun @ 9:55 am CommentsComments (2) 

One of the more popular MODs for phpBB2 (and now a standard feature for phpBB3) is subforums. The original forum structure for phpBB2 includes the following hierarchy:

Board -> Category -> Forum -> Topic -> Post

With the very popular Simple Subforums MOD (sometimes called SSF) you can get this:

Board -> Category -> Forum -> Sub-Forum -> Topic -> Post

For some people that one extra level is enough. You can enable posting at the parent forum or the child forum level if you want. Several years ago I wrote my own sub-forum MOD for use on my largest board. It works okay. Like the SSF MOD I only coded for one level. Unlike the SSF MOD mine is optimized from a query perspective, and doesn’t require the eXtreme Styles MOD. I think both of those are advantages to my code over SSF.

But what if there was something else… something in between a full-fledged sub-forum implementation and a basic configuration? I have written a new MOD to do just that, and am currently using it on my largest board.

Sub-Forum Flaws

One of my main complaints about boards with sub-forums is the increased frequency of cross-posting. When there are more choices of a location to post, some users will take advantage of that and post everywhere they can, hoping to get some response. More work for the moderators. :) I believe board structures should be simple, which is why I coded my sub-forums MOD to only go one level deep. If you go too much further than that it becomes harder to find something.

Sometimes I find that certain subjects really don’t need to be broken out as much as they just need to be identified. Instead of separate forums, what if there was a way to identify or classify a topic within an existing forum?

More forums make your board more complex and therefore can slow down the server. Until I figured out this issue a while back I was really regretting the number of forums / sub-forums that I had set up on my biggest board. In fact the performance on that board was one of the reasons I came up with this idea: having a topic label.

Introducing Topic Labels MOD

This isn’t quite the same as a topic icon, although I suppose that you could use a graphic instead of text as I did. First let me provide a bit of background that you probably won’t care about, but that helps set up why I designed this MOD the way I did.

My largest board hosts discussions about a popular software product used for database reporting. One of the categories on our board was called “Regional User Groups” and it contained forums for local user groups around the world. Each regional group coordinator could request a forum for their group, and we would set it up. Some of these groups were very active; most were not. But the point was we had about 35 forums set up for regional user groups. There were over 80 forums on the board, so the majority of them were in this one category.

And to be honest, there really wasn’t a need to have a full-fledged forum for each group. If there was some way to tag a topic so that it stood out… so that people could filter the forum to show only those topics they were interested… and thus the concept of a Topic Label was born.

Here’s what it looks like today:

There was already a filter on the bottom of viewforum.php that would allow board users to limit topics to a set date range. I added another control to the same form that allows board users to filter topics to those tagged with a particular label. If you look at the topic titles, you will see that some of them have [SOME TEXT] added to the beginning of the topic title. That’s the label.

During the posting process the topic starter has the option (it’s not required) to add a topic label to their topic. If they do, that information is stored on the phpbb_topics table, and used in a variety of ways. The label is shown on viewforum (of course), on viewtopic, on search results… just about anywhere a topic title is displayed. I spent quite a bit of time playing with indexes to make sure that this additional bit of data would not slow down the board. Since I was adding this feature in order to be able to reduce the number of forums for performance reasons, I didn’t want to add a brand new performance issue at the same time. :lol:

So far the Topic Label feature has been well received. As an experiment I added it to one other forum on my board as well. In this forum we talk about a particular report-writing tool. Over the years there have been several major releases, and they’re all similar enough that we share the same FAQ. However, some subtle differences exist as well. So now when someone posts a topic in this forum the topic label allows them to tag the topic with the version of the product they’re using. When I rolled out this feature I didn’t publicize it very much, but that didn’t stop it from being used. In fact, I’m now being asked why we don’t have the same feature in more forums.

Now that is a successful MOD. :)


In this post I talked about the reasons for creating this MOD. In the next post in this series I plan to talk more about the design of the MOD and some of the performance challenges that I had to overcome before it was working to my satisfaction.

I don’t currently have plans to post this MOD at phpBB.com since they’re going to be shutting down the MOD forums for phpBB2 later this year. But I do intend to write it up and release it… somewhere. Details on that are still a bit murky.


  1. Your arguments seem quite valid to me. I know a couple of forums where they have forum regulations that require the user to add a little tag to the topic title or special topic icons to identify the topic. This MOD would certainly come in handy. If I was still running 2.x I mean.

    Comment by Ganon_Master — May 21, 2008 @ 8:57 am

  2. I really think that sub-forums are set up for the benefit of the regular users, not the newbies with questions, especially when you have a forum that has more than one level-deep subforums.

    Comment by Dog Cow — May 22, 2008 @ 1:23 pm

RSS feed for comments on this post.

Leave a comment

Tags allowed in comments:
<a href="" title=""> <acronym title=""> <blockquote cite=""> <code> <strong> <em> <u> <sup> <sub> <strike>

Confirm submission by clicking only the marked checkbox:


Powered by WordPress