%META:TOPICINFO{author="TWikiContributor" date="1280125814" format="1.1" version="1"}%
---+!! <nop>UserInfoPlugin
<!--
   Contributions to this plugin are appreciated. Please update the plugin page at
   http://twiki.org/cgi-bin/view/Plugins/UserInfoPlugin or provide feedback at
   http://twiki.org/cgi-bin/view/Plugins/UserInfoPluginDev.
   If you are a TWiki contributor please update the plugin in the SVN repository.
-->
<div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;">
%TOC{title="Page contents"}%
</div>
%SHORTDESCRIPTION%

This plugin analyzes the log files of your twiki-engine and extracts useful information to be displayed on your site.

__NOTE:__ Please respect the privacy of your users and don't display too much information.

---++ Syntax Rules 

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

The format parameter might contain the following variables:

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

---++ Plugin Settings

   * Set SHORTDESCRIPTION = Render information about users on a TWiki site

   * add a list of host addresses to ignore users coming from them
      * Set IGNORE_HOSTS = 
   * add a list of users to ignore
      * Set IGNORE_USERS = %USERSWEB%.TestUser

---++ Plugin Installation Instructions

   * Download the ZIP file from the Plugin web (see below)
   * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
     | *File:* | *Description:* |
     | ==data/TWiki/%TOPIC%.txt== | Plugin topic |
     | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
     | ==lib/TWiki/Plugins/%TOPIC%/Core.pm== | Plugin Perl module |
   * Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section.

---++ Test

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

<blockquote>
<table border="0" cellspacing="5px"><tr>
<td valign="top">
%NRVISITORS% of %NRUSERS% registered user(s), %NRGUESTS% guest(s) currently online: %BR%
%VISITORS% %BR%
</td>
<td valign="top" rowspan="2">
%NRLASTVISITORS{days="1"}% visitor(s) today (%SERVERTIME{"$day $month $year"}%): %BR%
%LASTVISITORS{days="1" format="   * $wikiusername"}%
</td>
<tr>
<td valign="top">
Recently registered users: %BR%
%NEWUSERS{max="20"}%
</td>
</tr></table>
</blockquote>

---++ Plugin Info

|  Plugin Author: | TWiki:Main.MichaelDaum |
|  Copyright: | &copy; 2005-2006 Michael Daum, %BR% &copy; 2005-2010 TWiki:TWiki.TWikiContributor |
|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
|  Plugin Version: | 19259 (2010-07-25) |
|  Change History: | <!-- specify latest version first -->&nbsp; |
|  2010-07-25: | TWikibug:Item6530 - doc fixes |
|  09 June 2006: | fixed duplicate users in LASTVISITORS; use IGNORE_USERS in LASTVISITORS |
|  27 May 2006: | fixed error computing the number of last visitors (TWiki:Main.DavidBright); exclude the <no>TWikiAdminGroup "user" from the statistics; check back if the user found in the logs already approved his account; fixed use of non-numerical value in comparison |
|  17 Feb 2006: | optimized tag parsing; using Time::Local instead of Date::Parse; added =header= and =footer= format strings; fixed error restricting seen visitors by days |
|  16 Feb 2006: | OO-ified the plugin to compile on demand; added IGNORE_USER plugin parameter |
|  14 Feb 2006: | fixed detection of the session directory |
|  02 Feb 2006: | fixed numerical comparison of dates (TWiki:Main/AntonAylward) |
|  05 Aug 2005: | removed dependency on the <nop>SessionPlugin |
|  27 Apr 2005: | fixed getting guests + some minor glitches | 
|  12 Apr 2005: | initial release |
|  &nbsp; | fixed =sep= handling, fixed =$host= parsing |
|  TWiki Dependency: | $TWiki::Plugins::VERSION 1.024 |
|  CPAN Dependencies: | Time::Local |
|  Other Dependencies: | none |
|  Perl Version: | 5.8 |
|  TWiki:Plugins/Benchmark: | TWiki:TWiki/GoodStyle nn%, TWiki:TWiki/FormattedSearch nn%, %TOPIC% nn% |
|  Plugin Home: | TWiki:Plugins/%TOPIC% |
|  Feedback: | TWiki:Plugins/%TOPIC%Dev |
|  Appraisal: | TWiki:Plugins/%TOPIC%Appraisal |
