TIP ContributorsPlugin is not installed on Foswiki.org.

ContributorsPlugin

List editors of a topic, and topics edited by a user"

Usage

Contributors to a topic

This plugin can be used to show a list of editors of a page. The simplest way to add topic Contributor information to a topic, is to add contributorsplugin to the SKIN setting in SitePreferences

   * Set SKIN=contributorsplugin,pattern

CONTRIBUTORS { attributes } -- list editors of a topic

  • A %CONTRIBUTORS% without parameters shows a list of all revisions using the default format
  • The following standard attributes are recognized
    Name Description Default
    web specify the web the topic is in if web is not set in the topic param currently viewed web
    topic specify the web.topic to show the revision information for currently viewed topic
    rev specify a revision to begin counting down from most recent revision
    last show the last N edits 4
    nodups if "on", suppresses duplicate lines, useful for showing a list of the authors (will only show the most recent change for each author) off
    header, footer, separator header and footer and separator as per FormattedSearch no header or footer and separator defaults to $n
    format Format of revision information, see supported formatting tokens below * $author -- Revision $rev on date $date
  • Supported formatting tokens (same as VarREVINFO):
    Token: Unit: Example
    $web Name of web Current web
    $topic Topic name Current topic
    $rev Revision number. Prefix r1. to get the usual r1.5 format 5
    $username Login username of revision jsmith
    $wikiname WikiName of revision JohnSmith
    $wikiusername WikiName with Main web prefix Main.JohnSmith
    $date Revision date. Actual date format defined as {DefaultDateFormat} in configure 21 Sep 2006
    $time Revision time 23:24:25
    $iso Revision date in ISO date format 2006-09-22T06:24:25Z
    $min, $sec, etc. Same date format qualifiers as GMTIME{"format"}  
  • EXAMPLE:
    • Show all the authors who edited Main.WebHome between revision r25 and r15
    • %CONTRIBUTORS{topic="Main.WebHome" rev="1.25" last="10" format=" * $author" header="Authors from rev 1.15 to 1.25:" nodups="on"}%
  • The output of the the CONTRIBUTORs Macro is quite disk IO intensive, so the result is cached in the Plugins work_area

SEARCHLOG { attributes } -- list editors of a topic

  • A %SEARCHLOG% without parameters shows a list of requests made to foswiki
  • The following standard attributes are recognized
    Name Description Default
    "query" query search but with a very restriced set of fields (time, user, webtopic, extra, addr), like d2n('20 Oct 2010') < time AND time < d2n('25 Oct 2010') AND action = 'save' true
    from A time string like '10 Oct 2010' 7days ago
    to A time string like '10 Oct 2010' time now
    header, footer, separator header and footer and separator as per FormattedSearch no header or footer and separator defaults to $n
    format Format of revision information, see supported formatting tokens below | $time | $action | $webtopic Revision $rev | $user | $extra |
    limit only show a limited set of matching results, to avoid thrashing the web server (you can tune this for your circumstances) 25
    reverse reverse the time order of the output set false
    showRepRev if "on", save repRev events (when a new revision is not created because the same user edits the topic again withint the timeout period off
  • Supported formatting tokens
    Token: Unit: Example
    $index a counter that increases for each item matching the query  
    $webtopic web.topic affected in the log item  
    $web web affected in the log item  
    $topic topic affected in the log item  
    $rev revision number accessed/modified in the log item (note: this does a lookup of the topic revision info, so increases the load on the server)  
    $user Login username of revision jsmith
    $action save, view, edit, attach etc  
    $extra any extra information logged by foswiki  
    $time action time 23:24:25
    $min, $sec, etc. Same date format qualifiers as GMTIME{"format"}  
    $from, $to, $last and $from($time specifiers), $to($time specifiers), $last($time specifiers) (header and footer only) format the from, to and last time found in seconds since the epoch - useful for making a simple pager interface  

EXAMPLE: show all save's from 10 Oct 2010, with a simple pager in the header&footer

%SEARCHLOG{
 "d2n('20 Oct 2010') < time AND time < d2n('25 Oct 2010') AND action = '%URLPARAM{"action" default="save"}%'"
   from="%URLPARAM{"from" default="10 Oct 2010"}%"
   limit="%URLPARAM{"limit" default="25"}%"
   header="| $index entries |||| $from to $last [[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?from=$epochlast][more..]]| $n| *Date* | Action | Topic | User | Extra |"
   footer="| $index entries |||| $from to $last [[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?from=$epochlast][more..]]|"
}%

EXAMPLE: show all save's by a user (note that you need to use the user's loginname

%SEARCHLOG{
 "d2n('20 Oct 2010') < time AND user='%USERNAME%' AND action = '%URLPARAM{"action" default="save"}%'"
   from="%URLPARAM{"from" default="10 Oct 2010"}%"
   limit="%URLPARAM{"limit" default="25"}%"
   header="| $index entries |||| $from to $last [[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?from=$epochlast][more..]]| $n| *Date* | Action | Topic | User | Extra |"
   footer="| $index entries |||| $from to $last [[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?from=$epochlast][more..]]|"
}%

alert WARNING: this plugin will display information from the logs to anyone, so will show the viewer who has done what.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Info

Much credit goes to Ducky Sherwood for creating the original version CONTRIBUTORS Plugin. I've re-implemented it to use more current foswiki practices.

Built in Collaboration with:

Author(s): Foswiki:Main.SvenDowideit - http://fosiki.com a wikiringlogo20x20.png WikiRing founding partner
Copyright: 2010 © Sven Dowideit fosiki
Icon: based on eXperience Crystal, by David Christian Berg
License: GPL 3 (Gnu General Public License)
Release: 2.0
Version: 10305 (2010-12-14)
Change History:  
Dependencies: None
Home page: http://foswiki.org/bin/view/Extensions/ContributorsPlugin
Support: http://foswiki.org/bin/view/Support/ContributorsPlugin

Topic revision: r2 - 07 Mar 2011, GeorgeClark - This page was cached on 31 Jul 2016 - 05:42.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License