Tags:
discussion2Add my vote for this tag create new tag
, view all tags

ThreadedDiscussionPlugin

Generates a threaded discussion. Each discussion point can be edited individually, and discussion points can be commented on individually.

ALERT! This plugin requires the TWiki Cairo release!
It is not guaranteed to work under TWiki 4.1 or later.
See ThreadedDiscussionPluginDev for discussion.

Syntax Rules

DISCUSSION Variable

  • Place the variable %DISCUSSION{...}% before any bullet list.
  • Supported parameters:
    "(list|thread)" Rendering style for discussion, see STYLE preference:
    =list= formats the discussion as a bullet list; the level of discussion is indicated by the indentation and the associated bullet symbol
    "thread" formats the discussion with colored thread lines to the left indicating the level.
    focus="text" Focus list on a bullet containing the specified text. If no depth (see below) is specified, focus limits the depth to the focus item plus two levels.
    depth="number" Hide bullets with an indent greater then depth. The depth is relative to the highlighted bullet in case focus is specified
    interactive="(on|off)" If on, the discussion is followed by a control allowing selection of depth and focus interactively.
  • To start a discussion, omit the bullet list. Any text that immediatly follows the %DISCUSSION{...}% variable on the same line is shown, but removed when the first discussion point is entered. This may serve as an introductory text inviting initiation of the discussion.

Bullets

  • Use regular * bullets
  • Start with level one
    • Increase indentation only one level at a time
      • Like this
  • Decreasing indentation many levels at a time is fine
  • You can specify an icon for a bullet:
    • Attach the icon to a topic, e.g. myicon.gif, or
    • Use one of the existing icons from TWikiDocGraphics
    • Refer to an attached icon at the beginning of the bullet with:
      • icon:myicon Followed by normal bullet text

Usage

  • You can turn any bullet list into a threaded discussion by prefixing the list with the %DISCUSSION{...}% variable.
  • You can edit each item of the bulleted list individually, and you can add further items by creating them individually.
    • Click on the EDITLABEL to edit the text at the selected item.
    • Click on the COMMENTLABEL to insert a comment to the current item. The comment is inserted as the last item at the next level of indentation.
    • Each item will become a list item. Consequentially, it may not contain newlines, lest the list will be interrupted. (However, each item can be arbitrarily long, and it will be rendered with the lines wrapped to page width.)
  • To start a new discussion, just insert the %DISCUSSION{...}% variable, immediately followed by some text. This text will be deleted when the first discussion item is added (click on either of the icons to edit a new item).

Examples

You type: You get: (simulated) You get: (if installed)
%DISCUSSION{"thread"}%
   * one
      * one.a
         * one.a.x
      * one.b
         * one.b.x
           continue
         * one.b.y
            * icon:person Tim
            * icon:person Mico
   * two
   * three

  one  EditComment
    one.a  EditComment
      one.a.x  EditComment
    one.b  EditComment
      one.b.x  EditComment
      continue  EditComment
      one.b.y  EditComment
          Tim  EditComment
          Mico  EditComment
  two  EditComment
  three  EditComment

%DISCUSSION{"thread"}%

  • one
    • one.a
      • one.a.x
    • one.b
      • one.b.x continue
      • one.b.y
        • Tim
        • Mico
  • two
  • three

You type: You get: (simulated) You get: (if installed)
%DISCUSSION{"thread" focus="Tim"}%
   * one
      * one.a
         * one.a.x
      * one.b
         * one.b.x
           continue
         * one.b.y
            * icon:person Tim
            * icon:person Mico
   * two
   * three

  one  EditComment
    one.b  EditComment
      one.b.y  EditComment
          Tim  EditComment

%DISCUSSION{"thread" focus="Tim"}%

  • one
    • one.a
      • one.a.x
    • one.b
      • one.b.x continue
      • one.b.y
        • Tim
        • Mico
  • two
  • three

You type: You get: (simulated) You get: (if installed)
%DISCUSSION{"thread" depth="2"}%
   * one
      * one.a
         * one.a.x
      * one.b
         * one.b.x
           continue
         * one.b.y
            * icon:person Tim
            * icon:person Mico
   * two
   * three

  one  EditComment
    one.a  EditComment
    one.b  EditComment
  two  EditComment
  three  EditComment

