
Forums
Discussion forums are a great way to allow users to discuss various topics with other users on the site. Forums themselves act as containers for topics and any child forums within them.
Within Drupal discussion forums, topics are similar to pages with comments. A user creates a topic containing a subject and some content, and other users can then write comments on the topic. These comments are threaded in style so that replies to specific comments are clearly grouped, showing the conversation which takes place within the comments.
Planning our forum structure
Before we start creating forums for our site, it is a good idea to think about the sort of discussions we would like to have. Initially, we would probably want to have discussions on the following:
- Dinosaur health
- Dinosaur care
- Places to visit with your dinosaur
- Dinosaur-friendly hotels
- General discussion amongst users
- Stories from our users
While this initial list is helpful, it isn't structured. We now need to think about those topics, and decide how to group them within our forums. Based on the initial list, we could build a structured discussion area with the following categories and sub-forums:
- General
- Site news and announcements
- New member introductions
- General (Dinosaur related)
- General (Non-dinosaur related)
- Health and care
- Dinosaur health issues
- Caring for your dinosaur
- Out and about
- Places to visit
- Dinosaur friendly hotel reviews
- Help and advice
Now that we know how we are going to structure our forums, we can create them!
Creating and managing forums and containers
In the administration toolbar, under Structure we have a new option called Forums:

From here we can control the hierarchy of our discussion forums, change the settings for how forums are displayed, and edit and delete forums and their containers:

If we want to group a number of forums together, we can either create a container for them or a forum for them. If we create a container, topics can only be posted in the forums within the container. If we use a forum, topics can be posted in there or in one of the forums within it.
Let's click Add container to create our first container. The forum's module already includes a general discussion forum, so let's start with the health and care container. From here we must enter a name for the container (Health & Care) and select a Parent for it, so Drupal knows where the container is within the structure. Selecting <root> as the Parent will ensure that the category is shown on the main forums page; the Weight option indicates the order of the container when there are other forums or containers with the same parent. Selecting an alternative parent would mean that users need to select the parent container or forum first, before they see the container.
We can also provide a description for the container:

Once we have created our container (by completing the form and clicking the Save button!), we can now create our forum which will be part of this category.
The options for creating our forum are the same as when we created the container, this is because, in terms of data and configuration, they are the same. However, they act slightly different when used (as discussed earlier).
Let's create a Health and Illness forum, to go within our newly created Health and Care container:

The ordering and structure of our forums and containers can be modified from the Forums screen by clicking the icon next to the forum name and dragging it to reorder. Once changes are made, we are reminded that we need to use the Save button before the changes are applied:

Viewing our forums
Within the Navigation menu on our site, we have a Forums link, which lists the forums and allows our users to view and create topics within them. We can rename and reposition this menu item, if we wish, from the Structure | Menus section within the administration area:

Creating a forum topic
From within the Forums section, there is a link to Add new Forum topic, and we can click this to create a new topic. Alternatively, we can click Add content and select Forum topic as the content type, or we can go into a forum and click Add a new Forum topic to create a topic for that specific forum:

Topics need to have a subject, which will be displayed as part of a list when we view a forum, a forum to be part of, and the description of the topic itself.
Taxonomies
In Chapter 2, Preparing Drupal for a Social Networking Site, we created a vocabulary of dinosaur breeds in order to help us categorize our content. The reason that we were not asked to select a dinosaur breed when creating a forum topic is because we have not assigned the vocabulary to this type of content.
To associate the vocabulary with forum topics, from the administration toolbar we need to select Structure | Content types | Forum topic | Manage fields:

Now, we can select our vocabulary. Because we have already associated the vocabulary with one type of content, we can select it from the Add existing field section:

Once we click the Save button, we are taken to a page of settings for the field dino_breed when it is used within a Forum topic. This allows us to have the vocabulary behave differently with different types of content, for instance, making the field required:

Once saved, our users can now select a dinosaur breed to categorize their forum topics with.
Planning: How will roles fit in?
Now, let us take a step back to think about how our users will use the forums. While we wouldn't want users who haven't logged in to create topics and forum posts (as this could encourage spam, and makes communication less personal), we would want them to be able to read topics. We would want all of our registered users to be able to contribute through the forums. If we have a selection of very helpful and trustworthy users, we may wish to allow them to edit and delete topics, to help moderate the discussions. We may find that as the community grows, there are some users who would be well suited to help restructure the forums, to introduce new forums and categories as the site grows.
Here, we can see that we may have the need for different levels of permission, with all registered users being able to contribute, and a small subset of users having additional privileges to help moderate and curate the site.