<<O>>  Difference Topic ThreadedDiscussionPlugin (r1.3 - 13 Apr 2005 - TWikiGuest)

ThreadedDiscussionPlugin

Generates a threaded discussion. Each discussion point can be edited

Line: 10 to 10

  • Place the variable %DISCUSSION{...}% before any bullet list.
  • Supported parameters:
Changed:
<
<
"(list|table)" Rendering style for discussion, see also STYLE preference
>
>
"(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.
Line: 49 to 49



Changed:
<
<
%DISCUSSION{}%
>
>
%DISCUSSION{"thread"}%

  • one
    • one.a
      • one.a.x
Line: 118 to 118

Changed:
<
<
  
>
>
  

  • one
    • one.a
      • one.a.x
Line: 142 to 142



Changed:
<
<
%DISCUSSION{focus="Tim"}%
>
>
%DISCUSSION{"thread" focus="Tim"}%

  • one
    • one.a
      • one.a.x
Line: 179 to 179

Changed:
<
<
  
>
>
  

  • one
    • one.a
      • one.a.x
Line: 203 to 203



Changed:
<
<
%DISCUSSION{depth="2"}%
>
>
%DISCUSSION{"thread" depth="2"}%

  • one
    • one.a
      • one.a.x
Line: 238 to 238

Changed:
<
<
  
>
>
  

  • one
    • one.a
      • one.a.x
Line: 262 to 262



Changed:
<
<
%DISCUSSION{}%Start a discussion
>
>
%DISCUSSION{"list"}%Start a discussion

Line: 272 to 272

Changed:
<
<
Start a discussion   
>
>
Start a discussion   

Line: 286 to 286

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0
Changed:
<
<
  • Determines how the discussion list will be rendered: list formats the discussion as an indented bullet list; table formats the discussion using a table with bars indicating the depth of the discussion.
>
>
  • 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
Changed:
<
<
  • Color of line indicating thread
    • Set THREADCOLOR = #FFCCCC
>
>
  • 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.
Line: 330 to 331

Plugin Author: TWiki:Main/ThomasWeigert
Plugin Version: 12 Apr 2005
Change History: <!-- versions below in reverse order --> 
Changed:
<
<
12 Apr 2005: Allow configurable edit and comment labels. Support bullet list style and table style.
>
>
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
 <<O>>  Difference Topic ThreadedDiscussionPlugin (r1.2 - 20 Mar 2005 - TWikiGuest)

ThreadedDiscussionPlugin

Generates a threaded discussion. Each discussion point can be edited

Line: 10 to 10

  • Place the variable %DISCUSSION{...}% before any bullet list.
  • Supported parameters:
Changed:
<
<
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
>
>
"(list|table)" Rendering style for discussion, see also STYLE preference
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.
Line: 32 to 33

  • 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.
Changed:
<
<
    • Click on the pencil icon (pencil.gif) to edit the text at the selected item.
    • Click on the note icon (note.gif) to insert a comment to the current item. The comment is inserted as the last item at the next level of indentation.
>
>
    • 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).
Line: 285 to 286

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0
Added:
>
>
  • Determines how the discussion list will be rendered: list formats the discussion as an indented bullet list; table formats the discussion using a table with bars indicating the depth of the discussion.
    • Set STYLE = list

  • Color of line indicating thread
    • Set THREADCOLOR = #FFCCCC
Line: 293 to 297

    • 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.
Changed:
<
<
>
>

  • 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

Line: 317 to 328

Plugin Info

Plugin Author: TWiki:Main/ThomasWeigert
Changed:
<
<
Plugin Version: 12 Mar 2005
>
>
Plugin Version: 12 Apr 2005

Change History: <!-- versions below in reverse order --> 
Added:
>
>
12 Apr 2005: Allow configurable edit and comment labels. Support bullet list style and table style.
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
Line: 331 to 344

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

Changed:
<
<
-- TWiki:Main/ThomasWeigert - 09 Mar 2005
>
>
-- TWiki:Main/ThomasWeigert - 21 Mar 2005

 <<O>>  Difference Topic ThreadedDiscussionPlugin (r1.1 - 11 Mar 2005 - TWikiGuest)
Line: 1 to 1
Added:
>
>

ThreadedDiscussionPlugin

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

Syntax Rules

DISCUSSION Variable

  • Place the variable %DISCUSSION{...}% before any bullet list.
  • Supported parameters:
    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 pencil icon (pencil.gif) to edit the text at the selected item.
    • Click on the note icon (note.gif) 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{}%
   * 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

You type: You get: (simulated) You get: (if installed)
%DISCUSSION{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

You type: You get: (simulated) You get: (if installed)
%DISCUSSION{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

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

Start a discussion.  EditComment

Start a discussion  Edit Comment

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

  • Color of line indicating thread
    • Set THREADCOLOR = #FFCCCC

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

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.

  • 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 Mar 2005
Change History: <!-- versions below in reverse order --> 
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 - 09 Mar 2005

View topic | Diffs | r1.3 | > | r1.2 | > | r1.1 | More
Revision r1.1 - 11 Mar 2005 - 16:18 - TWikiGuest
Revision r1.3 - 13 Apr 2005 - 19:57 - TWikiGuest