wiki:DiscussionPlugin

Version 37 (modified by Blackhex, 7 years ago) (diff)

--

Discussion Forum Plugin

Description

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 repies shows up in timeline. Searching capability in topics and replies is supported too.

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

You can download zipped sources here.

Source

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

Installation

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

[discussion]
title = Discussion

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

[components]
tracdiscussion.admin.discussionwebadmin = enabled
tracdiscussion.core.discussioncore = enabled
tracdiscussion.init.discussioninit = enabled
tracdiscussion.search.discussionsearch = enabled
tracdiscussion.timeline.discussiontimeline = enabled
tracdiscussion.wiki.discussionwiki = 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.

Permissions

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

Macros

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.

[[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.

Example

Discuss this on the [forum:trac-dev 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).
  • Email notification.

Notes

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

Feedback

Are you using this plugin?
  • Yes, it's usefull. (sgrayban, cboos, okaori, wadeb, s0undt3ch, ttressieres, imme, dh1jc, talameelombu, Tharban, athomas, jtuchscherer, xvirus, osimons, Sincklation, manni, izzy, ericalens, KevinGabbert, mwehr, renzo, marcvs, eskil, rjollos, koolhand, edo, colski, dfleming, lucasrangit, miezuit, lhr870630, hasienda, arnisandy, lucid, AdrianFritz, akliewer99)
  • No, it's useless.
  • No, I don't need it. (dfaerch, harmy, prz)
  • I think it will help

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

Change Log

[13945] by hasienda on 2014-05-31 23:44:08
DiscussionPlugin: Extend use of new attribute getter api method, refs #11706.

Preventing TypeError in case of invalid ID argument is required for this
use, and doesn't hurt for others anyway.

[13944] by hasienda on 2014-05-31 23:14:21
DiscussionPlugin: Review wiki macros and syntax provider code, refs #756 and #11706.

This includes a wide range of changes from adding another db access method to
api over moving SQL into model module to correcting resource ID as
required for fine-grained permission support.

Adding the missing import from trac.resource as follow-up to [9640] suggests
rare use of discussion WikiMacros so far.

[13942] by hasienda on 2014-05-30 22:32:02
DiscussionPlugin: Hotfix for topic (attachment parent) Trac resource, refs #756 and #11800.

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.

[13939] by hasienda on 2014-05-24 00:44:45
DiscussionPlugin: Change listeners got incomplete objects, refs #6783 and #8981.

Fixed tag-related change listeners to get discussion item IDs, what caused
KeyErrors 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.

[13938] by hasienda on 2014-05-23 21:43:39
DiscussionPlugin: Narrow user selection according to granted permissions, refs #756.

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.

Author/Contributors

Author: athomas
Contributors: Blackhex

Attachments (3)

Download all attachments as: .zip