PEDN> TWiki Web>RecentChangesPlugin (2006-06-21, KoenMartens? ) Change language en zh-cn? EditAttach

RecentChangesPlugin

First stab at a plugin that displays recently updated topics across all webs.

Syntax Rules

The basic form is to include %RECENTCHANGES{}% in your topic. The default is to output a table with the 4 most recently updated topics. The default can be changed by using the %RECENTCHANGES{parameter1="value1" parameter2="value2" ...}% form. Valid parameters and their defaults are:

Parameter Explanation Default
limit Number of topics to show 4
format Format of the output (see below) | $date | $web | $topic |
header Header printed before the output | *Date* | *Web* | *Topic* |
noheader Supress header off

The format string can contain substitution patterns, these are:

String Substituded by
$date The date of last modification in TWiki format
$iso ISO date of last modification
$epoch Seconds since epoch of last modification
$topic The topic name
$web The web name

Examples

  • %RECENTCHANGES{}% displays:
%RECENTCHANGES{}%
  • <ul>%RECENTCHANGES{limit="10" format="<li>[[$web.$topic]]</li>" noheader="on"}%</ul> displays:
    %RECENTCHANGES{limit="10" format="
  • $web.$topic?
  • " noheader="on"}%

Plugin Settings

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

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Show most recently updated topics across webs

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 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 TWiki server.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip RecentChangesPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/RecentChangesPlugin.txt Plugin topic
    data/TWiki/RecentChangesPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/RecentChangesPlugin.pm Plugin Perl module
  • Configure the Plugin:
    • TWiki 4.0 and up: Run the configure script to enable the Plugin
    • Change the Plugin settings as needed
  • Test if the installation was successful:
    • Create a topic containing %RECENTCHANGES{}%

Plugin Info

Plugin Author: TWiki:Main.KoenMartens
Copyright: © 2006, TWiki:Main.KoenMartens
License: GPL (GNU General Public License)
Plugin Version: 20 Jun 2006 (V0.1)
Change History:  
20 Jun 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Benchmarks: GoodStyle 100%, FormattedSearch 100%, RecentChangesPlugin 99%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/RecentChangesPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/RecentChangesPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/RecentChangesPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

-- TWiki:Main.KoenMartens - 20 Jun 2006

Topic revision: r3 - 2006-06-21 - 17:16:11 - KoenMartens?
 

ParaEngine Developer Network

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 PEDN? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.RecentChangesPlugin