DiscussionPlugin – Trac Hacks - Plugins Macros etc.
Preferences
Help/Guide
About Trac
Forgot your password?
Hacks
Timeline
Browse Source
View Tickets
New Ticket
Tags
Blog
wiki:
DiscussionPlugin
Context Navigation
+0
Start Page
Index
History
Contents
Description
Bugs/Feature Requests
Source
Installation
Dependencies
Plugin versions
Configuration
Permissions
Macros
Example
Attachments
Change Log
Author/Contributors
Add a discussion forum to Trac
Notice:
This plugin is unmaintained and available
for
adoption
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.
Discussion list
Admin page
Thread
Bugs/Feature Requests
Existing bugs and feature requests for
DiscussionPlugin
are
here
If you have any issues, create a
new ticket
defect
140 / 145
enhancement
49 / 59
task
7 / 8
Download the zipped source from
here
The plugin is also available on
PyPI
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.
Sqlite version 3 or PostgreSQL is required as the database for running this plugin.
Plugin versions
General instructions on installing Trac plugins can be found on the
TracPlugins
page.
Configuration
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 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 permission add DISCUSSION_VIEW
$ trac-admin permission add DISCUSSION_APPEND
$ trac-admin permission add DISCUSSION_ATTACH
$ trac-admin permission add DISCUSSION_MODERATE
$ trac-admin permission add DISCUSSION_ADMIN
Macros
There are a few wiki macros available:
[forum: ]
Displays a link to forum with id and text . Second argument is optional.
[topic: ]
Displays a link to topic with id and text . Second argument is optional.
[message: ]
Displays a link to reply with id and text . Second argument is optional.
[last-forum: ]
Displays a link to the last forum created in forum group with id and text . Second argument is optional.
[last-topic: ]
Displays a link to the last topic created in forum with id and text . Second argument is optional.
[[ViewTopic()]]
Displays content of topic with 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(,)]] or [[RecentTopics()]]
Displays list of recently changed topics in a forum or in all forums, if is not specified, grouped by the day of their last change. Second argument 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/:]
[raw-attachment:discussion:topic/:]
[[Image(discussion:topic/:)]]
There are also two custom macros doing the same and they simplify the syntax a bit:
[topic-attachment::]
[raw-topic-attachment::]
Change Log
17854
by
rjollos
on 2020-08-21 20:44:35
TracDiscussion 1.2.2dev: Make compatible with Trac 1.4+
Fixes
#13877
17713
by
rjollos
on 2020-04-30 01:50:36
TracDiscussion 1.2.2dev: Use
authorinfo
to format name in topic list
Refs
#13778
17637
by
rjollos
on 2019-12-19 09:35:13
TracDiscussion 1.2.1: Publish to PyPI
Refs
#13659
(more)
Author/Contributors
Author:
Blackhex
Maintainer:
none (
needsadoption
Contributors:
athomas
hasienda
lucid
rjollos
Last modified
6 years ago
Last modified on May 13, 2020, 11:07:11 PM
Tags
0.11
0.12
1.0
1.2
Blackhex
application
athomas
forum
gpl-license
needsadoption
plugin
pypi
Attachments
(3)
discussion_list.png
101.9 KB
) - added by
Radek Bartoň
14 years ago
Screenshot of discussion listing.
admin.png
139.7 KB
) - added by
Radek Bartoň
14 years ago
Screenshot of administration interface.
thread.png
144.1 KB
) - added by
Radek Bartoň
14 years ago
Screenshot of message list in a thread.
Download all attachments as:
.zip
Download in other formats:
Plain Text
Trac 1.2.6
By
Edgewall Software