Hi everybody, I have been reading development mail list for a few months now, found it great for people to discuss code but I have not written any thing here until now. I guess the time has come. I am wanting a feature addition to ip2local module or some other similar module. Brief explanation of the customization follows: 1. Admin interface to add or delete region and group regions. Much like hierarchy taxonomy. So that admin can add Region 'Asia' and sub regions like India, China etc. 2. There is an admin interface to set default language for each sub region and region. 3. Much like multi-lingual interface in each node where user can select the language, there is now an additional interface to select the region the node belongs. A node can belong to more than one region, however. 4. The module should output a block where the user can select the region of the website he wants to see. See ibm.com <http://ibm.com> <http://ibm.com> for example. There is a region on the header where user can select the country/language. 5. Logic for content display: a. detect the user ip and thereby the location and display that particular location's content alone. b. If the location is not present in one of the regions set in the website, use a default region. c. detect the browser language and render that identified region's content in that language. Say for example, the region is detected as China but the browser language is English, then display chinese region content in English language. Adminstrator will take care of all the translation work needed. I will really appreciate if you guys can give me some pointers on where to start, a possible hint on hooks that I may need etc., I wanting to become a good drupal module developer and a community supporter. I hope you guys will initiate me into this. I am not aware of any existing module that gives similar functionality after some good search in contrib space. If there is any, pls let me know. Thanks a lot, Shankar
Just a side note: I used your module in one of my sites, and I had a lot of problems with it. If "always" failed to update the IP DB. I digged around, and eventually downloaded the files manually, and hacked the code to load the files from the DS instead of "curl" (1), and then backup up the corresponding table (2) and removed the cron code. The trigger for the problem is that curl fails to download the site, due to max execution time in php. A way to avoid one of the problems is to delete the DB only after all the files have been downloaded (currently (3) the code clears up the DB and then downloads). Onother feature I would like as well is: 'dont update the IPs DB at all'. One other problem I found is that the IPs DB is so huge, that some of our hosts fail to update, again, since phpmyadmin (no console to those machines) fails to finish the transactions, due to php max execution time. This is due to the length of those tables (around 40k entries). I am not sure how to address this. Just my 3cents. Thanks for the module, helped a lot. (1) In reality, curl downloads to a temp directory and then loads up the file (2) like hell I am doing it again on a live customer site! (3) Might have changed since 2009/04/13 ... Shankar Dhanasekaran wrote: ... --
It doesn't seem to provide the exact functionality that you want, but it might be worth taking a look at the Country code module ( http://drupal.org/project/country_code). 2009/7/17 Shankar Dhanasekaran <shankar@musickafe.com>
Hi everybody, I have been reading development mail list for a few months now, found it great for people to discuss code but I have not written any thing here until now. I guess the time has come.
I am wanting a feature addition to ip2local module or some other similar module. Brief explanation of the customization follows:
1. Admin interface to add or delete region and group regions. Much like hierarchy taxonomy. So that admin can add Region 'Asia' and sub regions like India, China etc.
2. There is an admin interface to set default language for each sub region and region.
3. Much like multi-lingual interface in each node where user can select the language, there is now an additional interface to select the region the node belongs. A node can belong to more than one region, however.
4. The module should output a block where the user can select the region of the website he wants to see. See ibm.com <http://ibm.com> <http://ibm.com> for example. There is a region on the header where user can select the country/language.
5. Logic for content display: a. detect the user ip and thereby the location and display that particular location's content alone. b. If the location is not present in one of the regions set in the website, use a default region. c. detect the browser language and render that identified region's content in that language. Say for example, the region is detected as China but the browser language is English, then display chinese region content in English language. Adminstrator will take care of all the translation work needed.
I will really appreciate if you guys can give me some pointers on where to start, a possible hint on hooks that I may need etc., I wanting to become a good drupal module developer and a community supporter. I hope you guys will initiate me into this. I am not aware of any existing module that gives similar functionality after some good search in contrib space. If there is any, pls let me know.
Thanks a lot, Shankar
participants (3)
-
Diego Iastrubni -
Shankar Dhanasekaran -
Sven Decabooter