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:
- If you have also the HistoryPlugin installed, the history of a topic may look like this:
- Example History:
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)
- List also new or updated attachments:
- Set ATTACHMENT_COMMENTS = 1
- Store comments as RCS log message (not recommended yet)
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.
- Test if the installation was successful:
- 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
Related Topics: TWikiPreferences,
TWikiPlugins
--
TWiki:Main.JChristophFuchs - 22 Apr 2005