$parser->setFunctionHook( 'plural', array( __CLASS__, 'plural' ), SFH_NO_HASH );
$parser->setFunctionHook( 'numberofpages', array( __CLASS__, 'numberofpages' ), SFH_NO_HASH );
$parser->setFunctionHook( 'numberofusers', array( __CLASS__, 'numberofusers' ), SFH_NO_HASH );
+ $parser->setFunctionHook( 'activeusers', array( __CLASS__, 'activeusers' ), SFH_NO_HASH );
$parser->setFunctionHook( 'numberofarticles', array( __CLASS__, 'numberofarticles' ), SFH_NO_HASH );
$parser->setFunctionHook( 'numberoffiles', array( __CLASS__, 'numberoffiles' ), SFH_NO_HASH );
$parser->setFunctionHook( 'numberofadmins', array( __CLASS__, 'numberofadmins' ), SFH_NO_HASH );
static function numberofusers( $parser, $raw = null ) {
return self::formatRaw( SiteStats::users(), $raw );
}
+ static function activeusers( $parser, $raw = null ) {
+ return self::formatRaw( SiteStats::activeUsers(), $raw );
+ }
static function numberofarticles( $parser, $raw = null ) {
return self::formatRaw( SiteStats::articles(), $raw );
}
return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::images() );
case 'numberofusers':
return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::users() );
+ case 'activeusers':
+ return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::activeUsers() );
case 'numberofpages':
return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::pages() );
case 'numberofadmins':
'numberofarticles' => array( 1, 'NUMBEROFARTICLES' ),
'numberoffiles' => array( 1, 'NUMBEROFFILES' ),
'numberofusers' => array( 1, 'NUMBEROFUSERS' ),
+ 'activeusers' => array( 1, 'ACTIVEUSERS' ),
'numberofedits' => array( 1, 'NUMBEROFEDITS' ),
'numberofviews' => array( 1, 'NUMBEROFVIEWS' ),
'pagename' => array( 1, 'PAGENAME' ),