Drupal forum set-up tips

Created by janroe

Moved from the archived forum 2009-09-09 19:02:41 and updated While a blog seems to be the popular way for people to voice their opinions, and get some comments on them, there's absolutely nothing wrong with a good old forum. It is made for interaction, real discussion. Some easy instructions on how to set up and maintain the site forum:

Forum terminology

Some definitions and configuration options.

Hierarchy:

Container = high level forum heading Forum = a heading in a container that contains Topics Topic = a heading in a forum created by a user (that user is often called the Original Poster [OP], with a first topic message) Comments = replies underneath the first topic message, that users make in reaction to the OP's first message See Administer » Content management » Forum, for containers and forums. Topics and comments are generated by users, on the forum itself.

Content type:

Forum topic = the content type for a Forum topic. You can set the characteristics of forum topics the same way you can set them for page and story content types. Content management > Content types > Forum topic > Edit.

Roles:

Anonymous = anyone on the internet who comes to the site (role created by the system but can be renamed, sometimes to Visitor) Authenticated = everyone who registered (or whom you allowed to register) (role created by the system but can be renamed) Administrator = someone with site admin rights (role created by the webmaster) Forum moderator = everyone who has been assigned as forum moderator (role created by the forum access module) See Administer » User management » Roles. There can be more roles if the webmaster created them.

Permissions:

These are the permissions set by the admin about who can do what, where. This is based on roles (who) and hierarchy (where). In the permissions you specify which actions (what) the users are allowed to do. See Administer » User management » Permissions

Access control:

Try out the forum without access control first, to see if it is sufficient. Aside from the above permissions, the core forum component is relatively bare bones where access control is concerned. For fine-grained control I use the following contributed modules: - Access control list API (does not do anything on its own) - Forum access (based on, needs the above API) There may be alternatives. I tried tac_lite but it was inadequate for my purpose. To use the modules, download and upload them to sites/default/modules. Make sure they are extracted, enabled in Site building > Modules, and permissions given in User management > Permissions (v 6.x). Enabling forum access control will start a "rebuilding" of access permissions. Just follow it through. For some explanations on its use, see below. Forum access will also set up a new role "Forum Moderator" with all needed access. You may need to look into assigning a user to this role, unless you assign another admin role (like administrator) to the forum functions. Forum access control is possible on the level of Containers and Forums. These are generally created by the Moderator/Admin. Inside the Forums we have Forum topics, created by users with permissions.

Structure:

- Container (admin) --- Forum (admin) ----- Forum Topic (user) -> Forum Topic Thread (user) ----- Forum Topic (user) -> Forum Topic Thread (user) If you are a stickler for numbers, drupal will number containers and forums through starting at 1. So if you set up a forum or a container first, whatever you set up will be 1. Whatever you set up after that is 2 and so on. A Forum Topic becomes a regular node (like page, story). That just FYI, the numbering does not really matter where content is concerned.

Forum set-up

Done by whoever is the webmaster or administrator.

Containers

