Extension:CurrentUsers

Allows a list of currently active users to be embedded into a page using a template. The list contains an entry for each of the logged in users who have accessed the wiki within an expiry period. The last list item is the number of anonymous users who have accessed the wiki within the expiry period.

The last access time of the user and their name or IP address is recorded in a file called CurrentUsers.txt which resides in the same directory as the main CurrentUsers.php script. Note that currently the CurrentUsers.txt file must exist for the extension to work.

Installation
Create a directory called CurrentUsers in your wiki's extensions directory. Then, copy the source code from OrganicDesign:Extension:CurrentUsers.php and save it as a file called CurrentUsers.php into the newly created directory. Create an empty file in there too called CurrentUsers.txt.

Add an include statement into your LocalSettings.php file to include the downloaded CurrentUsers.php file as usual, for example:

Create an template article called Template:CurrentUsers which will define the layout of the items. The first parameter is the time, the second is the username and the third is the number if guests (which is only used on the last line). Here's the one we use on our site which lists the items as a bullet list with the names linking to the associated user pages.

Usage
To add the list to an article, use the following parser function syntax:

Configuration settings
Here are some global variables which affect the operation of the extension. These should be set in your LocalSettings file after the include of the script.