Context Navigation

Discussion Forum Plugin

Description

The DiscussionPlugin adds discussion forums to Trac. An arbitrary number of forums can be added, organized to forum groups. Users can create topics in forums and reply to them which together creates discussion threads. Threaded or flat view to topics and its replies is supported. Each forum has a list of moderators who can delete topics, replies, etc. Plugin is administrated directly or via Trac administration interface with appropriate rights. Appending new forums and topics either as new replies shows up in timeline. Searching capability in topics and replies is supported too.

Download and Source

Dependencies

If you need spam filtering feature working, the SpamFilterPlugin installation is required. In other cases, disable a DiscussionSpamFilter component. On older Trac versions, the DiscussionPlugin depends on a WebAdminPlugin since many configuration options are available only on appropriate WebAdminPlugin's pages. Since Trac 0.10, the WebAdminPlugin is internal part of the Trac.

Plugin Versions

As many other plugins in this site even this plugin names its branches according to Trac versions. Here is a simple table explaining this convention for DiscussionPlugin:

Plugin Branch

Trac Branch

Plugin Version

0.9

0.9-stable

0.5

0.10

0.10-stable

0.5

0.11

0.11-stable, 0.12-stable

0.6, 0.7

Note that current revision of 0.11 branch contains unfinished work on TagsPlugin support. Use some older revision for now, r9787 should be the most stable.

Main difference between 0.5 and 0.6 version is that 0.6 uses Genshi templates and 0.5 ClearSilver ones.

Installation

For general information about Trac plugins installation see TracPlugins. Plugin is configurable from trac.ini file, see TracIni for more on this topic. The following variables controls DiscussionPlugin's behavior:

For now sqlite version 3 or PostgreSQL is required as SQL backend for running this plugin.

Permissions

Discussion plugin defines five permissions. With DISCUSSION_VIEW permission you can view all topics and you can post replies to them with DISCUSSION_APPEND permission. Attachments can be added to the topics with DISCUSSION_ATTACH permission. DISCUSSION_MODERATE permission gives you rights to delete replies or topics where are you defined as moderator. DISCUSSION_ADMIN permission gives you administrator rights to create, modify or delete forum groups, forums and topics. You can add these permissions by typing following commands from commandline or you can use web administration interface to do it for you.

Macros

Displays a link to forum with id <id> and text <text>. Second argument is optional.

[topic:<topic_id> <text>]

Displays a link to topic with id <id> and text <text>. Second argument is optional.

[message:<message_id> <text>]

Displays a link to reply with id <id> and text <text>. Second argument is optional.

[last-forum:<forum_group_id> <text>]

Displays a link to the last forum created in forum group with id <id> and text <text>. Second argument is optional.

[last-topic:<forum_id> <text>]

Displays a link to the last topic created in forum with id <id> and text <text>. Second argument is optional.

[[ViewTopic(<topic_subject>)]]

Displays content of topic with subject <topic_subject>. If no subject given displays content of topic with same subject as name of current wiki page. Currently there is a limitation of post length using this macro because of using GET method of HTML form.

[[RecentTopics(<forum_id>,<number_of_topics>)]] or [[RecentTopics(<number_of_topics>)]]

Displays list of recently changed topics in a forum <forum_id> or in all forums, if <forum_id> is not specified, grouped by the day of their last change. Second argument <number_of_topics> limits the number of recently changed topics displayed.

Example

Discuss this on the [forum:5 Trac Development forum].
Useful threads are [topic:23 this one] and [topic:96 this one].

Attachments

Foreign files can also be attached to topics and then linked in replies. For this purpose you can use general Trac attachment link syntax with disscussion domain and topic resource:

Planned Features

Notes

Branches 0.9 and 0.10 of the plugin are considered as deprecated and not developed anymore. User-contributed backporting patches are welcomed though.

Branch 0.11 of the plugin is tested mainly with Trac 0.12 now. If you encounter some problem on Trac 0.11, just create a ticket about it. Separate branch 0.12 will be created only in case of significant differences between Trac 0.11 and 0.12 relevant to the plugin.

Support

If you have any troubles with plugin's installation or configuration and your problem is generally Trac related, you can ask on #trac channel at Freenode IRC network to get the quickiest answer. If the problem is purely DiscussionPlugin related, you can create a topic at ​BlackTrac discussion - DiscussionPlugin forum

I've been expecting issues when moving on towards unified resources and
resource permissions. This is another hack before being able to associate
attachments with full resource path, not just topic, the current shortcut.

Fixed tag-related change listeners to get discussion item IDs, what causedKeyErrors before, just raised a couple of other issues. Not all of these
issues are resolved yet. I decided to initially catch listener errors with
logged warnings for improved API method robustness.

Moved time stamp generation nearer to db action and letting _add_item()
return the added item ID obsoleted four api methods at once.

You should be able to choose only users with appropriate permissions as
moderators, and the same applies to subscriptions. This is still not 100%
correct, because ultately fine-grained permisions could affect this too.