Back to vBulletin 3.6 Add-ons

Country Display for Who's Online
Mod Version: 1.00, by mfyvie

This modification is in the archives.
vB Version: 3.6.7 Rating: (28 votes - 4.86 average) Installs: 282
Released: 07 Jul 2007 Last Update: 08 Jul 2007 Downloads: 1603
Not Supported Uses Plugins  

*** Staff note: The author of this modification has passed away in a http://www.englishforum.ch/announcements/20529-mourning-loss-friend-leader-innovator-genuinely-nice-guy.html. We wish his family all strength in dealing with this traggic issue. ***

Country Display for Who's Online

What does this do?

It adds another column to your Who's Online display, with the country where the user is logging on from. You can choose either the name, the flag or both. You can also decide which users can see this information.

How about a quick summary of features?

Country display can be admin/moderator only, or available for everyone to see
You can display the country name, a flag, or both. You can use alternative flag sets if you want
Adds minimal overhead, no additional queries
Works on 3.6.6, 3.6.7 and should work for future versions as well. Will not work on versions prior to this. There is a manual file hack for previous versions here

Spoiler (click to open)


Great hack, thanks for sharing!

For people who have 3.6.x version (3.6.0 to 3.6.6) which is not compatible with this pluggin and who don't mind hacking .php code here is how you can install this hack:

Edit online.php, find:

$allusers = $db->query_read_slave("
SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo, user.skype,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
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 $sqlsort $sortorder
");
REPLACE IT AS:


// Logician modified Hack : Country display for who's online
$hook_query_fields = $hook_query_joins = $hook_query_where = '';
$hook_query_fields = ', session.country, session.country_iso2, session.country_iso3';
$allusers = $db->query_read_slave("
SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo, user.skype,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
$hook_query_fields
FROM " . TABLE_PREFIX . "session AS session
". iif($vbulletin->options['WOLguests'], " LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid) ", ", " . TABLE_PREFIX . "user AS user") ."
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$vbulletin->options['WOLguests'], " AND session.userid = user.userid", "") ."
$hook_query_where
ORDER BY $sqlsort $sortorder
");
// Logician modified Hack : Country display for who's online
Upload online.php hack to server and then import the ATTACHED product.

I've tested with vb 3.6.2 and it is working fine if installed as described here. Yet I don't have time to give support for this, sorry about it if it does not work for you. If you have 3.6.7 or above, please dont apply my instructions, use original hack instead!
Attached Files
File Type: xml product-gla_who_online_1_0_360.xml (5.5 KB, 21 views)

Close
(unsupported).
Country information is provided by the GLA (http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=geo_location_awareness) mod. Therefore updates to GLA will automatically provide improvements to any mod using GLA.

How do I install?

1. Install GLA first. You can find it http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=geo_location_awareness. It's easy and takes a minute.
2. Download and install the enclosed .xml file via adminCP -> Plugins & Products -> Manage Products -> Add/Import Product -> Import.

How do I configure it?

By default it will display only the country name to admin, super moderators and moderators. You can change this under vBulletin Options -> Who's Online Options. Be sure to check these options and click "save", even if you haven't changed anything. See attached screenshots.

Before posting on this thread:

If your issue concerns questions about country detection, the accuracy of the database, etc - please post your question on the GLA thread instead. Please only post issues here concerning the Who's Online display itself.

Please click install. Support requests from people who have not clicked install may not be answered.

Version history:
V1.0 - (07.07.07) Initial release

Download

This modification is archived, downloads are still allowed.

File Type: %1$s product-gla_who_online_1_0.xml (5.8 KB, 1641 downloads)

Screenshots

Click image for larger version
Name:	setting_options.jpg
Views:	2760
Size:	79.7 KB
ID:	66632   Click image for larger version
Name:	option1.jpg
Views:	3080
Size:	44.7 KB
ID:	66633   Click image for larger version
Name:	option2.jpg
Views:	1924
Size:	44.6 KB
ID:	66634   Click image for larger version
Name:	option3.jpg
Views:	2265
Size:	39.3 KB
ID:	66635  

Similar Mods

Country Orb people (Country Flags) vBulletin Avatar Sets

vblts.ru supports vBulletin®, 2022-2024