The Arcive of vBulletin Modifications Site. |
|
![]() |
|||||||||||||||||||||||||
This is a port of my 3.0.x modification. It shows, on your forumhome page, any spiders that are present (ones that show as a spider on your who's online page)
NOTE: If you are using a portal that shows who's online, this mod will mess up your portal. As of this date, I do not know of any working portals for 3.5 and I do not have the code to fix portals. Please understand what this mod does before you start crying that it doesn't work. This mod will show any spiders who show up as a spider on who's online as a spider on the forumhome page. It will NOT show a spider who shows up as a guest on who's online as a spider. It does not add additional spiders to the list either. PLEASE DO NOT INSTALL THIS IF YOU ARE UNABLE TO ADJUST YOUR OWN PORTAL TEMPLATES SO THAT THE PHRASE DOES NOT CONTAIN AN ERROR. Show Your Support
|
Comments |
#2
|
||||
|
||||
![]()
Can't this be done with a plugin only?
|
#3
|
||||
|
||||
![]() Quote:
|
#4
|
||||
|
||||
![]()
Typo in your FORUMHOME replace block: missing the $ from $numberspiders
![]() (otherwise, perfection.) |
#5
|
||||
|
||||
![]()
Thank you
![]() |
#6
|
|||
|
|||
![]()
Im a bit of an amateur, but I like the idea of this, so does my current version of vBulletin which is 3.0.6 allow me to use this?? I know .. damn amateurs.. Just not sure if Im using a "Portal" to display my who's online.
|
#7
|
||||
|
||||
![]() Quote:
|
#8
|
|||
|
|||
![]()
Thanks amy.
|
#9
|
||||
|
||||
![]()
If you want to show them on your forumdisplay page, here's what you do.
In forumdisplay.php Find: Code:
'iconcache', Code:
'wol_spiders', Code:
$numberguest = 0; Code:
$numberspiders = 0; $spiderlist = array(); Code:
$forumusers = $db->query_read(" SELECT user.username, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid, session.userid, session.inforum, session.lastactivity, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM " . TABLE_PREFIX . "session AS session LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid) WHERE session.lastactivity > $datecut ORDER BY" . iif($vbulletin->options['showforumusers'] == 1, " username ASC,") . " lastactivity DESC "); Code:
$forumusers = $db->query_read(" SELECT user.username, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid, session.userid, session.inforum, session.lastactivity,session.useragent, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM " . TABLE_PREFIX . "session AS session LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid) WHERE session.lastactivity > $datecut ORDER BY" . iif($vbulletin->options['showforumusers'] == 1, " username ASC,") . " lastactivity DESC "); Code:
// this is a guest $numberguest++; Code:
if (!empty($vbulletin->wol_spiders)) { if (preg_match('#(' . $vbulletin->wol_spiders['spiderstring'] . ')#si', $loggedin['useragent'], $agent)) { $agent = strtolower($agent[1]); $spider = $vbulletin->wol_spiders['agents']["$agent"]; $key = $spider['name']; if(array_key_exists($key,$spiderlist)) { $spiderlist[$key] = $spiderlist[$key] + 1; } else { $spiderlist[$key] = 1; } } } else { Code:
// this is a guest $numberguest++; $inforum["$loggedin[inforum]"]++; Code:
} Code:
$totalonline = $numberregistered + $numberguest; Code:
while ($spidername = current($spiderlist)) { if ($spidername > 1) { $loggedin['musername'] = trim(key($spiderlist)) . "(" . $spidername.")"; } else { $loggedin['musername'] = trim(key($spiderlist)); } $loggedin['userid'] = 0; eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";'); $numberspiders = $numberspiders + $spidername; next($spiderlist); } $totalonline = $numberregistered + $numberguest + $numberspiders; Code:
(<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_y_guests]</phrase>) Code:
(<phrase 1="$numberregistered" 2="$numberguest" 3="$numberspiders">$vbphrase[x_members_and_y_guests]</phrase>) Amy |
#10
|
||||
|
||||
![]()
And, if you want spiders to show up on your showthread.php, try these directions.
As above, let me know how they work. If they are good, I'll add them to the hack zip. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|