Difference between revisions of "Placename Format"

From TNG_Wiki
Jump to navigation Jump to search
m (Robinrichm moved page Place Normalization to Placename Format: New mod name)
(new version for TNGv12)
Line 3: Line 3:
 
|  mod_summary    = This is a "utility" mod.  It is useful only as an adjunct to some other mods that deal with "normalized" place names and cemetery strings. It installs the PHP functions, configuration file, and subform (for the configuration parameters) needed by those other mods.  The primary mod that it supplements is [[Gedcom Converter]]  
 
|  mod_summary    = This is a "utility" mod.  It is useful only as an adjunct to some other mods that deal with "normalized" place names and cemetery strings. It installs the PHP functions, configuration file, and subform (for the configuration parameters) needed by those other mods.  The primary mod that it supplements is [[Gedcom Converter]]  
 
| mod_validation  =  
 
| mod_validation  =  
| download_link  =  For {{Tv1110}}{{Tv100}}{{Tv90}}[[Media:place_normalization_v9.0.0.1.zip|place_normalization_v9.0.0.1.zip]]
+
| mod_last_update = 4 May 2018
 +
| download_link  =  <div>[[Media:placename_format_v12.0.0.4.zip|12.0.0.4.zip]]{{Tv120}}</div>
 +
<div>[[Media:place_normalization_v9.0.0.1.zip|place_normalization_v9.0.0.1.zip]]{{Tv110}}{{Tv1010}}{{Tv90}}</div>
 
| download_stats  =
 
| download_stats  =
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
Line 9: Line 11:
 
| mod_contact    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_contact    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_support    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
 
| mod_support    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
| mod_version    = 9.0.0.1
+
| mod_version    = Place Normalization v9.0.0.1 & Placename Format v12.0.0.4
 
| min_TNG_ver    = 9.0
 
| min_TNG_ver    = 9.0
| max_TNG_ver    = <span style='background-color: #FFBB33; color: #000000'>at least 11.1</span>
+
| max_TNG_ver    = at least 12.0
|  TNG_file_list  = '''Updates:''' genstyle.css<br />
+
|  TNG_file_list  = '''Modifies just the tab menus:''' admin_places, admin_geocode, admin_geocodform, admin_mergeplacesm, admin_newplace<br>
'''Installs:''' admin_placenormalizationlib1.php, admin_placenormalizationlib2.php, gedcom2tngsaveoptions.php, extensions/placeformatconfig-distrib.php
+
'''AlsomModifies:''' English cust_text.php<br />
 +
'''Installs:''' rrplacenameformt.*, English/rrplacenameformat.*, extensions/rrplacenameformatconfig-distrib.php
 
| related_mods  = [[Gedcom Converter]]
 
| related_mods  = [[Gedcom Converter]]
 
| notes    =   
 
| notes    =   
 
}}
 
}}
{| style="margin-right:0.5 em;" align="right"  
+
== Purpose of the Mod ==
| __TOC__
+
This mod primarily supplements the [[Gedcom Converter]] mod by supplying code and options that format '''USA''' place names so that they are internally consistent.
|}
+
For instance, it will make "Houston, Harris, Texas" and "Houston, Harris Co, TX" the same.
 +
Depending on the options values you set, the resulting placename could be "Houston, Harris County, Texas, USA" or "Houston, Harris, TX", and so on.
  
== Purpose of the Mod ==
+
As of May, 2018, the Placename Format process '''can only format USA Placenames, and only works within the Gedcom Converter'''.
This mod primarily supplements the [[Gedcom Converter]] mod by supplying code and options that "Normalize" USA place names. That is, it tries to make sure that all USA placenames:
+
(I'm getting close to a version that can format USA places that are already in the TNG database, and do some formatting of non-USA places, but I really don't know when I might finish. Some feedback from TNG administrators who would like this additional functionality might help move things along.)
* Express "USA", "United States", or "United States of America" in exactly the same way (or omit the country name), and
 
* Use state and county names consistently
 
