[[PageOutline(2-5,Contents,pullout)]] = 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 permissions granted. Appending new forums and topics either as new replies shows up in timeline. Searching capability in topics and replies is supported too. == Screenshots To get an idea how the forums look, see [attachment:discussion_list.png], [attachment:admin.png] and [attachment:thread.png]. == Request for Adoption The plugin is not actively developed anymore. If you would like to adopt its development contact user Blackhex. == Bugs/Feature Requests Existing bugs and feature requests for DiscussionPlugin are [query:status!=closed&component=DiscussionPlugin&order=priority here]. If you have any issues, create a [/newticket?component=DiscussionPlugin&owner=Blackhex new ticket] but read BugReporting page first, please. == Download Download the zipped source from [download:discussionplugin here]. == Source You can [http://trac-hacks.org/svn/discussionplugin check out] !DiscussionPlugin using Subversion, or [source:discussionplugin browse the source] with Trac. == 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 (and forward-compatible up to Trac 1.1.1 by now) || 0.9dev || Main difference between 0.5 and 0.6 version is that 0.6 uses Genshi templates and 0.5 !ClearSilver ones. New installations should use [http://trac-hacks.org/changeset/13910/discussionplugin/0.11?old_path=%2F&old=13910&format=zip revision 13910], while the source is going through a phase of cleanup and redesign including temporary regression and partial malfunction. == 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: {{{ #!ini [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. They may be * {{{asc}}} and * {{{desc}}}. {{{topics_per_page}}} and {{{messages_per_page}}}:: options controlls number of items displayed in topic and message lists at each page of pagination. You can type list of e-mail addresses into {{{smtp_always_cc}}} option to send all discussion plugin e-mail notification to them. 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: {{{#!ini [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: {{{#!sh # trac-admin upgrade }}} 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. {{{#!sh # 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 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 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(,)]] 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::] }}} == Planned Features - Better permission system (supporting 0.11 fine-grained permissions - WiP, see #756). - [https://subtrac.sara.nl/oss/email2trac email2trac] support. == 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>=1.0. If your sure that you've encountered a problem on Trac 0.11, just create a ticket about 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:IrcChannel #trac channel] at Freenode IRC network to get the quickest answer, or use the [trac:MailingList trac-users mailing-list]. == Feedback [[Poll(Are you using this plugin?; Yes, it's usefull.; No, it's useless.; No, I don't need it.; I think it will help;)]] [*] voted "Useless", IMHO since the ticket system should be used instead (falkb). == Change Log [[ChangeLog(/discussionplugin, 3)]] == Author/Contributors '''Author:''' [wiki:Blackhex Blackhex] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:''' [wiki:athomas], [wiki:hasienda], [wiki:lucid], [wiki:rjollos][[BR]]