Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Geo Cities - how to

This discussion is related to the GeoIPFlags addon.
edited May 2012 in Localization

1 . download two files:

php classes:

and cities database (17 Mb unpacked):

2 . Put to the the /forum/plugins/geoipusers/extras/

  • GeoLiteCity.dat
  • geoipregionvars.php

(and you may remove GeoIP.dat and geoip.php ).

3 . replace UserController_UserCell_Handler($Sender) function in \forum\plugins\ geoipusers \default.php

` public function UserController_UserCell_Handler($Sender)

    if (empty($Sender->EventArgs['User']->LastIPAddress))
        echo '<th>GeoIP Country</th>';


          $gi = geoip_open($plpath."GeoLiteCity.dat",GEOIP_STANDARD);
          $record = geoip_record_by_addr($gi,$ip);

          $countrycode = $record->country_code;
          $Title  = $record->country_name . ", ";
          $Title .= $record->city;

        echo '<td><img title="'.$Title.'" src="/forum/plugins/geoipusers/flags/' .  
        strtolower($countrycode) . '.png" alt="' . $countrycode . '" /></td>';


In result You can see the city name and name of country by mouse over the flag



Sign In or Register to comment.