Creating a Forum using Drupal

Drupal makes it a snap to create a complete forum from scratch or add
one to an existing site. In this tutorial, we're going to show you how
to create a simple forum for a community site for pet lovers.

Step 1: Enable forums

First, you're going to need to enable the forum module in Drupal. This
is a core module, so it will already be installed. Go ahead and navigate
to Site Building >> Modules and check the box next to Forums to enable
the module.

Step 2: Set up Containers

Now you need to navigate to administer >> forums to start setting up
your new forum. The first thing you'll need to do is set up a couple of
"containers". These are large categories that "contain" a number of
smaller categories or individual forums. Let's make "Cats", "Dogs", and
"Exotic Pets" categories.

Click the "Add Container" tab and fill in a name and description for
each of these three categories. Leave the rest alone, and click submit.

Step 3: Set up Forums

Each container "contains" several forums. In other words, your
containers are children of the root node and your forums are children of
your containers (you can have levels that go deeper, as well, but we're
going to stick with a simple structure for now).

Click the "Add Forum" tab to be presented with a form very similar to
the ones you filled out for containers. For the first one, we're going
to enter "Cat Care". Fill in a description if you like, and then use the
drop-down parent menu to make "Cat Care" belong to the "Cats" container.
Do the same to add "Cat Diet and Nutrition". Similarly, add a couple of
pages each for the "Dogs" and "Exotic Pets" containers -- just make sure
to set the "parent" correctly for each.

Step 4: Customizing Your Forum

Take a look at your new forum on your test site -- isn't that cool? It's
all set up and ready to go. You can even "post" something on one of the
forums if you like.

There are a few ways of customizing your forum so that it has the look
and feel you want. First, you can play with "weight" (located in the
"add container" and "add forum" pages) -- this sets up your forums to
sort in a different order if desired.

Second, you can set your forums to use a pre-defined Drupal theme. Since
there are hundreds of them available and each one is itself
customizable, this is a great option for anyone who wants a nice looking
forum without having to fiddle with any code or advanced features.

Finally, if you want to put more work into it, you can modify your
style.css file associated with your forum. An easy way to take a look at
the CSS is to open the file in a plain text editor. In the CSS, each
visual element in your format is identified as #forum. Of course, if
you're already a CSS whiz, you need no help from us, but if you don't
know anything about it, you can still make some simple modifications.
Always make sure to back up the .css file before you begin to make any
modifications, just in case. Or, you may prefer to take an existing
theme and save it under a new name and use that as your testbed.

If you want to change the display color of the containers -- in other
words, maybe you want to highlight the main categories (containers)
using a different color than that used for the forums, then modify:

    #forum td .container a { 
color: #xxx;
   }

   #forum td.container {
  background-color: #xxx;
   }
  

Insert your own hex color values after "color" (removing whatever value
is already there but keeping the #) and "background-color" to
respectively alter the text and background color of your containers. Hex
color values are simply a way of referring to specific colors and can be
found in web color tables online. Of course, you will need to save your
CSS each time you modify it.

Similarly, #forum td.forum, #forum td.posts, #forum td topics, and
#forum td.last-reply can be modified by inserting your own hex color
values. Each of these classes refers to how a specific part of the forum
listing displays. Make sure to examine your forum after you make each
change to make sure you've altered the CSS correctly and that it is
displaying how you want it to. If you're interested in learning a little
bit more about CSS, you can change your forum display in more
substantive ways, but hopefully, this tutorial has given you a few
different useful tools to modify the look and feel of your online forum.