RevCommentPlugin

This plugin allows to enter a short summary of changes made to a topic for a new revision. This summary can be displayed e.g. in a history page of the topic or on the WebChanges page of a web. Changes may also be marked as "minor" by using the "Quiet save" button.

Since in TWiki it is possible to make several changes within the edit lock time (normally 60 minutes) which are accumulated in only one new revision, it is also possible to have several comments for one revision.

Furthermore, adding or updating an attachment may also trigger an automatic comment for the current revision. This behaviour can be switched on or off with the help of the preference variable ATTACHMENT_COMMENTS (see below).

Syntax Rules

Showing existing comments

  • %REVCOMMENT{parameters}%
  • Parameters:
Name Description Default
web Web where topic exists current web
topic Name of topic current topic
rev Revision latest revision
delimiter Delimiter between 2 comments for the same revision </li><li>
pre Text before the first comment <ul><li>
post Text after the last comment </li></ul>
minor Text to print for a minor change (minor)
(The text for the pre and post parameters will only be printed if the list of comments is not empty.)
  • For your convenience, you can use [] instead of {} and '' instead of " inside other parameters.

Entering new comments

  • Add a text input field named comment to the edit and preview templates. (See e.g. the attached templates for the pattern and classic skin)

Examples

  • %REVCOMMENT% shows the comments for the current revision.
  • Using the attached WebChangesWC (see below), the list of previously updated topics of a web may look like this:

  • Example WebChanges:
    Screenshot: Example output of WebChanges


  • If you have also the HistoryPlugin installed, the history of a topic may look like this:

  • Example History:
    ExampleHistory.png

Plugin Settings

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

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Allows a short summary of changes to be entered for a new revision.

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

  • List also new or updated attachments:
    • Set ATTACHMENT_COMMENTS = 1

  • Store comments as RCS log message (not recommended yet)
    • Set USE_RCS = 0

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 RevCommentPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/RevCommentPlugin.txt Plugin topic
    data/TWiki/RevCommentPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/RevCommentPlugin.pm Plugin Perl module
    data/TWiki/WebChangesWC.txt Replacement for WebChanges.txt, see below
    data/TWiki/RevComment.txt Help text
  • Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.

  • This distribution contains a topic which can replace an existing one. This file has a WC ("with comments") in the name. You should backup your old file and rename this file:
  • data/TWiki/WebChangesWC.txt --> data/TWiki/WebChanges.txt
  • If HistoryPlugin is installed, the template oopshistory.tmpl from this plugin is automatically expanded with revision comments once this plugin is installed
  • If you are using other skins than the pattern or classical skin, you have to enter a textfield to templates/edit.skin.tmpl and templates/preview.skin.tmpl : Enter the line <input class="twikiEditComment" type="text" size="%EDITBOXWIDTH%" style="%EDITBOXSTYLE%" name="comment"> to the template, between the <form> and </form> tags.

Plugin Info

Plugin Author: TWiki:Main.JChristophFuchs & TWiki:Main.SteffenPoulsen
Plugin Version: 14 Apr 2006 (V1.110)
Change History:  
14 Apr 2006: <noautolink> added to default pre/post rendering output of REVCOMMENT tag
14 Apr 2006: Minor update for Dakar 4.0.2
22 Apr 2005: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL (GNU General Public License)
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, RevCommentPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/RevCommentPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/RevCommentPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/RevCommentPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main.JChristophFuchs - 22 Apr 2005

TWiki.RevCommentPlugin - Topic revision: r1 - 2006-04-14 - 00:22:16 - TWikiContributor
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Koalateam? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.RevCommentPlugin