Thus, depending on its option values, it might convert both "Houston, Harris, Texas" and "Houston, Harris Co, TX" to "Houston, Harris County, Texas, USA" - or perhaps to "Houston, Harris, TX" (or any of several variations).
 
  
It also defines "Cemetery strings" such as "Cemetery", "Burial Ground", "Memorial Garden" and the like, so that Cemeteries that don't necessarily have the word "Cemetery" in their name can be recognized and formatted appropriately.
+
== Installed Files ==
 +
* Two programs that are installed in the Admin>>Places tab menu:
 +
*# Placename Formatting Options: A form that edits the Placename Formatting options (see the next section of this article).
 +
*# Place Levels: A utility program that runs through the Places table, assigning PlaceLevel values to USA Places. It uses some of the Placename Formatting options.
 +
* An action script that saves the Placename Options (using Ajax)
 +
* Three PHP function libraries used to read the options and format placenames.
 +
* A Placename Format help file, and two screen shot image files that it uses.
 +
* An initial configuration file for the Placename Formatting options.
  
You may interact with the options form at http://www.robinrichmond.com/family/gedcom2tngform.php, and follow that page's link to [http://www.robinrichmond.com/family/languages/English/gedcom2tng_help.php the Gedcom Converter help file]. That options form includes ''all'' Gedcom Converter options.  The Place Normalization options are subordinate to the "Normalize USA Places" checkbox.
+
=== Placename Formatting Options===
 +
The options '''include''', but are not limited to:
 +
* What variants of "USA" to look for, and to save in the modified placenames.
 +
* How to handle abbreviated state names, and when to use them.
 +
* A list of strings that identify Cemetery placenames ("Cemetery", "Burial Ground", "Memorial Garden", etc.)
 +
* A list of strings that identify funky locality names ("Magesterial District", "Justice Precinct", etc.) that are used in U.S. Census placenames.
 +
* What do do with Cemetery names and funky localities; i.e. remove them, shift them to the Location position, etc.
 +
* A list of localities that are not states, but, from the perspective of placename formatting and Place Levels, are equivalent to states, like "New England", "East Texas", etc.
 +
* etc.
  
The code and options installed by this mod are also used by other TNG utilities that may become public TNG mods.
+
You may interact with the Gedcom Converter ''and'' Placename Formatting options [http://www.robinrichmond.com/family/rrgedcomconverter.php on the mod author's website]], and follow that page's links the to the [http://www.robinrichmond.com/family/languages/English/rrgedcomconverter_help.php Gedcom Converter help file] and the [http://www.robinrichmond.com/family/languages/English/rrplacenameformat_help.php Placename Format help file].
  
 
== Compatibility And Dependencies ==
 
== Compatibility And Dependencies ==
[[Place Normalization]] doesn't affect any distributed TNG code. It only provides new functionality for some of my mods. At this point, its only use is as an optional adjunct to the [[Gedcom Converter]] mod.  (It does add a comment to css/genstyle.css, but it makes that change only because, in TNG versions before TNGv10.1, a mod ''has to'' modify an existing file before it can install new files.)
+
There are no conflicts with other mods. The only change that [[Placename Format]] makes to existing TNG programs is to add tabs to the tab menu in Admin>>Places programs.  
  
== Requirements ==
+
==Installation==
 +
===Requirements===
 
* A working TNG installation.
 
* A working TNG installation.
 
* An installed current version of the [[Mod Manager]].
 
* An installed current version of the [[Mod Manager]].
 +
* You should backup files listed in the panel on the right.
 +
===Procedure===
 +
# Remove and delete previous version of this mod.
 +
# Backup the files updated by this mod.  They are listed in the panel at the upper right.
 +
# Download the .zip file, Extract its .cfg file to the mods folder.
 +
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config Files]].
 +
===Problems?===
 +
# Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|Mod Manager Remove]] capability
 +
# Contact me through [http://www.robinrichmond.com/family/mod_support.php My Mod Support form].
  
