It's better when it's simple

User Tools

Site Tools


whoisonline Plugin

Compatible with DokuWiki

  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" no
  • 2018-04-22 "Greebo" yes

plugin Counts the users actively using the wiki site and can make a list of their locations

Last updated on

Similar to onlinenumber

Tagged with ajax, users

For Hogfather and Igor support

  • Edit lib/plugins/whoisonline/syntax.php and replace (line 108 & 123)
    public function handle($match, $state, $pos, $handler) {
    public function render($mode, $renderer, $data) {
  • with
    public function handle($match, $state, $pos, Doku_Handler $handler) {
    public function render($mode, Doku_Renderer $renderer, $data) {


Copy the whoisonline folder into the /lib/plugins folder and that should do it. Please keep the name the same since the ajax portion is specifically looking for that location. The plugin uses a file to store the active users, no database necessary.

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.


For just a simple display of the online count add this:


If you want a popup list when you hover over the button just use this:


The popup list can be customized in the admin configuration. The default is {username}, but you can add all sorts of HTML to make it link to places. Here is what I use on my site…

<a href="/users:{username}">{fullname}</a> - <a href="/{pageid}">{pageid}</a>

This will make the popup list have their fullname that links to their user page on the wiki, and then the current page they are looking at which you can click to.

If you want to track the users but not show the count or the list just add the NOSHOW option on some footer to record their presence, then you can do the regular ~~whoisonline~~ on an admin page to view the results.



Basic syntax:


Configuration and Settings

By default the plugin only tracks users that are logged in. You can track anonymous users by IP address if you uncheck the IgnoreAnonymous option in the admin configuration screen.

By default the users are considered idle if they are not seen by the plugin for 5 minutes. You can change this setting in the admin configuration screen.

Check the styles.css to adjust any formatting. I use this in the sidebar so the width is set to 100% to fill the sidebar. That may not do in your situation.

Change Log

  • 2013-06-20
    • Initial release

Known Bugs and Issues

ToDo/Wish List

  • Tie into a sql database for large user bases
  • Make a buddy list option
  • Add more fields for display line
  • Add some grouping or sorting options
  • Add other languages


The idea from this came from this link which had a great code example. I formatted it for my needs and made a Dokuwiki plugin out of it.

Adding Email to Substitution List

On line 48 of syntax.php, replace:

if( isset($INFO['userinfo']) || ($this->getConf('ignoreAnonymous')==0)){ 
	$userdisplay = str_replace( array( "{username}" , 
					"{pageid}" ,
					"{fullname}" ,
					"{url}" ) ,
				array(	$INFO["client"] ,
					$INFO["id"] ,
					$INFO["userinfo"]["name"] ,
					$_SERVER["REQUEST_URI"] ) ,
				$displaypattern );


if( isset($INFO['userinfo']) || ($this->getConf('ignoreAnonymous')==0)){ 
	$userdisplay = str_replace( array( "{username}" , 
					"{pageid}" ,
					"{fullname}" ,
					"{email}" ,
					"{url}" ) ,
				array(	$INFO["client"] ,
					$INFO["id"] ,
					$INFO["userinfo"]["name"] ,
					$INFO["userinfo"]["mail"] ,
					$_SERVER["REQUEST_URI"] ) ,
				$displaypattern );

on line 10 of settings.php


$lang['displayline'] = 'HTML to use when making the popup user list. Possible replacement strings are: {username}, {fullname}, {pageid}, {url}';


$lang['displayline'] = 'HTML to use when making the popup user list. Possible replacement strings are: {username}, {fullname}, {email}, {pageid}, {url}';


plugin/whoisonline.txt · Last modified: 2022-07-17 22:20 by coastGNU

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki