Creating a forum on drupal

    Recently, I wanted to make a forum on drupal. No, not so simple, a couple of clarifications are needed.
    1) The project already existed on the drupal engine, it was a bit of a question and answer service, although I answered alone.
    2) When I got 50, I wanted to redo it all in the style of the forum, saving questions and answers
    3) Well, of course, I wanted it all to be beautiful, and the forum to be convenient.

    Drupal has a built-in forum module, but it is not convenient enough. Installing the advanced_forum module didn’t solve everything either - I still had a big problem: I wanted the “new posts” button standard for phpbb forums - by default drupal didn’t represent this possibility.

    To solve these problems, I had to tinker with the code. In the process, I found a bug in the current release of drupal advanced_forum module. It turned out that it was fixed in the alpha version, but it didn’t work for me - there were some other conflicts.

    One way or another, this post is about setting up a convenient forum on drupal. A solution to the above problem will be proposed.

    So, let's begin (I recall this post , which encouraged me to study Drupal, and I hope that it will turn out not much worse). Let's start with the simple, leave shamanism for later.

    1) Turn on the forum module, download and enable the module. A forum material type should appear. At the address admin / content / forum (I will continue to omit the site url here), we start forums and their descriptions. At admin / user / permissions, we give everyone the right to use the forum.

    2) Choose a style for advanced_forum at admin / settings / advanced-forum. I used blue_lagoon_stacked. The color scheme is corrected by editing the file modules / advanced_forum / styles / blue_lagoon_stacked / advanced_forum.css, everything is quite trivial.

    3) Download and enable the module , it will create forum moderators. Do not forget to give rights to all forums for all users in

    4) Emoticons, download and install

    5) Citation. Module

    6) To tightly ban comments from comments and get a classic linear forum logic of answers, we take This module, by the way, will allow us to flatten existing comments.

    7) For subscribing to topics, let's take By the way, you can, by default, configure the user to be subscribed to daily notifications of new topics by default.

    8) We pass to the promised shamanism. We start by fixing the bug in advanced_forum 6.x-1.1. When marking all messages read, he corrects the date the user visited the nodes with either the last comment date or the creation date. But the fact is that this is not quite the right approach - the node could be changed, the creation date can be less, and the date of change is more. Therefore, we take the file modules / advanced_forum / advanced_forum.module and edit in two places WHERE (n.created>% d on WHERE (n.changed>% d

    9) Next, create a view that shows unread messages. For this, download and enable / project / views(if you haven’t done anything yet), a new view of type material / node, a filter for the type of material = forum and has new content. Fields: material - heading, material - last commenter, material - date of the last comment. Make the first two fields links. In the header, make a link to / forum / markasread - mark everything read

    10) Continuation of shamanism - we embed a link to unread messages (for example, we placed this view at new_posts) in the forum links. To do this, in modules / advanced_forum / styles / naked / advf-forums.tpl at the very end, before the div class = "forum-top-links" write
    "List of updated topics", "href" => "site address / new_posts"); ?>

    Rejoice at the result. Questions? Write!

    Also popular now: