View Full Version : wtd: spiders hack
xtreme-mobile
10-21-2005, 03:35 PM
hey guys
has anyone worked out how to get the "show spiders on forumhome" hack to work on the portal?
as it shows XXmembers, XXguests, [ARG:3 Spiders] on the portal :(
cheers
see my forum if your not sure what i mean
http://www.talk-365.com
skizzy203
10-22-2005, 03:50 PM
I am having the same issue.
http://www.automotivephoto.com
Can someone get it fiured out. I am sure its a simple module edit, but I have no clue where to start.
sKiz
skizzy203
10-22-2005, 06:05 PM
What would be great is to see a module that has the spiders + "Who's online" + "Today's Visitor's" all in one nice tidy "How to"!
Anyone here up for it? I havent a clue and don't have the time to sit and figure it out at the moment.
sKiz
Nneel
10-23-2005, 06:46 AM
umm its a nice theme.....wish it had a module for spider frequency display..as like mkportal...it would be nice...
xtreme-mobile
10-26-2005, 01:28 PM
any one come up with a fix for this yet :(
christianb
10-27-2005, 11:59 AM
after 2="$numberguests" add 3="$numberspiders"
That gets rid of the argument - the issue is showing the number rather than total in guests.
xtreme-mobile
10-27-2005, 01:40 PM
after 2="$numberguests" add 3="$numberspiders"
That gets rid of the argument - the issue is showing the number rather than total in guests.
get rid of it from where?
what file in the portal needs to be changed?
many thanks
dean
christianb
10-27-2005, 01:47 PM
adv_portal_onlineusers shows arguments 1 & 2 for use with the vbphrase. This assumes that the other hack has been implemented
http://www.vbulletin.org/forum/showthread.php?t=91569&page=1&pp=15
add 3="$numberspiders" after 2="$numberguests" in adv_portal_onlineusers.
To display spiders, onlineusers.php (in modules) needs to be edited - but I've not figured out how yet.
divided_by_fear
10-31-2005, 08:10 AM
has anyone figured this out yet cause it dont seem to show any numbers on the vbadvanced home page for the spiders? 1 members and 0 guests and spiders
divided_by_fear
11-26-2005, 11:41 PM
sooo....... or did everyone give up on this too.........
xtreme-mobile
11-28-2005, 05:56 PM
adv_portal_onlineusers shows arguments 1 & 2 for use with the vbphrase. This assumes that the other hack has been implemented
http://www.vbulletin.org/forum/showthread.php?t=91569&page=1&pp=15
add 3="$numberspiders" after 2="$numberguests" in adv_portal_onlineusers.
To display spiders, onlineusers.php (in modules) needs to be edited - but I've not figured out how yet.
this is all thats in the portal_onlineusers template
<tr>
<td class="thead"><span class="smallfont"><phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase></span></td>
</tr>
<tr>
<td class="$altbgclass"><span class="smallfont">$activeusers</span></td>
</tr>
<tr>
<td class="$bgclass"><span class="smallfont"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></span></td>
</tr>
what shall i remove?
christianb
11-28-2005, 06:33 PM
change:
<phrase 1="$numberregistered" 2="$numberguest">
to:
<phrase 1="$numberregistered" 2="$numberguest" 3="$numberspiders">
xtreme-mobile
11-28-2005, 08:46 PM
thats a bit better :)
thanks
skizzy203
12-10-2005, 07:38 AM
I have done this in "adv_portal_onlineusers" template, but the spiders are still not showing on CMPS..
What could be my problem?
venomx
02-13-2006, 08:43 PM
You will need to make a new most_users_ever_online_was_x_y_at_z say name it most_users_ever_online_was_x_y_at_z2 and include the original data.
Then edit the portal_onlineusers template to use the new phrase...
This will fix it until someone makes the addon/mod...
BTW thats what I did when I ran VB 3.0.7 because it was suggested to me here...
ashketchum
02-26-2006, 01:10 AM
adding that $numberspiders doesn't change much. Only removes the ARG 3 undefined text. But it now displays x members and y guests and spiders. I want it to display x members y guests and z spiders. I tried editing that module file and I was able to display x members and y guests and 0 spiders.:( I think some extra SQL queries need to be added on that module just like we add on the online.php file. Only someone who knows SQL could do this.
Is there anyone who can help? Here is the hack below.
1. In index.php
Find:
----------------------
'eventcache',
----------------------
Add After:
----------------------
'wol_spiders',
----------------------
Find:
----------------------
$numberguest = 0;
----------------------
Add after:
----------------------
$numberspiders = 0;
----------------------
Find:
----------------------
if ($vbulletin->userinfo['userid'])
{
// fakes the user being online for an initial page view of index.php
----------------------
Add Above:
----------------------
$spiders = $db->query_read("
SELECT user.username, session.useragent,user.userid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM " . TABLE_PREFIX . "session AS session
". iif($vbulletin->options['WOLguests'], " LEFT JOIN " . TABLE_PREFIX . "user AS user
USING (userid) ", ", " . TABLE_PREFIX . "user AS user") ."
WHERE session.lastactivity > $datecut
". iif(!$vbulletin->options['WOLguests'], " AND session.userid = user.userid", "")
."
ORDER BY session.userid
");
----------------------
Find:
----------------------
unset($userinfos, $loggedin);
----------------------
Add Above:
----------------------
$spiderlist = array();
while ($spidercand = $db->fetch_array($spiders))
{
$userid = $spidercand['userid'];
if (!empty($vbulletin->wol_spiders))
{
if (preg_match('#(' . $vbulletin->wol_spiders['spiderstring'] . ')#si', $spidercand['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;
}
}
}
}
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);
}
----------------------
Find:
----------------------
$totalonline = $numberregistered + $numberguest;
----------------------
Replace with:
----------------------
$numberguest = $numberguest - $numberspiders;
$totalonline = $numberregistered + $numberguest + $numberspiders;
----------------------
2. In Online.php
Find:
----------------------
while ($users = $db->fetch_array($allusers))
----------------------
Add Above:
$numberspiders = 0;
$numberguests = 0;
----------------------
Find:
----------------------
$guests["$count"]['spidertype'] = $spider['type'];
----------------------
Add Below:
----------------------
$numberspiders ++;
----------------------
Find:
----------------------
$totalonline = $numbervisible + $numberguests;
----------------------
Replace with:
----------------------
$numberguests = $numberguests - $numberspiders;
$totalonline = $numbervisible + $numberguests + $numberspiders;
----------------------
3. Replace the contents of the template forumhome_loggedinuser with:
<if condition="$loggedin[userid]"><a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]<else />$loggedin[musername]</if>
4. In your forumhome template,
Find:
----------------------
<a href="online.php?$session[sessionurl]" rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
----------------------
Replace with:
----------------------
<a href="online.php?$session[sessionurl]" rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest" 3="$numberspiders">$vbphrase[x_members_and_y_guests]</phrase>)
----------------------
In the template WHOSONLINE find:
----------------------
2="$numberguests"
----------------------
Add after:
----------------------
3="$numberspiders"
----------------------
5. In your phrase manager, edit the phrase x_members_and_y_guests to use the third parameter, which is spiders. Example:
{1} members and {2} guests and {3} spiders
As you can see above we have to add a few extra lines to online.php . I think we have to add similar lines to that onlineusers.php module too. But I don't know which lines to add and where to add them.
Can anyone help out?
Thanks in advance.:D
Loco Macheen
03-27-2006, 05:02 AM
the file I'd look at is the index.php,, you'll have to do the same for the portal,, and that doesn't mean the cms_index.php you'll have to edit the onlineusers modual, and some template. I was monkeying around with this one day and was getting close, but you'll have to pull info from the db at some point, and thats where i got stuck..
i don't think ya need to add a field to the db or anything, but you will have to pull from
good luck, I'd like to see this completed too :D
didoubertox
03-27-2006, 12:08 PM
Some news for this hack on cmps ?
el fuego
11-21-2006, 12:41 AM
the file I'd look at is the index.php,, you'll have to do the same for the portal,, and that doesn't mean the cms_index.php you'll have to edit the onlineusers modual, and some template. I was monkeying around with this one day and was getting close, but you'll have to pull info from the db at some point, and thats where i got stuck..
i don't think ya need to add a field to the db or anything, but you will have to pull from
good luck, I'd like to see this completed too :D
Did you ever monkey around with this any further?
Ashley
01-28-2007, 01:18 AM
Subbing :)
dimon_prodigy
05-26-2007, 02:29 PM
Is anybody know how I`ve to edit onlineusers.php module to display spiders?
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.