View Full Version : Question on possible who's online addition...
Tolitz
08-06-2001, 11:09 PM
Hey, that question about IPs in who's online just got me thinking...
What do I need to put in the who's online file so that I can also have it display the User Agent/Browser versions of the members/visitors? If this is even possible, will it be much more of a load on the server? Thanks in advance :)
Tolitz
08-07-2001, 10:33 PM
~bump ;)
Admin
08-08-2001, 03:16 AM
Can't be very hard... I'll try. :)
Admin
08-08-2001, 03:40 AM
Here it comes: :D
(This hack also contains this (http://www.vbulletin.com/forum/showthread.php?s=&threadid=24762) mod by JJR512)
In online.php find
if ($WOLresolve) {
$userinfo[$key][ipaddress1] = @gethostbyaddr($user[host]);
} else {
$userinfo[$key][ipaddress2] = $user[host];
}
And replace with
if ($WOLresolve) {
$userinfo[$key][ipaddress1] = @gethostbyaddr($user[host]);
$userinfo[$key][ipaddress2] = $user[host];
$userinfo[$key][browser] = $HTTP_USER_AGENT;
}
Find
if ($WOLresolve) {
$guests[$count][ipaddress1] = @gethostbyaddr($user[host]);
} else {
$guests[$count][ipaddress2] = $user[host];
}
And replace with
if ($WOLresolve) {
$guests[$count][ipaddress1] = @gethostbyaddr($user[host]);
$guests[$count][ipaddress2] = $user[host];
$guests[$count][browser] = $HTTP_USER_AGENT;
}
Make sure that on the admin control panel the option for resolving IPs is on!
On the template whosonlinebit_ip put
<td bgcolor="$backcolor" align="left"><smallfont>$userinfo[ipaddress1]<br>$userinfo[ipaddress2]<br>$userinfo[browser]</smallfont></td>
And you're done! :D
Tolitz
08-08-2001, 03:51 AM
w00t! I'll try this out tomorrow ... thanks man ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.