%DISCUSSION{"thread" depth="2"}%

  • one
    • one.a
      • one.a.x
    • one.b
      • one.b.x continue
      • one.b.y
        • Tim
        • Mico
  • two
  • three

You type: You get: (simulated) You get: (if installed)
%DISCUSSION{"list"}%Start a discussion

Start a discussion.  EditComment

%DISCUSSION{"list"}%Start a discussion

ThreadedDiscussionPlugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %THREADEDDISCUSSIONPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Support a threaded discussion mode.

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • Determines how the discussion list will be rendered: list formats the discussion as an indented bullet list; thread formats the discussion with thread bars indicating the depth of the discussion.
    • Set STYLE = list

  • Formatting preferences for the thread style
    • Color, style, and thickness of line indicating thread as valid for the HTML style attribute
      • Set THREADCOLOR = solid thin #FFCCCC
      • #Set THREADCOLOR = dotted medium black
    • Additional icon separating thread lines
      • Set SPACEICON = 1, 16, 16, empty.gif
      • The first element is a 0|1 flag indicating whether to suppress or show thread lines at the top level; the next two arguments indicate width and height of icons, respectively; and the final argument gives the spacer icon between thread lines.

  • Topic at which icons are attached, unless explicitly given.
    • Set ICONTOPIC = TWiki06x00/TWikiDocGraphics

  • Labels for the edit and comment buttons. Can be textual or icons.
    • Set EDITLABEL = Edit
    • #Set EDITLABEL = Edit
    • Set COMMENTLABEL = Comment
    • #Set COMMENTLABEL = Comment

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Make sure TWiki:Plugins/EditContrib is installed.
  • Download the ZIP file from the Plugin web (see below)
  • Unzip ThreadedDiscussionPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/ThreadedDiscussionPlugin.txt Plugin topic
    data/TWiki/ThreadedDiscussionPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/ThreadedDiscussionPlugin.pm Plugin Perl module
    bin/editthread edit script
  • Test if the installation was successful:
    • See if the above example works

Acknowledgment

This plugin was inspired by the TWiki:Plugins/RenderListPlugin and borrows code heavily from it.

Plugin Info

Plugin Author: TWiki:Main/ThomasWeigert
Plugin Version: 12 Apr 2005
Change History:  
15 Aug 2005: Fix problem with TWiki ML not rendering properly at end of section. Remove all but one apache warnings.
12 Apr 2005: Allow configurable edit and comment labels. Support bullet list style and thread style. More formatting options for thread lines.
21 Mar 2005: Integrate 21 Mar version of TWiki:Plugins/EditContrib
12 Mar 2005: Integrate TWiki:Plugins/EditContrib
08 Mar 2005: Initial version
CPAN Dependencies: none
Other Dependencies: TWiki:Plugins/EditContrib
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, ThreadedDiscussionPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ThreadedDiscussionPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ThreadedDiscussionPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ThreadedDiscussionPluginAppraisal

Related Topics: TWiki:Plugins/EditContrib, TWiki:Plugins/RenderListPlugin

-- TWiki:Main/ThomasWeigert - 15 Aug 2005

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 ThreadedDiscussionPlugin.md5 r2 r1 manage 0.2 K 2008-12-12 - 12:41 SopanShewale checksum file , Uploaded as a part of Release Process
Compressed Zip archivetgz ThreadedDiscussionPlugin.tgz r2 r1 manage 10.0 K 2008-12-12 - 12:41 SopanShewale See ThreadedDiscussionPlugin for details. Untar and run the installer script, Uploaded as a part of Release Process
Compressed Zip archivezip ThreadedDiscussionPlugin.zip r7 r6 r5 r4 r3 manage 12.3 K 2008-12-12 - 12:41 SopanShewale See ThreadedDiscussionPlugin for details. Unzip and run the installer script , Uploaded as a part of Release Process
Unknown file formatEXT ThreadedDiscussionPlugin_installer r2 r1 manage 3.5 K 2008-12-12 - 12:41 SopanShewale Installer Script, Uploaded as a part of Release Process
Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r16 - 2009-05-29 - VickiBrown
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.