Well, I finally got a first version of
GEOFF done and tested.
What is it? GEOFF is a single page form, combined with a set of Database tables, that lets Front-end users select a geographical piece of data (1.Country, 2.Region or State, 3.District or County, or 4.Place). This type of info may be useful for storing members' details, organising/optimising data searches, categorising data, etc.
For users, GEOFF is just a simple page (form) where they select a geographical parameter using drop-down Select Lists, the level of detail required (country, region, etc.) being pre-determined by the webmaster.
For webmasters/designers, GEOFF was set up to be configurable so you only have one form for all geographical selection actions done by the user.
You can see how GEOFF works in the Frontend by going to
www.wonover.com and clicking on the "GEOFF example" command on the righthand menu.
The geographical data is organised hierarchically, with the top level being "countries" and the lowest level being "places".
How does it work? GEOFF is basically two parts: 1) a single-page, front-end form, and 2) a set of database tables.
1) The GEOFF formThe form contains few elements (4 select lists, a button and some optional text), but has a lot of code. The select lists are all hierarchicaly linked: a place belongs to one district (county), a district belongs to one region (state), and a region belongs to one country. So, when you select "USA", only those regions (or states) in the USA will be appear, and when you select "Ohio", only those counties in Ohio will appear, etc. Only one form is required as it calls itself iteratively.
When the GEOFF form is called, you (the webmaster/designer) must specify, via URL parameters, the following:
- the level of detail required to be specified by the user (country, region, etc.),
- the destination page which GEOFF will call when the user has successfully chosen a parameter.
Optionally, a third parameter may be specified on the URL: a preselected index (country, region, ...)
When GEOFF is finished (i.e. User clicks on "Confirm" button), it calls the pre-defined destination page (typically another form) with the user's choice in the URL.
(NB: Statically; i.e. by changing two lines (7 &

in the Before Form piece, the webmaster can decide to display the country select list in a different way by allowing some "favourite" countries to be displayed first before all the other ones in alphabetical order).
2) The GEOFF Database tablesMimicking the form's Select Lists, several DB tables are structured hierarchically: a Country table, a region table, ... These tables contain the data the form displays. Alas, I've haven't had the time to enter much data. To date, I have the following:
- COUNTRIES: ALL
- REGIONS (STATES): Canada, England, France, Germany, Luxemburg, N. Ireland, Scotland, Spain, USA, Wales.
- DISTRICTS (COUNTIES): England, France, Germany, Luxemburg, N. Ireland, Scotland, Spain, USA, Wales.
- PLACES: None - just a few in FRANCE-->LANGUEDOC-ROUSSILLON--->GARD for test purposes.
I hope to add more every few weeks.
How do I install it? There are two files attached here: One is a text-format sql file that contains the database structure and the data. The other is the GEOFF form installation package.
I haven't worked out how to install database tables and data via the installation process so you have to do the following:
1. Run PHPMyAdmin on your Joomla/Mambo site and select the Database in question.
2. Open the attached "sql" file in a plain text editor (WIndows Wordpad, for example).
3. Select all of the sql file contents and copy it (CTRL-C).
4. Open the SQL window on PHPMyAdmin and paste (CTRL-V) the sql file contents.
5. Click on the "GO" button in PHPMyAdmin. Please wait quite a few seconds for the database to be updated. You should get an acknowledgement message.
6. If successful, 7 new tables, all with the "geo_" prefix will be added to your Database.
Next, install the GEOFF form package just like any other. You will see that there are actually 3 forms: the GEOFF form itself, plus 2 example forms that show you how to a) call the GEOFF form ("GEOFF_launch"), and b) receive the output of the GEOFF form ("GEOFF_result"). To run the example, link a menu command in the Front end to the GEOFF_launch form.
I've tested the form on two Joomla 1.0.11 sites (FF 1.4.4 & FF 1.4.7).
PS: I've just realised I can't attach the sql file here as it's too big. I'll send it to those who want it by email, or post it later if Peter allows it.
David.