wiki:DiscussionPlugin

Discussion Forum Plugin

Description

This plugin adds discussion forum capabilities to Trac.

Key features:

  • Any number of forums can be added and organized in forum groups.
  • Users can create topics in forums and reply to them, which together create 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.
  • Appending new forums and topics either as new replies shows up in timeline.
  • Searching capability in topics and replies is supported too.

The plugin is administrated directly or via the Trac administration interface with appropriate permissions granted.

Screenshots

Discussion list:

Screenshot of discussion listing.

Admin page:

Screenshot of administration interface.

Thread:

Screenshot of message list in a thread.

Bugs/Feature Requests

Existing bugs and feature requests for DiscussionPlugin are here.

If you have any issues, create a new ticket.

defect

134 / 139

enhancement

46 / 56

task

4 / 7

Download

Download the zipped source from here.

Source

You can check out DiscussionPlugin from here using Subversion, or browse the source with Trac.

Installation

Dependencies

If you need spam filtering features, then the SpamFilterPlugin is required. In other cases, disable the DiscussionSpamFilter component. On Trac versions older than 0.10, the DiscussionPlugin depends on WebAdminPlugin, since many configuration options are available only on appropriate WebAdminPlugin's pages.

Sqlite version 3 or PostgreSQL is required as the database for running this plugin.

Plugin versions

This plugin names its branches according to Trac versions:

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 (and forward-compatible up to Trac 1.1.1 by now) 0.9dev

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

New installations should use revision 13910, while the source is going through a phase of cleanup and redesign including temporary regression and partial malfunction.

Installation and Configuration

General instructions on installing Trac plugins can be found on the TracPlugins page.

The plugin is configurable from trac.ini file, see TracIni for more on this topic. The following variables controls DiscussionPlugin's behavior:

[discussion]
title = Discussion
default_topic_display = classic
default_message_display = tree
forum_sort = lasttopic
forum_sort_direction = asc
topic_sort = lastreply
topic_sort_direction = asc
topics_per_page = 30
messages_per_page = 50
smtp_always_cc = 

Options:

title
changes title of main navigation bar button,
default_topic_display
changes between two possible displays of topic list - the classic and the compact view.
default_message_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_sort
to sort Topic lists. It has values
  • id,
  • forum,
  • subject,
  • time,
  • author,
  • body,
  • replies and
  • lastreply.
forum_sort_direction and topic_sort_direction
are directions of that sorting:
  • asc and
  • desc.
topics_per_page and messages_per_page
options controls number of items displayed in topic and message lists at each page of pagination.

You can type a list of email addresses into smtp_always_cc option to send all discussion plugin email notification to them. Previous example shows default values for these options.

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

[components]
tracdiscussion.admin.DiscussionWebAdmin = enabled
tracdiscussion.api.DiscussionApi = enabled
tracdiscussion.core.DiscussionCore = enabled
tracdiscussion.init.DiscussionInit = enabled
tracdiscussion.notification.DiscussionEmailNotification = enabled
tracdiscussion.search.DiscussionSearch = enabled
tracdiscussion.spamfilter.DiscussionSpamFilter = enabled # Optional, disable if you don't have SpamFilterPlugin.
tracdiscussion.timeline.DiscussionTimeline = enabled
tracdiscussion.wiki.DiscussionWiki = enabled
tracdiscussion.tags.DiscussionTagProvider = enabled
tracdiscussion.tags.DiscussionTags = enabled
tracdiscussion.ajax.DiscussionAjax = enabled

The next step is to upgrade your environment:

$ trac-admin <path_to_environment> upgrade

Permissions

This plugin defines the following 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.
  • The DISCUSSION_MODERATE permission gives you rights to delete replies or topics where you are defined as a moderator.
  • The DISCUSSION_ADMIN permission gives you administrator rights to create, modify or delete forum groups, forums and topics.

You can add these permissions by typing the following commands from commandline or you can use web administration interface 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_ATTACH
$ trac-admin <path_to_environment> permission add <user> DISCUSSION_MODERATE
$ trac-admin <path_to_environment> permission add <user> DISCUSSION_ADMIN

Macros

There are a few wiki macros available:

[forum:<forum_id> <text>]

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 is given, then it displays the content of the topic with same subject as the name of the current wiki page. Currently there is a limitation of post length using this macro, because of using GET method of the 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 discussion domain and topic resource:

[attachment:discussion:topic/<topic_id>:<filename>]
[raw-attachment:discussion:topic/<topic_id>:<filename>]
[[Image(discussion:topic/<topic_id>:<filename>)]] 

There are also two custom macros doing the same and they simplify the syntax a bit:

[topic-attachment:<topic_id>:<filename>]
[raw-topic-attachment:<topic_id>:<filename>]

Planned Features

  • Better permission system and supporting 0.11 fine-grained permissions, see #756.
  • Email2trac support.

Notes

  • Branches 0.9 and 0.10 of the plugin are considered deprecated and are not developed anymore. User-contributed backporting patches are welcomed though.
  • Branch 0.11 of the plugin is tested mainly with Trac >= 1.0. If you are sure that you've encountered a problem on Trac 0.11, just create a ticket on it. Separate branch 1.0 will be created only before significant changes to the plugin. So this will likely not happen before adoption of Trac 1.0 db API changes.

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 quickest answer, or use the trac-users mailing-list.

Feedback

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.

[*] voted "Useless", IMHO since the ticket system should be used instead (falkb).

Change Log

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.

(more)

Author/Contributors

Author: Blackhex
Maintainer: none (needsadoption)
Contributors: athomas, hasienda, lucid, rjollos

Last modified 5 months ago Last modified on Dec 3, 2015, 4:22:32 PM

Attachments (3)

Download all attachments as: .zip