dswp.de
http://www.dswp.de/old/

[B3] LocalisationPlugin
http://www.dswp.de/old/announcements/localisationplugin-t828.html
Page 1 of 3

Author:  wurst [ 07.05.09 ]
Post subject:  [B3] LocalisationPlugin

First of it all, thanks very much to SvaRoX coding an alternative way of localization for the Clients.

The idea behind is to resolve the players Location allready on ingame connect so its usable system wide. Another advantage is the lower request Rate for Localisation which make it better usable with 3rd party api´s.

Inspiration was given by XLRStats v.2 which show little country flags on the players listings.
However, we resolve the same way (throgh php GeoIP)


Requirements:
-B3 v.1.41 ???
-A Table

Commands aviaible:
!locate <playername>
!friends <km radius>

INSTALL

1.] Download the Plugin Extract to the coresponding Folders

2.]
Execute teh Following SQL Query to generate the required Table:

---------------------------------------------------------------
CREATE TABLE /*!32312 IF NOT EXISTS*/ `plugin_localisation` (
`id` int(11) unsigned NOT NULL,
`city` varchar(255) NOT NULL,
`country` varchar(255) NOT NULL,
`countrycode` char(2) NOT NULL default '',
`latitude` varchar(255) NOT NULL,
`longitude` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
---------------------------------------------------------------

3.] Add the following Line to ur b3.xml
Code:
<plugin name="localisation" priority="##" config="@b3/extplugins/conf/localisation.xml"/>

(where ## is like allways the next free number in the list)

4.] Copy the geoip.php to ur prepared webserwer

5.] Go to the Plugin Configuration in
/extplugins/conf/localisation.xml
and change the "webaddress" to point on the geoip file from 4.
if ure a sucker u can suck from that api thats commented out there :)

6.] Don´t be silly. Don´t forget to restart the bot.


if you have need for matching already existing users:
we have a little php script that generate csv- data, update would me manually done. just ask if u have need for that...

Author:  JackAv [ 09.30.09 ]
Post subject:  Re: [B3] LocalisationPlugin

THX

Author:  SvaRoX [ 09.30.09 ]
Post subject:  Re: [B3] LocalisationPlugin

JackAv wrote:
THX

Is it working on your servers ?

Author:  JackAv [ 10.01.09 ]
Post subject:  Re: [B3] LocalisationPlugin

i will try it later first the servers get a hardwareupgrade.

Author:  wurst [ 10.18.09 ]
Post subject:  Re: [B3] LocalisationPlugin

ah it dont need much to eat.

Author:  JackAv [ 11.13.09 ]
Post subject:  Re: [B3] LocalisationPlugin

Can someone help me. The php file says :
Code:
Country not found City: City not found Latitude: Latitude not found Longitude: Longitude not found CountryCode: oO



bzw:
http://www.dswp.de/geoip.php
Code:
Country: Unknown City: Unknown Latitude: Unknown Longitude: Unknown

Author:  natirips [ 11.13.09 ]
Post subject:  Re: [B3] LocalisationPlugin

It's php, you perhaps lack parameters.

Author:  wurst [ 11.13.09 ]
Post subject:  Re: [B3] LocalisationPlugin

try it like this:
http://www.dswp.de/geoip.php?ip=84.151.191.241

Author:  JackAv [ 11.13.09 ]
Post subject:  Re: [B3] LocalisationPlugin

weisst du wo dann der fehler liegt?
http://xinix.servegame.com/geoip.php?ip=84.151.191.241

Author:  wurst [ 11.13.09 ]
Post subject:  Re: [B3] LocalisationPlugin

hm, mit dem ?ip= gibst du ihm die IP, ohne die kann er nicht viel machen.
hier ist übrigens noch ein besserer:

dswp_tools/distance/geoip_test_api.php?ip=84.151.191.241

btw: mir schwant was das problem ist
theres no php-geoip extension installed?
did u download a ca. 40 MB database file and installed that php mod?

Page 1 of 3 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/