I made a couple of modifications to this mod which are reasonably straightforward. Here are few tips if you want to make similar ones:
1) We didn't want an opt-out system, we wanted an opt-in system. To do so, before installing edit the XML so that the opt-out database flag is "1" by default for all users. Then change geoip_locate.php so it does do a location lookup even if someone is opted out (otherwise all users will have to find their pins at latitude/longitude 0,0). Finally to edit the "opt out" phrase to say "Do not show me on this map". Unchecking that box is how people opt in.
2) I made it so that a user's own pin is a different color from the rest of the pins. To do that, I edited membermap.php, appending to $colors with a usergroupid of "9999" with a color of "79604c". Then in the template dbtech_membermap_info template I set the "data-ugid" to 9999 for the user's marker.
These aren't elegant ways to add those two features, but they are the simplest, requiring the least amount of code modification. I can type up step-by-step instructions to do the above if there are requests.
I've got a couple of other ideas that sound simple to implement too: 1) making sure a user's pin is always on top to make it easy to find and drag, and 2) when a user's location is detected, the detected latitude and longitude should be offset by a random small amount and have that stored to the database instead. That helps avoid having many map markers stacked exactly on top of each other for those times that the GeoIP database gives the exact same location to all users in a given city (for example).
|