The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
What code do I put to show Number Of Users Online / Total Users somewhere else?
Just below my Navbar, I have a code that says: We have X users online, of a total X. I need to find the code to replace the X ====== Since this post, I have... ======== Found a hack that runs the queries in the header, but phpinclude_start template does not exist in 3.7. Where else can I add: Code:
if (strpos($_SERVER['PHP_SELF'], 'index.php') == false) { $datecut = TIMENOW - $vboptions['cookietimeout']; $headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut"); $headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut"); $headerguests=$headerguests[count]; $headerusers=$headerusers[count]; $totalonline=$headerguests+$headerusers; } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|