Are there any plans to port this module to Drupal 7, or do I need to seek out a different module for converting IP addresses to countries?

Comments

XerraX’s picture

Priority: Normal » Major

+1

mrfelton’s picture

Yes, there are plans, although there seems to be so many different modules offering essentially the same functionality that perhaps this might be a good time to try and get everyone together and reduce the amount of duplication.

anavarre’s picture

Title: Drupal 7 » Drupal 7 port

@mrfelton What modules are you talking about ? Do you have plans to contact the maintainers and create a global solution ? Can you please tell us more ?

Thank you !

mrfelton’s picture

@anavarre - yes, see http://drupal.org/project/ip2locale

The D7 version of that will combine all of the different engines. Still heavily under development though. Testing and atches welcome!

Anonymous’s picture

I could do with this module for Drupal 7 Too..

I need to display blocks depending on country..

I have the code:
country_code == "U" ?>

thanks to this post :
http://www.davetech.com/blog/changing_blocks_based_visitors_country_usin...

but would be really great for 7.

I'm using simple ads module to run ad campaigns on the sit but would like to control the visibilty of the block based on the country its being viewed in.

I havent foudn any modules (that work) that offer the functionality to show/hide blocks based on ip/country other than this one..

If I've missed one that works with 7 please let me know!

jamesoakley’s picture

In the end, I did it a totally different way.

There's a PHP extension that gives you some functions that return country codes for any IP address, including that of the current visitor. The documentation is at http://uk3.php.net/manual/en/ref.geoip.php.

It works using MaxMind's GeoLocation data. For that to work, you'd need your web host to have done two things for you: (i) installed the relevant PHP extension, and (ii) downloaded (and kept up to date) the data files from MaxMind that contain the IP to Country mappings. (MaxMind have a free version of their data that is free because it's slightly less accurate and is updated slightly less often, so hosts can do that provided they use the free version).

If you're on a VPS / Dedicated server, I can point you in the right direction for installing that. If you're on a shared host, you'll have to ask the host for more information.

vako’s picture

Well, any hope to see this great module to be ported to Drupal 7 in the near future? it's been more than a year being discussed already :(

mrfelton’s picture

Status: Active » Closed (won't fix)

This module will likely not be ported to D7, but instead moved to the IP2Locale (http://drupal.org/project/ip2locale). Unfortunately, I really have no need for either of these modules any more, as we handle stuff using geoip at the web server level now instead. So, fo me, porting these projects to D7 is pretty low on the priorities agenda. If someones else would like to step forward to maintain one of both of these modules, please speak up!