[OzzModz] Country Flags by IP Address

[OzzModz] Country Flags by IP Address 2.2.1 Patch Level 3

No permission to download

Snog

Well-known member
Snog submitted a new resource:

Country Flags by IP Address - Show country flags for your members in XenForo 2

Shows what country your members are in based on their current IP address.

This add-on uses MaxMind's GeoLite2-Country database and MaxMind's DB Reader. This add-on does not require mod_geoip to be installed on your server.

Features:
  • Works with both IPV4 and IPV6 IP addresses
  • Select what user groups can view flags
  • Select where the flags are displayed.
  • Automatic database updates
REQUIREMENTS:
cURL must be...

Read more about this resource...
 
Did you set the add-on options?

Yes.

0VoFEEswQnqdBIXs-QF4og.png


Can you see your own flag?

No.
 
OK, do you have any errors in the admin area?

Can you see your flag using the default XF style?

Do you have BC Math for PHP installed and configured for PHP to run it?
 
If you can't see it in the default style, then there may be another add-on or template change interfering with it.

If you want me to look at it, give me temporary admin access. Send the info by PC.
 
For everyone's benefit, the main problem above was the XF 1 data/countryflags files were deleted and an UPGRADE was run.

If you are upgrading, the XF 1 data/countryflags files must be present on your server. The XF 2 version uses those files and does not re-install them during an upgrade.

If you do NOT have the XF 1 data/countryflags files on your server and the XF 1 version shows as being a Legacy add-on in XF 2, uninstall it BEFORE uploading the XF 2 version files to your server. That will force a re-install of the data files. You will not lose any data from the database if you do this. The database will still have all of the data from the XF 1 version and it will be used by the XF 2 version.
 
Last edited:
Instead of flags, I am just seeing a box with question mark. If I hover over that, I see "unknown"

I did have the version 1 working fine on the same forum, but uninstalled version 1 prior to installing xf2
 
Instead of flags, I am just seeing a box with question mark. If I hover over that, I see "unknown"

I did have the version 1 working fine on the same forum, but uninstalled version 1 prior to installing xf2
If it's a white box with a ?, that means that either the country is unknown for that user or the mmdb database file doesn't exist in data/countryflags. If your flag or some flags are showing properly, then it just means the user with the ? hasn't logged in since the add-on was installed so their country is unknown.

If the file doesn't exist, try running the database update cron task. If it doesn't get downloaded then there is either a problem with Curl or the permissions for the data/countryflags folder.
 
Last edited:
How do you update it so it updates the current registered users before the install? Is it the cron entry called 'Update MaxMind'? Because I did run it and majority still have '?' on there name. It does work for me though and someone who just registered after the install so I know the add-on works fine. am i missing something here? Thank you for the add-on BTW.
 
If it's a white box with a ?, that means that either the country is unknown for that user or the mmdb database file doesn't exist in data/countryflags.

When unzipped, the addon /upload/folder does not conatain anything for /data/, only an src folder.
 
When unzipped, the addon /upload/folder does not conatain anything for /data/, only an src folder.

It isn't in the upload folder, it gets created after the install. But run a cron entry like the guy said above and check in data of your root directory.
 
f the file doesn't exist, try running the database update cron task.
It isn't in the upload folder, it gets created after the install. But run a cron entry like the guy said above and check in data of your root directory.

Ah, I didn't know that. Yes, the folder is there in /data/ but I didn't know it would just show question marks until people log in. Is there any way to force the flags even for members who are not logged in? (but do have IP addresses logged)
 
Last edited:
Top Bottom