UserInfoPlugin

This plugin analyses the log files of your twiki-engine and extracts usefull information to be displayed on your site.
Warning: please respect the privacy of your users and don't display too much information.

Syntax Rules

Tag Description
%VISITORS{format="..." max="..." sep="..."}% list of users currently logged in
defaults: format="\t* $wikiusername" sep="$n" max="unlimited"
%NRVISITORS% number of users currently online
%LASTVISITORS{format="..." max="..." sep="..." days="..."}% list of users that recently visited the site
defaults: format="\t* $date: $wikiusername" sep="$n" max="unlimited" days="1"
%NRLASTVISITORS{days="..."}% list of users that recently visited the site
defaults: days="1"
%NRUSERS% number of registered users
%NRGUESTS% number of guest users currently online
%NEWUSERS{format="..." max="..." sep="..."}% list of users that recently registerd
defaults: format="\t* date: $wikiusername" sep="$n" max="10"

The format parameter might containt the following variables:

Variable Description Valid in
$counter enumeration %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$wikiname wikiname of the visitor %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$username username of the visitor %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$wikiusername wikiusername of the visitor %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$date date of last visit/registration %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$time time of last visit %VISITORS%, %LASTVISITORS%
$host host of visitor %VISITORS%, %LASTVISITORS%
$topic topic that a visitor viewed last %VISITORS%, %LASTVISITORS%
$n newline %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$quot double-quote sign %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$percnt percentage sign %VISITORS%, %LASTVISITORS%, %NEWUSERS%
$dollar dollar sign %VISITORS%, %LASTVISITORS%, %NEWUSERS%

Demo

Here's a demo for rendering user stats.

Plugin Settings

  • Set SHORTDESCRIPTION = Render information about users on your TWikiSite

  • add a list of host addresses to ignore users comming from them
    • Set IGNORE_HOSTS =

Plugin Installation Instructions

This plugin has been tested on TWiki/Beijing, TWiki/Cairo and TWiki/Dakar. If you are installing it on TWiki/Cairo you need the TWiki:Plugins/SessionPlugin. TWiki/Dakar has build-in support for cgi sessions.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip UserInfoPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/UserInfoPlugin.txt Plugin topic
    data/TWiki/UserInfoPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/UserInfoPlugin.pm Plugin Perl module
  • (Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.

If the plugin is installed correctly then you should get valid output for the tags below:

%NRVISITORS% of %NRUSERS% registered user(s), %NRGUESTS% guest(s) currently online:
%VISITORS%
%NRLASTVISITORS{days="1"}% visitor(s) today (04 May 2024):
%LASTVISITORS{days="1" format=" * $wikiusername"}%
Recently registered users:
%NEWUSERS{max="20"}%

Plugin Info

Plugin Author: TWiki:Main/MichaelDaum
Plugin Version: v1.3
Change History:  
05 Aug 2005: removed dependency on the SessionPlugin
27 Apr 2005: fixed getting guests + some minor glitches
12 Apr 2005: initial release
  fixed sep handling, fixed $host parsing
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: Date::Parse
Other Dependencies: (SessionPlugin)
Perl Version: 5.005
License: GPL (GNU General Public License)
TWiki:Plugins/Benchmark: TWiki:TWiki/GoodStyle nn%, TWiki:TWiki/FormattedSearch nn%, UserInfoPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/UserInfoPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/UserInfoPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/UserInfoPluginAppraisal

-- TWiki:Main/MichaelDaum - 07 Apr 2005

Navigation

%IFSKINSTATETHEN{searchbox="pos2"}%

%FISKINSTATE%
%MYSIDEBAR%

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback