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:
Quote:
$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:
Quote:
// 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!
|