Geonames into a directory style listing
mpaler - September 27, 2008 - 01:01
| Project: | GeoNames |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi,
Very interesting module you have here. Is there any documentation on how to compile geonames into a directory style listing as shown here:
http://www.realradios.com/world/EU
If not, could you give any tips/hints as to how this was done?
Thanks,
Michael

#1
There's no public documentation on how it's done, but I can give you a few hints on how it may be solved;
Firstly you need the continent and country information. You would probably like to organise it using the iso_alpha2 code, and the two letter continent code. When the structure is in place, you might also want to use token/url aliases to make nice URLs using the full names (which is in place for the next update of realradios.com).
Continent information may be retrieved using geonames_continents('short'); which will return continent info indexed by continent code.
Country information can be retrieved in various fashions;
1. geonames_countries(array('continent' => EU)) will return a list of countries in Europe.
2. geonames_countries() will return all countries
3. and geonames_countryinfo($iso_alpha2) will return you information for a single country.
What we've done is to create menu loader functions and set up the structure world/%continent/%country/etc...
Feel free to contribute a geonames_directory module - you are probably not the only person needing a simple standardized directory component that could be installed using a few clicks! ;)
Good luck!
#2
Thanks so much for the tips!
I'll give it a try -- however, at the pace I code I'll bet someone beats me to it!
Quick side question while I have your ear...I notice the 5.x version is still in dev (red) state. Is it as functional as the 6.x version or is it essentially abandoned? :(
Michael
#3
The 5.x state should be working perfectly...
#4
Did you actually manage to do any progress or quit?
If you didn't I am actually looking forward to give this a try.
Kind Regards,
Jorge.