Extension:Whos online

Quick little extension that shows the number of guests and the number of registered users online.

Maintainer
Shannon McNaught (smcnaught) - I am also available on irc.chekmate.org #MediaWiki

Homepage
ChekMate Technical Focus Group

License
Copyright (C) 2005 Shannon McNaught

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Introduction
A quick and dirty implementation of WhosOnline for MediaWiki. This script was created for a user within the #MediaWiki IRC channel. This version displays the number of Guests and Registered users online.

The timeperiod is presently set to 3600 seconds (1 hour), thus it will show how many unique users have accessed the site within the last hour.

Change $timeperiod to a more appropriate time frame if desired.

Note:
 * The most up to date version of the original extension can be found at chekmate.org.
 * Wikia made some changes to this since the original version caused database problems. You can find those changes at svn.wikimedia.org.

Special Thanks

 * Special thanks to Xypron for adding the table creation functionality within the PHP script.

Example
Users Online: Guests: 1 Registered: 1 (Smcnaught)

The above example in Wiki text: &lt;b&gt;Users Online&lt;/b&gt;: &lt;whosonline&gt;&lt;/whosonline&gt;

Allowing wikiuser to have CREATE access
Here is how you can configure your wikiuser to have CREATE access to your wikidb: [user@server extensions]$ mysql -u root -p wikidb Enter password: mysql> REVOKE ALL PRIVILEGES ON *. * FROM 'wikiuser'@'localhost'; mysql> REVOKE GRANT OPTION ON *. * FROM 'wikiuser'@ 'localhost'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ON *. * TO 'wikiuser'@ 'localhost';

Add to your LocalSettings.php file
Add the following to the end of LocalSettings.php: and if using 1.9.x:

Other sites using this extension

 * One Euro Wiki
 * The Quarter Wiki
 * One Buck Wiki
 * Five Dollar Wiki
 * EntreWiki
 * ChekMate Technical Focus Group

Updated version for MediaWiki 1.11.0
v.2.1 by Max Lee