Difference between revisions of "TNG Integration Search1"
From Genwiki
(→Installation) |
(→Place String Search / Match Strategy 1) |
||
Line 2: | Line 2: | ||
− | This version of the "link_wiki.php" file differs in it's approach to Location Strings and how it tries to match the GenWiki pages. | + | This version of the "link_wiki.php" file differs in it's approach to Location Strings and how it tries to match the GenWiki pages. <font color="red">These files only work with unrealeased Revision 3 of the GenWIki mod which assumes the GenWiki tables were installed into the TNG database.</font> |
This approach is targetted at Location Strings that have been entered in a somewhat unrestricted manner. Programs such as PAF (Personal Ancestral File) do not require a specific form for location strings, and allow any user entered string. TNG is based upon the construct that locations are comma separated fields, and are formatted somewhat like typical postal addresses. This means the location becomes less specific as you read left to right. | This approach is targetted at Location Strings that have been entered in a somewhat unrestricted manner. Programs such as PAF (Personal Ancestral File) do not require a specific form for location strings, and allow any user entered string. TNG is based upon the construct that locations are comma separated fields, and are formatted somewhat like typical postal addresses. This means the location becomes less specific as you read left to right. |
Revision as of 11:28, 22 July 2006
Contents
Place String Search / Match Strategy 1
This version of the "link_wiki.php" file differs in it's approach to Location Strings and how it tries to match the GenWiki pages. These files only work with unrealeased Revision 3 of the GenWIki mod which assumes the GenWiki tables were installed into the TNG database.
This approach is targetted at Location Strings that have been entered in a somewhat unrestricted manner. Programs such as PAF (Personal Ancestral File) do not require a specific form for location strings, and allow any user entered string. TNG is based upon the construct that locations are comma separated fields, and are formatted somewhat like typical postal addresses. This means the location becomes less specific as you read left to right.
A typical format might be: town, county, state/province, country
Another format might be: Lot, Road, Settlement, Parish/Township, County, State/Province, Country
There are many possible formats, and it is often the case that within a single TNG database there will be a mix of many different structures.
Search / Match Strategy
This strategy start from the left, and checks for a GenWiki page that matches just the first segment, then the first two segments, then the first three segments, then four, five, etc. The largest continuous set of segments that match is turned into a GenWiki link. Then, the search starts again at the first non-matched segment and repeats the search. Segments that do not match a page are simply printed as text.
There are also a few rules to ensure spaces and such are consistent.
- Spaces between words are converted to underscores
- Spaces around commas and ends are removed
- text in parenthesis are removed
Examples
If a GenWiki site was setup such that the following pages exist:
"Tiverton"
"London"
"London,England"
"Kincardine Township"
"Canada"
then:
Original TNG Place | Resulting Place Links | Resulting GenWiki page(s) | |
---|---|---|---|
(at home) Tiverton, Ontario, Canada | (at home) Tiverton, Ontario, Canada | Tiverton & Canada | |
Tiverton, Kincardine Township, Ontario, Canada | Tiverton, Kincardine Township, Ontario, Canada | Tiverton & Kincardine_Township | |
London, Ontario, Canada | London, Ontario, Canada | London & Canada | |
Currie Street, London, England | Currie Street, London, England | London,England |
If you are logged into the TNG site, and you are administrator, then a grayed icon will appear at all "Place" locations where a GenWiki page is NOT found. It will appear as below:
Substitution Support
This version also includes support for a dictionary like substituion list. If you have multiple contributors, or have included gedcoms from other sources, you may find your locations strings contain a variety of different abbreviations for places.
The substitution file allows the definition of search and replace pairs to help increase the consistency of place locations when searching for GenWiki pages. A sample set of substitution pairs are included. The example pairs perform replaces like the following:
Original TNG Place | Resulting Place Links | |
---|---|---|
Detroit,MI,USA | Detroit,Michigan,USA | |
Detroit,MI | Detroit,Michigan | |
London,Eng | London,England | |
London,Eng. | London,England |
Installation
- backup your existing "link_wiki.php"
- Download the Strategy 1 zip file
- It contains two files
- the replacement "link_wiki.php" file
- a new file called "substitution_list.php"
- It contains two files
- extract and edit the "link_wiki.php" file options to match your GenWiki installation
- extract and view/edit your custom substitution list
- copy the two files to your base TNG directory
- enjoy...