How to Make a Drupal Forum

Drupal's built-in forums are not ideal in all situations, but they make it easy to add a quick forum to your Drupal site.

The default Drupal forums are not very attractive, but they can be improved with a little CSS modification. Here are a couple of examples of great Drupal forums:

The Drupal forum tutorial

Go to administer —> modules and enable the forum module.

Go to administer —> forums and you will see a screen like this, although your theme may be different. In these first examples I am using the Sands theme.

Drupal forums default page

The first thing you will do is add containers. Containers are the categories that hold your forums. Containers are optional, but this tutorial shows how to use them. In this example I am going to make three sections of the forum: one section for Linux discussions, one for Windows, and one for Mac. This is the Add Container screen:

Adding a container to the forums

After you have made your containers, add your forums. In the following screenshot, I am making a forum section for Damn Small Linux. Notice how I am adding the Damn Small Linux forum to the Linux container with the Parent select box.

Adding a forum to a container

After you have added some containers and forums, you will have something that looks like the following screenshot:

The final Drupal forums

How to Style Your Drupal Forums

The look of the forums is controlled by CSS in your style.css file in your current theme directory. You can see your styles with the Firefox Web Developer Toolbar — an essential web design tool. On the Web Developer Toolbar menu, go to Information —> Display ID & Class Details and the CSS IDs and classes will become visible on the web page as shown below:

Web Developer Toolbar showing the CSS IDs and classes on the web page

Here is a closeup, in case the previous image is hard to read:

Closeup of the previous image

The container rows have the class .container and the forums rows have the class .forum. You can find those rules in the style.css file and make the changes to those CSS classes.

The Sands theme is a little harder to modify because the CSS is spread across 5 different files, so I'm going to finish the rest of the tutorial using the Bluemarine theme. Here is the relevant CSS from the Bluemarine style.css file with the .container class highlighted:

Bluemarine style sheet

Just make your modifications there and reload the browser to see the changes. Here is an example of some quick changes to the CSS:

CSS changes

And here are the simple results, showing more contrast between the containers and forums:

The new forum

A few more CSS modifications:

A few more CSS modifications

Here is the result of those final changes. Note how the container names and descriptions are on one line now instead of two lines:

More CSS modifications

Further Reading

If you want to take your Drupal forum a little further, try installing the Flatforum Module. There are some Drupal forum recipes and discussions here and here, as well as throughout the Drupal.org site (use the search function).

It is possible to import other forum systems into Drupal. Check the Drupal modules page for other forum-related projects such as Drupal vBulletin integration, FUDforum integration, Comment Mover, and more.

The reason that I tend to avoid integrating other forum systems into Drupal is that I want the forums to completely integrate with the rest of the site and to be searchable with the Drupal search form.

Drupal forums don't have as many features as other systems like vBulletin; their main advantage is that they are completely integrated into the rest of the CMS.