Version 60 (modified by otaku42, 7 years ago) (diff)

Remove result of someone's two test edits.

Discussion Forum Plugin


The DiscussionPlugin adds discussion forums to Trac. An arbitrary number of forums can be added, organised 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 WebAdminPlugin with apropriate rights. Appending new forums and topics either as new replies shows up in timeline. Searching capability in topics and replies is supported too.

Live Example

To get an idea how the forums look, see BlackTrac discussion.

Bugs/Feature Requests

Existing bugs and feature requests for DiscussionPlugin are here.

If you have any issues, create a new ticket but read BugReporting page first, please.

Download and Source

You can [download:discussionplugin download zipped sources], check out using Subversion, or browse the source with Trac.


DiscussionPlugin depends on WebAdminPlugin since many configuration options are available only on appropriate WebAdminPlugin's pages. The SpamFilterPlugin is also required.

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.6
trunk 0.11-stable testing

Main difference between 0.5 and 0.6 version is that 0.6 uses Genshi templates and 0.5 ClearSilver ones. Trunk branch may not work so don't use it.


After installing plugin's egg you can set in trac.ini configuration file following variables:

title = Discussion
default_display = tree
forum_sort = id
forum_sort_direction = asc
topic_sort = id
topic_sort_direction = asc

Option title changes title of main navigation bar button, default_display defines default display mode for message list. Possible values are tree, flat, flat-asc and flat-desc. flat is synonym for flat-desc. forum_sort is column by which will be sorted forum lists. Possible values are: id, group, name, subject, time, moderators, description, topics, replies, lasttopic and lastreply. Topic lists may be sorted with topic_sort option. It has values id, forum, subject, time, author, body, replies and lastreply. Options forum_sort_direction and topic_sort_direction are directions of that sorting. They may be asc and desc. Previous example shows default values for these options.

If you run Trac in environment which needs to enable plugins explicitly put in trac.ini these lines:

# Enable this component for 0.11 branch and 0.10 branch from revision r3518.
tracdiscussion.api.DiscussionApi = enabled

tracdiscussion.admin.DiscussionWebAdmin = enabled
tracdiscussion.core.DiscussionCore = enabled
tracdiscussion.init.DiscussionInit = enabled = enabled
tracdiscussion.timeline.DiscussionTimeline = enabled = enabled
tracdiscussion.notification.DiscussionNotifyEmail = enabled

The next step is to upgrade your environment:

# trac-admin <path_to_environment> upgrade

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


Discussion plugin defines four permissions. With DISCUSSION_VIEW permission you can view all topics and you can post replies to them with DISCUSSION_APPEND 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 WebAdminPlugin to do it for you.

# trac-admin <path_to_environment> permission add <user> DISCUSSION_VIEW
# trac-admin <path_to_environment> permission add <user> DISCUSSION_APPEND
# trac-admin <path_to_environment> permission add <user> DISCUSSION_MODERATE
# trac-admin <path_to_environment> permission add <user> DISCUSSION_ADMIN


There are few wiki macros available:

[forum:<forum_id> <text>]

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

[topic:<topic_id> <text>]

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

[message:<message_id> <text>]

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


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.


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

Planned Features

  • Better permission system (maybe using 0.11 permissions policies).
  • Better email notification. (make notification a component and more configurable)


  • Branch 0.9 of plugin is considered as deprecated and not developed anymore.


Are you using this plugin?
  • Yes, it's usefull.
  • No, it's useless.
  • No, I don't need it.
  • I think it will help

  • You don't have permission to vote. You may need to login.

Change Log

15556 by rjollos on 2016-05-19 00:45:42
0.9dev/0.10dev: Fix missing import of Chrome

Patch by kevin.winahradsky@….

Fixes #12779.

15549 by rjollos on 2016-05-14 22:16:22
0.10dev: Fix typo in [15548]

Refs #11706, #12762.

15548 by rjollos on 2016-05-14 02:00:38
0.10dev: Pass format_to_oneliner_no_links in template data

Refs #11706.

15547 by rjollos on 2016-05-14 01:33:20
0.10dev: Implement another change that was overlooked in [14884]

Refs #10593.
Fixes #12762.

15151 by rjollos on 2016-01-22 05:53:14
0.10dev: Implement change that was overlooked in [14884]

Refs #10593, #12640.

15097 by rjollos on 2015-12-03 05:31:07
0.10dev: Remove tag_svn_revision from setup.cfg

The attribute is not supported in setuptools >= 10.

14885 by rjollos on 2015-08-14 01:07:12
0.10dev: Better styling for Trac 1.0. Fixes #10593.

Patch by sdegrande.



Author: Blackhex
Contributors: athomas

Attachments (3)

Download all attachments as: .zip