changes2Add my vote for this tag version_control3Add my vote for this tag create new tag
, view all tags

History Plugin

Shows a complete history of a document


This plugin shows a complete or partial history of a document. The output can arbitrarily be formatted. An example for a Wikipedia-like history is included.

Since TWiki 4.0.3 - when using PatternSkin enabling the HistoryPlugin changes the "History" link in the bottom action bar so it opens a page with a nice user interface where you can select the versions to compare.

With older versions of TWiki you will need to tweak the templates.

If CompareRevisionsAddOn is installed and activated the "History" user interface will allow you to choose how the changes are rendered (interweaved vs side-by-side, and context).

If RevCommentPlugin is installed and activated the "History" page will show the comments entered for each revision.

This plugins is designed to work together with CompareRevisionsAddOn and RevCommentPlugin but works well on its own or with just one of the two other plugins.

Syntax Rules

  • %HISTORY{parameters}
    Supported parameters:
    Parameter Description Default
    "format" or format="format" Format of one line, may include any variable which is supported by %REVINFO% "r$rev - $date - $wikiusername"
    topic="topic" Topic name Current topic
    web="web" Web name Current web
    nrev="nrev" Number of revisions to show. Ignored, if both rev1 and rev2 are specified Plugin preference variable NREV
    rev2="rev2" Newest revision to show rev1+nrev, if rev1 is specified, latest revision otherwise
    rev1="rev1" Oldest revision to show rev2-nrev
    reverse="on/off" Show newest revisions first, if on "on"
    header="text" Text to print before the list. May contain the variables $next and $previous (see below) "$next"
    footer="text" Text to print after the list. May contain the variables $next and $previous (see below) "$previous"

The parameters header and footer may contain the variables $next and $previous, which will only be evaluated, if there are newer or older revisions available for the topic which are not listed according to rev1, rev2, nrev. These variables take the syntax $next{'text' url='url'} (analog for $previous). text is the text which should be printed, url is the url for a corresponding link. The variables $rev1, $rev2, $nrev in text or url will be replaced by appropriate values for the next or previous block of revisions. See the attached oopshistory.tmpl for an example of how to use this.

The following variables are replaced only, if there is a corresponding %HISTORY% on the page. If more than one %HISTORY% is used on the same page, the values from the last one will be used.

  • %HISTORY_REV1%: Oldest revision from the printed history
  • %HISTORY_REV2%: Latest revision from the printed history
  • %HISTORY_NREV%: Number of the printed revisions
  • %HISTORY_MAXREV%: Latest available revision of the document


The call %HISTORY% shows a simple list of available revisions like

r3 - 17 Feb 2005 - 09:56 - AnUser
r2 - 31 Dec 2004 - 10:22 - AnotherUser
r1 - 15 Nov 2003 - 01:23 - YetAnotherUser

For a more complex example see the attached oopshistory.tmpl which also allows the comparison of two selected revisions.

Example screenshot of the topic history with HistoryPlugin enabled and working with CompareRevisionsAddOn and RevCommentPlugin


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 HistoryPlugin.zip in your twiki installation directory. Content:
    File: Description:

Plugin Info

Plugin Author: TWiki:Main/JChristophFuchs
Copyright: © 2005-2007, JChristophFuchs
© 2007-2010 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2010-11-12: (V1.4)
Change History:  
2010-11-12: 1.4 TWikibug:Item6530: Doc improvements
2007-12-09: 1.3 Kenneth Lavrsen: Restored the features that were lost in revision 1.1 including: Showing comments made by RevCommentPlugin, selection of render styles "interweave" and "side by side" provided by CompareRevisionsAddOn, and link to rdiff history. Restored compatibility with TWiki-4.1 which means removing the dependency of 4.2 only CSS feature. Updated the default rev format to 4.X format.
2007-11-13: 1.2 Michael Daum: removed cruft from plugin, updates to use modern TWiki APIs, added some more flexibility to create a diff interface, removed plugin topic options
2007-11-07: 1.1 Arthur Clemens: updated to TWiki 4.2; improved user interface.
2007-01-19: 1.002 Corrected coding error that causes the plugin to fail with HISTORY tag in topic
2006-04-09: 1.001 Updated for new PatternSkin in TWikiRelease04x00x02
2005-02-17: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle 100%, FormattedSearch 99%, HistoryPlugin 97%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/HistoryPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/HistoryPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/HistoryPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 HistoryPlugin.md5 r9 r8 r7 r6 r5 manage 0.2 K 2010-11-13 - 05:24 PeterThoeny  
Compressed Zip archivetgz HistoryPlugin.tgz r9 r8 r7 r6 r5 manage 65.5 K 2010-11-13 - 05:24 PeterThoeny  
Compressed Zip archivezip HistoryPlugin.zip r9 r8 r7 r6 r5 manage 67.1 K 2010-11-13 - 05:24 PeterThoeny  
Unknown file formatEXT HistoryPlugin_installer r3 r2 r1 manage 3.4 K 2010-11-13 - 05:24 PeterThoeny  
Edit | Attach | Watch | Print version | History: r20 < r19 < r18 < r17 < r16 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r20 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.