How to Implement a Simple Forum in Drupal 8

How to Implement a Simple Forum in Drupal 8

Forums or message boards are an implementation of an early way of communicating, generating content and interacting through the internet, by creating threaded discussion boards, called bulletin boards. Despite the fact of being one of the most traditional ways to exchange information over the web, forums are still a very effective way to build a community around your website or web application.

Drupal 8 offers by default the Forum module in Core. This module allows you to implement a basic forum on your Drupal site or web application.

Keep reading, in order to learn how to use this module!


Step #1. Enable the Module

  • Click Extend
  • Scroll down until you find the forum module, or use the search box to filter it out
  • Enable the module
  • Click Install

191126 drupal forum

No further modules are required.


 Step #2. – The Forum Settings

The Forum module has created a new content type called Forums.

  • Click Structure > Forums 

191126 drupal forum 001

The concepts to configure the module are the following:

  • Topics are Drupal nodes posted into a forum. The comments to these nodes are the threaded replies to the forum topic.
  • Topics have to be always inside a forum. It is not possible to place a topic inside a container.
  • Forums can contain unlimited forums and can even contain other forums, called child forums.
  • Containers are created to hold (wrap) a group of forums. It is possible to wrap a container around many forums, the same way a forum can hold one or multiple containers holding at the same time multiple forums.

As you can see, with the right planning, it is possible to create complex nested structures to categorize the content of users.

  • Click Edit to configure the General discussion forum
  • Scroll down and click Delete

191126 drupal forum 002

  • Click Add container

191126 drupal forum 003

If your site was about pets, then it is very probable that you would have a section for dogs and a section for cats, for example. To organize the forum content, it makes sense to create a global container for each one of these pets.

  • Enter the required information
  • Click Save

191126 drupal forum 004

  • Click Add forum
  • Create as many forums as needed, according to your own categorization

These forums will be placed at the first level of the container

191126 drupal forum 005

Besides these forums on the first container level, we are going to create additional child forums, to preserve the information structure and be able to do comparisons between them later on.

191126 drupal forum 006

The final structure should look like the image below.

191126 drupal forum 007


Step #3. – Adding Topics to the Forum

  • Click on the root link, that is the link of the main container (in this case Dogs)

The system will send you to a page with the following URL pattern:

yoursite.com/forum/nid 

Notice that the column Topics on the table shows no results. That is because we have not added a topic to any of the forums.

  • Click on the Food link below the parent forum Herding group

191126 drupal forum 008

  • Click Add new forum topic

191126 drupal forum 009

Check that you are placing the topic in the right place.

  • Click Save

191126 drupal forum 010

Each one of the comments to this new node will increase the count on the forums table.

191126 drupal forum 011

191126 drupal forum 012

If you click on the forum link, you will see a table with all the topic details of that particular forum.

191126 drupal forum 013

I hope you liked this tutorial. Thanks for reading!

Author

  • Jorge Montoya

    Jorge lived in Ecuador and Germany. Now he is back to his homeland Colombia. He spends his time translating from English and German to Spanish. He enjoys playing with Drupal and other Open Source Content Management Systems and technologies.

0 0 votes
Article Rating
Subscribe
Notify of
9 Comments
Oldest
Newest
Inline Feedbacks
View all comments
smart
smart
4 years ago

good post

dhohoo
dhohoo
3 years ago
Reply to  smart

Thank you very much, it was very helpful to me.

Sarah
Sarah
4 years ago

Hello – is there an example of a Drupal forum that I can view and interact with in real time? im thinking about adding this feature to my website but would like to see how it is to interact as general public. thanks.

Danavero Inc
Danavero Inc
3 years ago

Thank for the information! 

Paula Sheridan
Paula Sheridan
3 years ago

Great post, but one question: Can you set up private groups in forums? IE only certain users are invited to participate in a particular group?
Thanks
Paula

mikall
3 years ago
Reply to  Paula Sheridan

Yes, you can, but will need to: 1) Download and install the taxonomy_access module and enable it.  This module works with the forum module and the built-in taxonomy.  2) Set up your forums, 3) set up other taxonomies (taxonomies are called ‘categories’ in the menu system), 4) assign terms, and 5) set permissions for anonymous user roles and authenticated user roles (administer > user management > access control), 6) Set up forum access by Role (administer > user management > taxonomy access permissions).

[url=https://www.drupal.org/node/111576#:~:text=New%20users%20to%20Drupal%20often,forums%20in%20the%20forum%20module.&text=The%20functionality%20is%20access%20control%3B%20the%20use%20is%20for%20private%20forums.]Click here[/url] for more in-depth, step-by-step instructions.

Carolyn Gonzalez
Carolyn Gonzalez
3 years ago

I’ve tried many times to add forums on my website. it’s services website and I want to add forums section with the blog for client problem and discussion about their projects with experts can you tell me more about drupal forums to add on websites

Stevie the Wonder Cat
Stevie the Wonder Cat
2 years ago

We’re looking for a way to have email notifications on Drupal forums but coming up empty.  Any ideas on how to make that work?

mikall
2 years ago

Great question! Take a look at this module and see if it offers any solutions for you:  https://www.drupal.org/project/forumsub

9
0
Would love your thoughts, please comment.x
()
x