Extension:WhosOnline

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
WhosOnline

Release status:Extension status stable

ImplementationTemplate:Extension#type User activity, Special page
DescriptionTemplate:Extension#description Creates a list of logged-in & anonymous users currently online
Author(s)Template:Extension#username Maciej Brencz
Latest versionTemplate:Extension#version 1.5.0 (2015-08-24)
MediaWikiTemplate:Extension#mediawiki 1.30+
Database changesTemplate:Extension#needs-updatephp Yes
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
ParametersTemplate:Extension#parameters
  • $wgWhosOnlineShowAnons
Hooks usedTemplate:Extension#hook
BeforePageDisplayManual:Hooks/BeforePageDisplay
LoadExtensionSchemaUpdatesManual:Hooks/LoadExtensionSchemaUpdates

Translate the WhosOnline extension if it is available at translatewiki.net

Check usage and version matrix.

The WhosOnline extension adds a special page - Special:WhosOnline - for viewing the list of users currently viewing a page on the wiki.

Installation[edit]

  • Download and place the file(s) in a directory called WhosOnline in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'WhosOnline' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • If you want anonymous users IP addresses shown, add:
    $wgWhosOnlineShowAnons = true;
    
    to LocalSettings.php after the above statement. Default is not to show them, for privacy reasons.
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'WhosOnline' );, you need to use:

require_once "$IP/extensions/WhosOnline/WhosOnline.php";

Usage[edit]

Users who login after the extension is installed can be seen at Special:WhosOnline. Refresh the page if it is blank. As of version 1.3.1 it is possible to include the contents of the special page into a page: {{:Special:WhosOnline}}. If you use {{:Special:WhosOnline/10/shownav}} it will only show 10 users and will have the navigation controls.