LoCoCreatingMap

Differences between revisions 1 and 2
Revision 1 as of 2006-10-18 14:41:03
Size: 77
Editor: 88-107-14-218
Comment: Initial page.
Revision 2 as of 2006-10-25 03:59:34
Size: 1964
Editor: cpe-76-168-15-151
Comment: Let's start ;-p
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:


A locomap is a very convenient tool to let user discover ubuntu neighbor, for the french speaking loco we used the Google map.

Here is the final result : [http://ubuntu-fr.org/carte/ Users who speak french around the World]

i'll try to describe each steps for creating this kind of map, and provide some code.

== Get data from users ==

The first point is to get the Lat/Lng (Latitude, Longitude) for each user. For ubuntu-fr we use punbb for forum, but we wanted to stick to the idea : one usage one tool.
So we have a small batch wich duplicate authentication data from the forum's database to a ad'hoc db.

Then we can write (php) a script to provide authentication for users. Once they are authentified we can redirect them to a profil page.

Basically, they can fill a lot of information about themself and Ubuntu.

 * First name
 * Name
 * Sex
 * Birth Date
 * Email
 * Irc Nick (on Freenode)
 * Jabber id
 * MSN / Y! / ICQ / AIM id (obviously we could record each of them, but you know, we love Jabber)
 * Personnal Website / Blog

Some info about Ubuntu

 * First release they used (Warty/Hoary/...)
 * Release they currently use
 * Version (K/Edu/X/Ubuntu)
 * Launchpad nick


Some data could be retrieve via the profil on our punbb, so we get as much as information as possible (all of them are editable, if they don't want to publish it on the map)

As you can imagine the big thing is to place the user on the map, we used GeoIP from [http://www.maxmind.com/app/geoip_country Maxmind]
{{{
// GeoIP Stuffs
include("geoipcity.inc");
$gi = geoip_open("GeoLiteCity.dat",GEOIP_STANDARD);
$ip = $_SERVER["REMOTE_ADDR"];
$record = geoip_record_by_addr($gi,$ip);
$geo_ip_lat = $record->latitude;
$geo_ip_lng = $record->longitude;
$geo_ip_pays = $record->country_code3;
geoip_close($gi);
}}}

Creating a Member Map for your LoCo Team

Include(LoCoMenuHeader)

A locomap is a very convenient tool to let user discover ubuntu neighbor, for the french speaking loco we used the Google map.

Here is the final result : [http://ubuntu-fr.org/carte/ Users who speak french around the World]

i'll try to describe each steps for creating this kind of map, and provide some code.

Get data from users

The first point is to get the Lat/Lng (Latitude, Longitude) for each user. For ubuntu-fr we use punbb for forum, but we wanted to stick to the idea : one usage one tool. So we have a small batch wich duplicate authentication data from the forum's database to a ad'hoc db.

Then we can write (php) a script to provide authentication for users. Once they are authentified we can redirect them to a profil page.

Basically, they can fill a lot of information about themself and Ubuntu.

  • First name
  • Name
  • Sex
  • Birth Date
  • Email
  • Irc Nick (on Freenode)
  • Jabber id
  • MSN / Y! / ICQ / AIM id (obviously we could record each of them, but you know, we love Jabber)
  • Personnal Website / Blog

Some info about Ubuntu

  • First release they used (Warty/Hoary/...)
  • Release they currently use
  • Version (K/Edu/X/Ubuntu)
  • Launchpad nick

Some data could be retrieve via the profil on our punbb, so we get as much as information as possible (all of them are editable, if they don't want to publish it on the map)

As you can imagine the big thing is to place the user on the map, we used GeoIP from [http://www.maxmind.com/app/geoip_country Maxmind]

// GeoIP Stuffs
include("geoipcity.inc");
$gi = geoip_open("GeoLiteCity.dat",GEOIP_STANDARD);
$ip = $_SERVER["REMOTE_ADDR"];
$record = geoip_record_by_addr($gi,$ip);
$geo_ip_lat             = $record->latitude;
$geo_ip_lng             = $record->longitude;
$geo_ip_pays            = $record->country_code3;
geoip_close($gi);

LoCoCreatingMap (last edited 2010-08-25 22:23:44 by c-76-118-25-170)