Version: 1.0.3, by digitalpoint
Developer Last Online: May 2016
Category: Miscellaneous Hacks -
Version: 4.x.x
Rating:
Released: 06-08-2010
Last Update: 12-01-2011
Installs: 156
Uses Plugins
Additional Files
No support by the author.
About
This is a system for geo-locating your currently online users and plotting them on a world Google Map. You can click any of the pins for a link to pull up the user's location in Google Earth.
This is something I originally made almost 5 years ago. Now that I rewrote it for vBulletin 4, I wrapped it up as a product package and released it for the world to use.
Installation
Put the usermap.php file in your forum folder.
Install the product-digitalpoint_usermap.xml product under AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product
Notes
Important! - this uses the free GeoIP PHP extension, so you must have it installed on your server in order for it to work.
Uses datastore cache so it does not repeat GeoIP queries unnecessarily.
voglermc: There is another modification that will let you create profiles and pin them on google maps. It can be found here: https://vborg.vbsupport.ru/showthread.php?t=123148 but there is no official release for 4.0 yet
We have around 1300 members right now. I'd just like members to see they have others close by. I'm not to up to date on google's api so I don't know what it can and can't do
If you want to make it work with registration IP addresses instead of currently online users, in the usermap.php file, change this:
PHP Code:
$forumusers = $db->query_read_slave("
SELECT
session.userid, user.usergroupid, session.host, session.useragent, IF(user.usergroupid IN(" . iif($vbulletin->options['digitalpoint_usermap_admins'], $db->escape_string($vbulletin->options['digitalpoint_usermap_admins']), 0) . "), 1, IF(user.userid > 0, 2, 3)) AS sortorder
FROM " . TABLE_PREFIX . "session AS session
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > $datecut ORDER BY sortorder
LIMIT 5000" . "
");
to this:
PHP Code:
$forumusers = $db->query_read_slave("
SELECT userid, usergroupid, ipaddress AS host, '' AS useragent, IF(usergroupid IN(" . iif($vbulletin->options['digitalpoint_usermap_admins'], $db->escape_string($vbulletin->options['digitalpoint_usermap_admins']), 0) . "), 1, IF(userid > 0, 2, 3)) AS sortorder
FROM " . TABLE_PREFIX . "user AS user
ORDER BY sortorder
LIMIT 5000" . "
");
I haven't tested it, but I think it should work (it's still going to limit it to 5000 users/pins... anything more than that probably would cause issues for Google Maps anyway).
Obviously it's not going to show pins for spiders/guests (only registered users and admins/mods).
Yeah pretty much any shared hosting doesn't allow the geoip plugin as I've been told over and over its "too resource intensive". (was looking for stats generated by awstats)
But I moved over to my own dedicated server and runs wonderfully