It makes sense to think the forum structure through a bit first, before setting it up. You don't want to make it too complicated by having too many hierarchies. Flat is good. You might not even need, better yet, don't add a container at the beginning - unless you are certain you need it. You can also make it later and move things around later, according to need. In drupal, it won't affect or change the actual url of your forums. Anyway, to create one or more containers. Go to Content management » Forums, menu item Add container. Give it a name and a very short description. The container can also be inside another container, choose the location in Parent. Control access to the container (and everything that will be inside the container) by checking the boxes in Access control. For some reason this is a confusing presentation, because a) the instruction above it talks about "view" and "see", and the following apparent "table" had no "table headings" (v 6.x): With the left side boxes you control what the mentioned roles can actually view (and see). On the right side, with the unfortunate description of what users "see", an additional instruction explains that here you actually control what they can do. I can't explain this confusion (but it's there, 2009-2012). Generally, if you allow anonymous users to post messages (on the right side), there might be a lot of spam. But spammers will also set up spam profiles and spam from there.

Forums

After containers, if you are going to have any, you need to add forums. This is where users can create topics. Go to Content management » Forums, menu item Add forum. The set up instructions are very similar to those of containers (above). It needs a good forum name, a short description, a confirmation for its parent container in Parent. Add a weight to control the position of the forum in a list of forums. The Access control is finer and very clear, use the check boxes to control access to the permissions to view, post, edit and delete according to the site's roles. An Idiosyncrasy At the bottom of every standard create/edit page drupal will have SAVE - PREVIEW - DELETE. So I'm stumped why forums are so different. For Forum containers and Forums it goes DELETE - SAVE. With some routine in drupal, it's easy to hit the first button to save, that's in fact the delete button. Fortunately you are asked for a confirmation. Say what. delete??? No, I certainly do not want to do delete this forum.

Forum topic Content type:

Set the functions that you want Forum topics to have in Content management > Content types > Forum topic > Edit.

Adding a forum menu item:

A menu item is a a link on all (or most) pages that point to the forum. Go to Site building » Menus » Primary links (or another menu type). Click menu item Add item. In Path insert the relative address, write: forum. In Menu link title write the title and in Description write a very short description: Max's forum. Leave the rest as it is (or play around with it). - If you want to, you can also add a specific container or a forum to the menu. Check the address bar location of that container or forum and copy the part that starts with forum, for example: forum/37. Use this as the path for the menu link.

Topics and comments by the users

A topic is a new posting by a user. The user goes to a Forum » Post new Forum topic. This is usually at the top, just beneath the forum name. The user enters the post's subject, the content and can make some settings. Then previews or immediately saves the post. A comment is a reply to the first post in a topic or a reply to any other comment. The user is at the first topic posting or comment that he/she wants to reply to and goes to » Add a new comment. This is usually at the bottom of the first post or any comment. The user can (but does not have to) enter a subject, adds the comment and can make some settings. Then previews or immediately saves the post.

Menu's and bread crumbs

Actually for a flat site, breadcrumbs may not be that necessary, but for a forum I consider it important. Forum topics will lose their menu trail, because they are based on taxonomy. Some modules can help, the best currently appears to be "Menu trails", where you manually set forum containers and forums to a parent menu item for purpose of menu trail. It goes similarly for breadcrumb trails. I have not yet found a way to activate breadcrumb trails for forums only. So to have them properly for the entire site, I chose additional module "Menu breadcrumb", with some useful features, like no breadcrumb it it only says "Home". Even if it has the feature to follow the Menu path, it could not keep the active focus of a "Forum topic", so "Menu trails" is still needed. Both of these are ok with multi language. I uninstalled "Custom breadcrumbs" because it did not do better than the other two, and did not do well with my "Menu container" the primary parent menu without link but an expanded menu.

Forum translation, multi language, i18n, internationalisation,

Even now, in 2012, I tend to hold my breath with any actions concerning multilanguage. But it has greatly improved since I started out with it. Basically there are three ways to treat forums on a multilingual site. These have significant implications for how the forum works and you'll need to research and decide on this before getting into it. It makes sense to read these paragraphs first before getting into it for real: These three ways relate directly to the method of taxonomy translation, because the Forum containers is a taxonomy vocabulary and the Forums are vocabulary terms. The i18n taxonomy sub module needs to be enabled. Then navigate to Content management > Taxonomy, see the vocabulary Forum and click edit. You'll be confronted with Multilingual Options - Translation mode. This is your main decision point: Localise terms: - Make contributions translatable, but keep untranslated contributions active within the forum structure. => Potentially mixed language, but all is visible in one place. => Translate Forum containers and Forums with string translation. Per language terms: - Make contributions translatable, and show only translated contributions in the other language. => Clean language separation with ability to switch, but some (=untranslated) content can't be seen in other languages. => Translate Forum containers with string translation. Create the same Forums (terms) for each language separately and then connect them to each other. Set language to vocabulary. - Keep the languages strictly separate, without any relationship. Translation of contributions is possible, but won't show in the other language's structure. => Clean language separation with totally different content in each language. Translation of posts is possible but makes little practical sense. => Translate the vocabulary (only) with string translation. Create terms separately. The actual Forum topics that users create are simple nodes, so these translate as all other "normal" content types. I don't think you can change your mind about this after you've chosen. In all cases, making a full backup before you commit to this might be good idea.

Dysfunctions

"Post new Forum topic" is not translatable in i18n 6.x 1.10 in 2012 http://drupal.org/node/816540 http://drupal.org/node/846114 Specifically if you search "Post new" it will come up with "Post new @node_type" as a translatable term for /lang/forum. Great. Enter the translation, such as: "Nieuwe @node_type". Save an it gets entered into strings. Great. But the translation does not appear on-page. :) :) :)

Some technicalities:

(this is not yet updated) Modules: - core forum - access control (acl, needed for forum access and image gallery access) - forum access (forum_access) - messaging (enabled for simple mail only) - (messaging) notifications (for content notifications and notifications ui) Setting permissions (acl, forum_access) - in the global permissions ui - in the topic creation/edit ui Note for important addons not yet added (status 2009): - the advanced_forum still needs work so it isn't installed - the comment_mover still needs work so it isn't installed - earlier taxonomy access control lite (tac_lite) module is insufficient, do not use it (replaced by forum access module)