September 10, 2010, 05:10:17 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Always search the forum before posting !
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: GEOFF - GEOgraphy for FacileForms  (Read 4132 times)
dagr
Full Member
***
Offline Offline

Posts: 127


« on: October 25, 2006, 07:31:46 pm »

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 form
The 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 & Cool 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 tables
Mimicking 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.

* GEOFF_v0.1_EN.xml (42.25 KB - downloaded 299 times.)
« Last Edit: October 25, 2006, 07:35:58 pm by dagr » Logged

David.
luky123
Newbie

Offline Offline

Posts: 1


« Reply #1 on: March 04, 2007, 01:29:04 pm »

where is sql file I see only project GEOFF_v0.1_EN.xml file?
Logged
dagr
Full Member
***
Offline Offline

Posts: 127


« Reply #2 on: March 04, 2007, 10:57:17 pm »

Go to www.wonover.com and then click on the GEOFF download menu on the righthand side.
Logged

David.
dagr
Full Member
***
Offline Offline

Posts: 127


« Reply #3 on: August 22, 2007, 12:27:11 pm »

FYI:
I updated the .sql data today on wonover.com, adding regions and districts for Italy, Portugal, Australia and New Zealand. The GEOFF example form (.xml) remains unchanged.

I also put most fields as UTF-8 charset.
Logged

David.
boldee
Administrator
Living Legend
*****
Offline Offline

Posts: 1359



« Reply #4 on: August 23, 2007, 12:51:34 pm »

Looks good dagr good work, i will sticky this post.
Logged

Nick

Please read the forum rules first!
Please do not use PM for generic questions!
Please visit...
Protean MMO
dagr
Full Member
***
Offline Offline

Posts: 127


« Reply #5 on: August 23, 2007, 04:16:19 pm »

Thanks Boldee.

To anyone using the GEOFF form or DB tables:

Although I plan full world domination, well, in terms of completing the data in the tables at least down to district level, I would appreciate it if anyone needing to add a specific country's regions or districts to their own website would share it with me so I can incorporate into this package. Better still, send me the raw data BEFORE you incorporate into your database and I'll quickly update the package, and post it back out here. That way we'll have the same indexed data.

Tips for sending me data:
1) Try to use only standard administrative data (ISO-xxx), unless none exists. (For example, a tourist office may provide a list of a region's districts, but only for their needs, not as administrative zones). *
2) Any format is good (.txt, .doc, .csv, .xls,...), but I save a lot of time if the data is listed in columns as opposed to many names on the same line of text.
3) Other languages. At the moment, all data is in English. I'll try to get other languages done too, at least for country names.

* - There is a mechanism within the GEOFF package for creating user-defined areas ("groups"), with some minor restrictions. For example, the state of Virginia USA has almost 100 districts (counties), but for some applications it may be better to split the state into 6 user-defined districts (Tide water, Mountains, northeast, ...). I'll explain how to do this later.
Logged

David.
dagr
Full Member
***
Offline Offline

Posts: 127


« Reply #6 on: November 06, 2007, 01:00:04 pm »

Today I updated the GEOFF database contents, going from v0_00_002_EN to v0_00_003_EN.
The actual GEOFF form remains unchanged.

The updated contents now include Austria (AUT) regions and districts. Many thanks to "JollyJumper" here on the FF forums.

For new installations, use the "CLEAN" sql file. For updates from v.... 002, use the "UPDATE" sql file.


GEOFF DB contents now include:

1. Countries: ALL
2. Regions (states): Australia, Austria, Belgium, Canada, England, France, Germany, Ireland (Eire), Italy, Luxembourg, New Zealand, N. Ireland, Portugal, Scotland, Spain, USA, Wales.
3. Districts (counties): Australia, Austria, Belgium, England, France, Germany, Ireland (Eire), Italy, Luxembourg, New Zealand, N. Ireland, Portugal, Scotland, Spain, USA, Wales.
4. Placenames: (None, under test).
« Last Edit: December 07, 2008, 04:29:13 pm by dagr » Logged

David.
j_pablo_gn
Full Member
***
Offline Offline

Posts: 143


« Reply #7 on: December 06, 2008, 10:09:23 pm »

Hi there,

I haven't started yet to use it, I was doing my own one, but now I thing I will use yours.

I tried to attach an excel file with all cities is Spain, but it is two big.

This file has just 2 levels, and it is not compatible with you db.

For example, instead of having "Extremadura", I have directly "Caceres" and "Badajoz", but I have another level with all the towns in "Caceres" and "Badajoz".

This means, that you have:
1. Spain
2. Regions (Instead of "Extremadura", you have directly "Caceres" and "Badajoz")
3. All Cities.
4. ---

I did it like this because for my form, the user can select the city faster in this way.

Thanks for the package done, I will test it tomorrow.
J. Pablo.

P.D.: Please, let me know where can I leave you my file to use it for your package.
Logged
dagr
Full Member
***
Offline Offline

Posts: 127


« Reply #8 on: December 07, 2008, 04:26:14 pm »

Hi J. Pablo

I omitted Spain from my list (by mistake), but I already have the regions and districts for it. I'll append my list above. I believe you can send me attachments using the FacileForms message system.

Thanks.

I'll update Spain with the cities when I get your list (although it'll take me around 2/3 weeks to do so as I'm travelling a lot).
Logged

David.
j_pablo_gn
Full Member
***
Offline Offline

Posts: 143


« Reply #9 on: December 08, 2008, 12:42:50 pm »

Hi,

I could not send you the file through FF messagery system (I can not attach files).

And I can not install your component, I just have these files:
- GEOFF_v0.1_EN.xml
- GEOFF_v0_00_002_EN_TO_v0_00_003_UPDATE.sql.zip
- GEOFF_v0_00_003_EN_CLEAN.sql.zip

But I think I need an sql file before installing GEOFF_v0.1_EN.xml and I do not find it in your web site. Where can I find it?

Thanks.
J. Pablo.

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF © 2001-2006 Lewis Media
| Terms of Use | Privacy | Sitemap |