Country Flags by IP Address [Deleted]

Nub question What is this?
cURL must be installed on server.
BC Math for PHP must be installed on server and PHP must be configured to use BC Math.
and how is it installed???
 
Nub question What is this?
cURL must be installed on server.
BC Math for PHP must be installed on server and PHP must be configured to use BC Math.
and how is it installed???
cURL is a package that allows your server to communicate with other servers. In the case of Country Flags it is used to download and update the GeoIP database.

BC Math is a PHP package that allows precision binary calculations for numbers of any size.

If BC Math is installed and configured for use by PHP on your server, you should see what I have posted here..
http://xenforo.com/community/threads/country-flags-by-ip-address.72116/#post-750168

Most PHP installations include both cURL and BC Math. If yours does not, you will need to contact your host to have it installed. Installation of both cURL and BC Math varies by what operating system your server is running.
 
Where or how do I find this php info page?
bcmath-jpg.71504
 
You should be able to check your php info in your control panel.

If not, create a php file with this code..
Code:
<?php
phpinfo();

And run it on your site.
 
hi

how can I align the position of this pic on the right edge?

View attachment 72936
thanks
Edit the snog_countryflag template and remove margin-right:10px;

The reason the flag is moved to the left is because when someone has over 10,000 posts, the flag centers over the number and looks better.
 
Last edited:
Hi, is there any reason why it's very inaccurate for me :)?

It says several users from Sweden/UK etc are from Norway while others from Canada but from USA.
 
Hi, is there any reason why it's very inaccurate for me :)?

It says several users from Sweden/UK etc are from Norway while others from Canada but from USA.
That is the database from MaxMind. It's not 100% accurate.

Plus if someone is using a proxy IP and that proxy is in another country, the flag would be incorrect.
 
Bugger! I love the addon itself. I guess there's no way around that other than installing a country flag addon that bases it on country selection.
I find it strange that it's happening to you often enough that it's noticed since the add-on is running on my site and some others that I monitor and there's been no inaccurate flags for any of the users that I know of. (the database is 99.5% accurate which means 1 out of every 200 users MIGHT show the wrong flag)

I would be curious as to what the IP records are for some of your members that this is happening to. If you're willing to supply the IP history for some users along with what they say is their actual country via PC, I'd be more than happy to look into it.
 
Last edited:
I find it strange that it's happening to you often enough that it's noticed (I believe the database is 99.5% accurate) since the add-on is running on my site and some others that I monitor and there's been no inaccurate flags for any of the users that I know of.

I would be curious as to what the IP records are for some of your members that this is happening to. If you're willing to supply the IP history for some users along with what they say is their actual country via PC, I'd be more than happy to look into it.
Where do I find a complete list? I just checked myself. I took the IP of a user where it said he lives in Canada, the ip itself shows USA.

So it's really strange. I tried my own IP, it shows that I live in Sweden as I do.
 
Where do I find a complete list? I just checked myself. I took the IP of a user where it said he lives in Canada, the ip itself shows USA.

So it's really strange. I tried my own IP, it shows that I live in Sweden as I do.
There is no complete list compiled other than the MaxMind database.

I'd be curious what the IP is that you checked. It's possible the Canadian user is using a US provider (or vise versa) , or it's a proxy. With the IP I can tell you which it is.
 
There is no complete list compiled other than the MaxMind database.

I'd be curious what the IP is that you checked. It's possible the Canadian user is using a US provider (or vise versa) , or it's a proxy. With the IP I can tell you which it is.
Sent you a PM.
 
Just something I noticed, can you specify whether or not the "countryflags" folder inside /library is supposed to be dropped inside /library, or /Snog/Countryflags? Thanks.
The folders should be uploaded as they are contained in the 'upload' folder.

So you end up with this..

data/countryflags/flags
library/Snog/CountryFlags/... etc

If you just upload the data and library folders to your site's main folder, they should upload correctly.
 
The folders should be uploaded as they are contained in the 'upload' folder.

So you end up with this..

data/countryflags/flags
library/Snog/CountryFlags/... etc

If you just upload the data and library folders to your site's main folder, they should upload correctly.

Yes, sorry. I thought I was in the /library folder and I was in /data, then I deleted my reply. Thanks for the update! :)
 
Is there a way to move country down to underneath the messages count? Also, this addon is really cool, but doesn't seem to work every time. Some threads on my forum show the flags, while others don't. Any ideas ? Thanks!
 
Last edited:
Is there a way to move country down to underneath the messages count? Also, this addon is really cool, but doesn't seem to work every time. Some threads on my forum show the flags, while others don't. Any ideas ? Thanks!
Not at this time. For now, it can be displayed above the message count.

A flag for a member won't show up until that member logs on at least once after the add-on has been installed. It uses a members current IP address, not any stored on the system. So until they log on, there is no current IP to use.
 
Not at this time. For now, it can be displayed above the message count.

A flag for a member won't show up until that member logs on at least once after the add-on has been installed. It uses a members current IP address, not any stored on the system. So until they log on, there is no current IP to use.

Oh thank you. So privacy settings don't matter, right?
 
Oh thank you. So privacy settings don't matter, right?
No. Privacy settings don't matter.

If it's a concern, set the usergroups that you want to be able to see the flag (ie: Admins only).

But, showing what country someone is from isn't a violation of any privacy laws.
 
Top Bottom