Update Info Plugin
<--
Contributions to this plugin are appreciated. Please update the plugin page at
http://twiki.org/cgi-bin/view/Plugins/UpdateInfoPlugin or provide feedback at
http://twiki.org/cgi-bin/view/Plugins/UpdateInfoPluginDev.
If you are a TWiki contributor please update the plugin in the SVN repository.
-->
Visually indicate if a topic behind a WikiWord was created or updated recently
Introduction
UpdateInfoPlugin will add a "new" or "updated" icon after a WikiWord link if a %ISNEW% variable is used after the link, and the linked topic was recently touched.
WikiWord %ISNEW% will be expanded to:
- WikiWord - if the topic is neither new nor updated
- WikiWord
- if the topic is younger than five days and is revision 1.1
- WikiWord
- if the topic revision is higher than 1.1 and the topic was updated during the last five days
Default values for the "version" and "days" parameters are set sitewide here in UpdateInfoPlugin#PluginSettings, but can be overridden per topic (or in WebPreferences per web), by setting variables UPDATEINFOVERSION and/or UPDATEINFODAYS .
Syntax Rules
The %ISNEW% variable must be written after a WikiWord separated by exactly one space.
Full %ISNEW% syntax takes one or two options:
- days: Changes the number of days a Topic is marked as new or updated
- version: Specifies which revision is still considered to be new
Full syntax overrides site/topic defaults.
Syntax Examples
-
MyTopic %ISNEW%
-
Web.ToPic %ISNEW%
-
GrødWeb.BlåBærGrød %ISNEW% (I18N characters in WikiWords and WebNames are matched)
-
TopIc %ISNEW{days="15"}%
-
TopiC %ISNEW{days="20" version="1.4"}%
The UpdateInfoPlugin supports these TWikiML link syntaxes:
-
WikiWord
- WikiWord as
WebName.WikiWord
-
[[WikiWord][link text]]
-
[[WebName.WikiWord][link text]]
-
[[link text]]
-
[[link-text]] (links to non-WikiWord topics, i.e. topic names containing special chars like "-")
-
[[singleword]]
-
WIK IWO RDS (abbreviations / acronyms)
(All followed by the %ISNEW% variable).
Examples (Work if Installed)
UpdateInfoPlugin Settings
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Visually indicate if a topic behind a WikiWord was created or updated recently
- Sitewide "version" default
- Set UPDATEINFOVERSION = 1.1
- Debug plugin: (See output in
data/debug.txt )
Installation Instructions
- For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.
- Or, follow these manual installation steps:
- Download the ZIP file from the Plugins home (see below).
- Unzip
UpdateInfoPlugin.zip in your twiki installation directory. Content: File: | Description:<-- --> | lib/TWiki/Plugins/UpdateInfoPlugin.pm | Plugin Perl module | data/TWiki/UpdateInfoPlugin.txt | Plugin topic |
- Set the ownership of the extracted directories and files to the webserver user.
- Install the dependencies (if any).
- Plugin configuration and testing:
- Run the configure script and enable the plugin in the Plugins section.
- Configure additional plugin settings in the Extensions section if needed.
- Test if the installation was successful: See example above.
Plugin Info
Related Topics: TWikiPreferences, UserDocumentationCategory, TWikiPlugins |