The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Who's online on non-vB page (with usernames, same rules as Who's Online on forumhome) Details »» | |||||||||||||||||||||||||||
Who's online on non-vB page (with usernames, same rules as Who's Online on forumhome)
Developer Last Online: Jun 2020
PLEASE CLICK ON THE INSTALL BUTTON IF YOU INSTALLED THIS! THANKS!
What does this hack do? Using this hack, you can show who is currently on your forums from anywhere else on your website! The page, though, must be a PHP page. If you want to display this information on another webpage by integrating it (which you'll probably want to ), just put PHP Code:
PHP Code:
THE BELOW IS ONLY IF YOU ARE USING ONLINE.PHP If you are using online.php, then this line of code MUST be at the top of the page! If you don't want to show the total users online at the top of the page, though, then remove PHP Code:
PHP Code:
Features
Instructions Download the attached online.php if you want to show invisible users to administrators, etc., or download online_external.php if you don't want to worry as much about things , and follow these instructions:
That's it! Show Your Support
|
Comments |
#62
|
|||
|
|||
Love it. . Installed It. . . Have One Question,
I am using online.php. The members usernames and guests all show up. . . is it a possability to link each members usernames to there profile? ThankS!1 |
#63
|
||||
|
||||
Anyway of having it show total users online rather than say members and guests.. so it appears
Users online: 302 |
#64
|
|||
|
|||
It worked fine, but it threw off my alignment on the whole page. I have it all centered and when I included the file it made everything left aligned.
Also, is there anyway I can change the way it formats it? I want it to say like... -Members Online: 23 -Visitors Online: 2 Basically is it possible just to pull the numbers out? Also, would it be possible to find the total number of members? |
#65
|
|||
|
|||
This works as advertised.
I am hoping to replicate my forum who's online style. What would it take to get it looking like this: Quote:
|
#66
|
|||
|
|||
Okay I modded the script somewhat to create the above mentioned look but
I'm stuck on the Most users online bit. heres my code thus far: Code:
<?php error_reporting(E_ALL & ~E_NOTICE); require_once("./global.php"); $datecut = time()-$vboptions['cookietimeout']; $regmembername = $DB_site->query("SELECT DISTINCT username,options FROM ".$tableprefix."user,".$tableprefix."session WHERE ".$tableprefix."session.userid=".$tableprefix."user.userid AND ".$tableprefix."session.lastactivity>$datecut ORDER BY username ASC") or exit("oops2"); while($regmember = $DB_site->fetch_array($regmembername)) { $regmember['options'] = intval($regmember['options']); foreach($_USEROPTIONS as $optionname => $optionval) { $regmember["$optionname"] = iif($regmember['options'] & $optionval, 1, 0); } if ((($regmember['invisible'] == 0)) and $regmemberson or ($bbuserinfo['usergroupid'] == 6 and $regmember['invisible'] == 1)) { $regmemberson .= ", "; } $regmembercomma++; if ($regmember['invisible'] == 0 or $bbuserinfo['usergroupid'] == 6) { if ($regmember['invisible'] == 1) { $userinvisible = "*"; } $regmemberson .= $regmember['username'].$userinvisible; } else { $regmembercomma++; } } if (!$regmemberson) { $regmemberson = "(none)"; } $regmembers = $DB_site->query_first("SELECT COUNT(DISTINCT userid) AS membersonline FROM ".$tableprefix."session WHERE userid>0 AND ".$tableprefix."session.lastactivity>$datecut") or exit("oops3"); $regmembersno = number_format($regmembers['membersonline']); $guests = $DB_site->query_first("SELECT COUNT(userid) AS guestsonline FROM ".$tableprefix."session WHERE userid=0 AND ".$tableprefix."session.lastactivity>$datecut") or exit("oops4"); $guestson = number_format($guests['guestsonline']); $totalonline = $regmembersno + $guestson; print 'Active users online: '.$totalonline.' ('.$regmembersno.' users and '.$guestson.' guests online.)'; echo "<br>$regmemberson"; ?> I was thinking of pulling the data from the original /forum/online.php file but I am uncertain of the approach to use, the code seems fairly long to me and I'm pretty sure it can be reduced any help would be greatly appreciated. thx |
#67
|
|||
|
|||
i get MYSQL errors
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/wshh/public_html/online_external.php on line 14 Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/wshh/public_html/online_external.php on line 15 I use vbulletin 3.5.4 |
#68
|
||||
|
||||
The version doesn't work with vB 3.5.x I think then. You're posting in a topic from more than 1 year old and vB 3.5.x wasn't released back then.
|
#69
|
|||
|
|||
do u know any mods for 3.5.4 that can show whos online stats on a non vb page
|
#70
|
|||
|
|||
Hi Gary King ..any plan to update this hack to 3.5.4 or next 3.6 ?
|
#71
|
||||
|
||||
Not sure what happend to Gary since he hasnt posted on this hack
in quite some time, but fixing it to work with 3.5.4 was easy, below are my changes to online_external.php search for PHP Code:
PHP Code:
Member online: X. Guest online: X. Place the script outside your forums directory obviously |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|