class MyFirstPlugin_OnlineAnyWhere_EventListener
{
public static function templateHook($hookName, &$contents, array $params, XenForo_Template_Abstract $template)
{
if ($hookName == 'onlineUsersAnyWhereHook')
{
$onlineUsers = self::getOnlineUsers();
$ourTemplate = $template->create('onlineUsersAnyWhere', $template->getParams());
$ourTemplate->setParam('onlineUsers', $onlineUsers);
$rendered = $ourTemplate->render();
$contents = $rendered . $contents;
}
}
public static function getOnlineUsers()
{
return 'Online 999999 users';
}
}