| Project: | Petition Node |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi, a quick heads up for you...
I'm the author of the ip2cc module. I have just updated the ip2cc module to make use of the countries_api module (which I am also the author of) for it's country data. You should do the same. I have made a very quick patch for your module with some recommended changes - but I have not tested it much at all and have probably missed things.
* ip2cc should be used for ip -> country code lookup.
* countries_api provides a rich api for looking up country data from an iso2 or iso3 country code and should be used to provide information about a country, generate dropdown lists etc.
* currently the flags are provided in the ip2cc module, but I plan on extracting this to a countries_api sub module shortly as I feel that ip2cc should really just be providing a core ip lookup functionality, and other modules should provide the additional functionality (iso codes, country flags, calling codes, population etc etc)
Anyway, Please review the attached patch and adapt as you see fit.
Comments
#1
#2
and here is the patch!
#3
Patch fails with latest development version of petition module.
#4
mrfelton,
Thanks for the information. The patch is not exact: The module will need both IP2CC and countries_api as in the case of IP restrictions, It needs to check the country the IP addresses come from.
I have received a few other patches on other issues and I will set everything together asap.
Please tell me when you plan to move the flags to the country_api project. Maybe it can be an option to let the flags in both modules (IP2CC and countries_api) a few weeks so that it doesn't harm users if I cannot update the petition module as fast as you update the countries_api module?
#5
@gauvain: yes, I'll try and give more of a heads up next time. Leaving the flags in both for a while is an option. Hope your get your module working again soon.
#6
@mrfelton
Thanks.
I have just released a BETA2 version that takes these changes into account. (Avaialble on Drupal within 12 hours).
Please tell me when you move the flags to countries_api.
#7
The last changes will be carried out when the flags directory is moved from the IP2CC to the country_api module