The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
total visitors online plugin not working
I have a strange issue here.
I'm using this active plugin with global_start hook location for both desktop and mobile templates. It works fine in mobile (navbar), but not in desktop (header template) Same exact code in plugin, same code in templates: Code:
// get online users $datecut = TIMENOW - $vbulletin->options['cookietimeout']; $guestsarry = $db->query_first("SELECT COUNT(host) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut"); $membersarry = $db->query_read("SELECT DISTINCT userid FROM " . TABLE_PREFIX . "session WHERE userid <> 0 AND lastactivity > $datecut"); $msxguests = intval($guestsarry['sessions']); $msxmembers = intval($db->num_rows($membersarry)); $msxtotal = $msxmembers + $msxguests; vB_Template::preRegister('navbar_link',array('msxtotal' => $msxtotal, 'msxmembers' => $msxmembers, 'msxguests' => $msxguests)); // get online users Code:
<div style="background-color: #fff; text-align: center; padding: 10px; float: right"> <span style="font-size: 16px; color: #777">there are <span style="color: #43A6DF; font-weight: bold">{vb:raw $msxtotal}</span> people online</span> </div> I have the code in the header template in desktop version and navbar template in mobile. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|