== Automated Installation ==
+
== Visualizations ==
# Remove and delete current (if any) version of this mod.
+
This mod doesn't change the way that any TNG programs look; its effect is in how it re-formats placenames, and the number of formatting options make it difficult to show what the formatted names would look like on any particular site. But using the default options:
# Download the .zip file. Upload and Extract to the mods folder.
+
* "Chicago, Dade, IL" would become "Chicago, Dade County, Illinois, USA"
# Backup the files listed to the right that are modified by this Mod.
+
** Other option values could produce "Chicago, Dade Co, IL USA" or "Chicago, Dade, Illinois", etc.
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config Files]] to  install.
+
* "Chicago, Dade County, Illinois" would wind up looking exactly as "Chicago, Dade, IL" would.
 +
* "Greenwood Cemetery, Parker, Iowa" would become "Greenwood Cemetery, Parker County, Iowa, USA"
 +
** Other option values could produce "Greenwood Cemetery, Parker, IA" or "Greenwood Cemetery,,Parker,Iowa,USA", etc.
 +
* "Civil District 10, Bradley, TN" would become "Bradley County, Tennessee, USA", and "Civil District 10" would be copied to the descriptive text associated with each Event with this placename value.
 +
** Other option values could produce, for example "City District 10, ,Bradley County, Tennessee" (where "Civil District 10" has been moved to the "Location" position in the Placename.
  
== In the event of a problem ==
+
The Placename formatting options reveal more possibilities.
# Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|Mod Manager Remove]] capability
+
* For TNGv12, See [http://www.robinrichmond.com/family/languages/English/rrplacenameformat_help.php the annotated Placename Formatting Options form] in the Placename Format help file.
# Contact me through [http://www.robinrichmond.com/family/mod_support.php My Mod Support form].
+
* This screenshot illustrates the old (and much more limited) Placename Formatting options for TNGv9 - TNGv11 <br>[[Image:gedcom_converter-step3.png]]
  
== Visualization of this Mod ==
+
<-- == Upgrade Strategy ==  
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
+
When you uninstall (and even delete) this mod, its configuration file remains in the TNG extensions folder. If you have used a previous version of this mod (including its predecessor mod, Place Normalization), and you want to retain some of the options from that previous version, you'll have to open the previous configuration file with a text editor, and retype or copy-and-paste the options into the Placename Format Options form. Old options could be stored in the files ftm2tngconfig.php, placeformatconfig.php, or rrplacenameformat_options.php. -->
|-
 
| In the Gedcom Converter, installed by the [[Gedcom Converter]] mod, this mod installs these converter options:
 
|-
 
| [[Image:gedcom_converter-step3.png]]
 
|}
 
  
== Upgrading to This Mod ==
+
| download_link  = <div>[[Media:placename_format_v12.0.0.4.zip|12.0.0.4.zip]]{{Tv120}}</div>
If you want to preserve Place Normalization options from a version of the Gedcom Convert that combined them with other Gedcom Converter options, you must:
+
<div>[[Media:place_normalization_v9.0.0.1.zip|place_normalization_v9.0.0.1.zip]]{{Tv110}}{{Tv1010}}{{Tv90}}</div>
# Copy the file extensions/ftm2tngconfig.php to extensions/placeformatconfig.php
 
# Edit placeformatconfig.php in order to remove the other Gedcom Converter options. That is,
 
## Delete all comments and PHP code before the line that assigns a value to $blnNormalizePlaces. That line should be within the first 10 or 15 lines of the file, and will start with <code>$blnNormalizePlaces</code>.
 
## Delete all comments and PHP code after the line that defines a value for $cemeteryStrings. That line will look something like <code>$cemeteryStrings = "cemetery,memorial garden,burial ground,churchyard,graveyard,burying ground";</code>.
 
Note that, as with other PHP code files, your edited file should start with "<?php".  It doesn't actually ''have to'' end with "?>", but probably should for consistency with other TNG PHP files.
 
  
 
== Mod Change History ==
 
== Mod Change History ==
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
|-
+
! Mod Version !! TNG Version !! Date !! Note
! Mod Version
+
|-
! TNG Versions
+
| [[Media:placename_format_v12.0.0.4.zip|12.0.0.4]]
! Date
+
| 12.0+
! Note
+
| 4 May 2018
 +
| Very significant changes, with several new options, and essentially brand-new PHP code.  The differences are illustrated by the differences between the two options forms in the Visualizations above.
 
|-  
 
|-  
| 9.0.0.1
+
| [[Media:place_normalization_v9.0.0.1.zip|Place Normalization v9.0.0.1]]
| 9.0 - 11.0
+
| 9.0 - 11.01.2
 
| 25 Mar 2016
 
| 25 Mar 2016
 
| Initial Release. Implements functionality that used to be part of the [[FTM-to-TNG Gedcom Converter]] mod, before it became [[Gedcom Converter|Gedcom Converter v12]
 
| Initial Release. Implements functionality that used to be part of the [[FTM-to-TNG Gedcom Converter]] mod, before it became [[Gedcom Converter|Gedcom Converter v12]
Line 94: Line 115:
 
| [[User:Robinrichm|Robin Richmond]]
 
| [[User:Robinrichm|Robin Richmond]]
 
| Mod developer
 
| Mod developer
| 9.0.0.1
+
| 12.0.0.4
| TNGv11.0
+
| TNGv12.0
 
| EN
 
| EN
 
|}
 
|}
[[Category:Mods for TNG v9]]
+
[[Category:Mods for TNG v9]] [[Category:Mods for TNG v10]]
[[Category:Mods for TNG v10]]
+
[[Category:Mods for TNG v11]] [[Category:Mods for TNG v12]]
[[Category:Mods for TNG v11]]
+
[[Category:admin_places.php mods]]
 +
[[Category:admin_geocode.php mods]]
 +
[[Category:admin_geocodform.php mods]]
 +
[[Category:admin_mergeplacesm.php mods]]
 +
[[Category:admin_newplace.php mods]]

Revision as of 17:56, 4 May 2018

Place Normalization
Summary This is a "utility" mod. It is useful only as an adjunct to some other mods that deal with "normalized" place names and cemetery strings. It installs the PHP functions, configuration file, and subform (for the configuration parameters) needed by those other mods. The primary mod that it supplements is Gedcom Converter
Validation
Mod Updated 4 May 2018
Download link
12.0.0.4.zip
TNG 12.0
place_normalization_v9.0.0.1.zip
TNG 11.0
TNG 10.1.0
TNG 9.0
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod Place Normalization v9.0.0.1 & Placename Format v12.0.0.4
Min TNG V 9.0
Max TNG V at least 12.0
Files modified
Modifies just the tab menus: admin_places, admin_geocode, admin_geocodform, admin_mergeplacesm, admin_newplace

AlsomModifies: English cust_text.php

Installs: rrplacenameformt.*, English/rrplacenameformat.*, extensions/rrplacenameformatconfig-distrib.php
Related Mods
Notes


Purpose of the Mod

This mod primarily supplements the Gedcom Converter mod by supplying code and options that format USA place names so that they are internally consistent. For instance, it will make "Houston, Harris, Texas" and "Houston, Harris Co, TX" the same. Depending on the options values you set, the resulting placename could be "Houston, Harris County, Texas, USA" or "Houston, Harris, TX", and so on.

As of May, 2018, the Placename Format process can only format USA Placenames, and only works within the Gedcom Converter. (I'm getting close to a version that can format USA places that are already in the TNG database, and do some formatting of non-USA places, but I really don't know when I might finish. Some feedback from TNG administrators who would like this additional functionality might help move things along.)

Installed Files

  • Two programs that are installed in the Admin>>Places tab menu:
    1. Placename Formatting Options: A form that edits the Placename Formatting options (see the next section of this article).
    2. Place Levels: A utility program that runs through the Places table, assigning PlaceLevel values to USA Places. It uses some of the Placename Formatting options.
  • An action script that saves the Placename Options (using Ajax)
  • Three PHP function libraries used to read the options and format placenames.
  • A Placename Format help file, and two screen shot image files that it uses.
  • An initial configuration file for the Placename Formatting options.

Placename Formatting Options

The options include, but are not limited to:

  • What variants of "USA" to look for, and to save in the modified placenames.
  • How to handle abbreviated state names, and when to use them.
  • A list of strings that identify Cemetery placenames ("Cemetery", "Burial Ground", "Memorial Garden", etc.)
  • A list of strings that identify funky locality names ("Magesterial District", "Justice Precinct", etc.) that are used in U.S. Census placenames.
  • What do do with Cemetery names and funky localities; i.e. remove them, shift them to the Location position, etc.
  • A list of localities that are not states, but, from the perspective of placename formatting and Place Levels, are equivalent to states, like "New England", "East Texas", etc.
  • etc.

You may interact with the Gedcom Converter and Placename Formatting options on the mod author's website], and follow that page's links the to the Gedcom Converter help file and the Placename Format help file.

Compatibility And Dependencies

There are no conflicts with other mods. The only change that Placename Format makes to existing TNG programs is to add tabs to the tab menu in Admin>>Places programs.

Installation

Requirements

  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • You should backup files listed in the panel on the right.

Procedure

  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, Extract its .cfg file to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.

Problems?

  1. Try using the Mod Manager Remove capability
  2. Contact me through My Mod Support form.

Visualizations

This mod doesn't change the way that any TNG programs look; its effect is in how it re-formats placenames, and the number of formatting options make it difficult to show what the formatted names would look like on any particular site. But using the default options:

  • "Chicago, Dade, IL" would become "Chicago, Dade County, Illinois, USA"
    • Other option values could produce "Chicago, Dade Co, IL USA" or "Chicago, Dade, Illinois", etc.
  • "Chicago, Dade County, Illinois" would wind up looking exactly as "Chicago, Dade, IL" would.
  • "Greenwood Cemetery, Parker, Iowa" would become "Greenwood Cemetery, Parker County, Iowa, USA"
    • Other option values could produce "Greenwood Cemetery, Parker, IA" or "Greenwood Cemetery,,Parker,Iowa,USA", etc.
  • "Civil District 10, Bradley, TN" would become "Bradley County, Tennessee, USA", and "Civil District 10" would be copied to the descriptive text associated with each Event with this placename value.
    • Other option values could produce, for example "City District 10, ,Bradley County, Tennessee" (where "Civil District 10" has been moved to the "Location" position in the Placename.

The Placename formatting options reveal more possibilities.

<-- == Upgrade Strategy == When you uninstall (and even delete) this mod, its configuration file remains in the TNG extensions folder. If you have used a previous version of this mod (including its predecessor mod, Place Normalization), and you want to retain some of the options from that previous version, you'll have to open the previous configuration file with a text editor, and retype or copy-and-paste the options into the Placename Format Options form. Old options could be stored in the files ftm2tngconfig.php, placeformatconfig.php, or rrplacenameformat_options.php. -->

| download_link =

12.0.0.4.zip
TNG 12.0
place_normalization_v9.0.0.1.zip
TNG 11.0
TNG 10.1.0
TNG 9.0

Mod Change History

Mod Version TNG Version Date Note
12.0.0.4 12.0+ 4 May 2018 Very significant changes, with several new options, and essentially brand-new PHP code. The differences are illustrated by the differences between the two options forms in the Visualizations above.
Place Normalization v9.0.0.1 9.0 - 11.01.2 25 Mar 2016 Initial Release. Implements functionality that used to be part of the FTM-to-TNG Gedcom Converter mod, before it became [[Gedcom Converter|Gedcom Converter v12]

TNG User sites using this mod

Please add your site if you use this modification.

URL User Note Mod-Version TNG-Version User-language
Robin's Genealogy Database Robin Richmond Mod developer 12.0.0.4 TNGv12.0 EN