Placename Format

From TNG_Wiki
Jump to navigation Jump to search
Placename Format
Summary Enhances the Gedcom Converter, giving it the ability to change USA Placenames to a consistent configurable format. Also adds a Place Level program that can determine the Place Level of consistent Placenames.
Mod Updated 23 Sep 2023
Download link v14.0.0.6c
TNG 14.0
Download stats
Author(s) Robin Richmond
Homepage Placename Format (This page)
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod
Min TNG V 9.0
Max TNG V 14
Files modified
admin_places, admin_newplace, admin_editplace, admin_mergeplaces, admin_geocode, admin_geocodeform, English cust_text
Installs: Two programs, 3 Include libraries, a configuration file, a help file, and two images used within the help file
Related Mods

Purpose of the Mod

  1. To format USA place names so that they are internally consistent. For instance, it will make "Houston, Harris, Texas" and "Houston, Harris County, Texas", and "Houston, Harris Co, TX" the same. Depending on the options you set, the resulting placename could be "Houston, Harris County, Texas, USA" or "Houston, Harris, TX", and so on.
  2. To set Place Levels for many places at once.

As of December, 2019, the Placename Format process can only format USA Placenames, and only works within the Gedcom Converter. Similarly, the Place Levels program mostly only deals with USA Placenames. (Of course, it can easily identify Countries, and assign placenames to them.)

I think that 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.)

Mod Options

All of the Placename Format options are presented in a form that can be found

  • At the Place Format tab in Admin>>Places, or
  • At Admin>>Import/Export>>Gedcom Converter, as a subform to the Gedcom Converter "kickoff form".

In both cases, the "Save Options" button saves the options without leaving the form.

The placename format options affect

  • The Placename Formatting process within the Gedcom Converter, and
  • This mod's new "Place Levels" program in the Admin>>Places tab menu.

The Placename Formatting options are all stored in the mod's own config file in the Extensions folder. See Upgrades and Configuration section below to learn how that config file is initialized.

The Placename Formatting options are described and illustrated in great detail in the application's help file on the mod author's web site. On the same site, you can interact with (but not save or submit) the Gedcom Converter and Placename Formatting options on the Gedcom Converter's "kickoff" form.

In summary, the Placename format options specify

  • Input
    1. Text strings that can represent the United States ("USA", "United States", etc.)
    2. Places, such as "District of Columbia", "Puerto Rico", and possibly "East Texas" that serve as states in the standard placename hierarchy, but, of crouse that aren't states
    3. Places, such as "Shenandoah Valley, VA", "Long Island, NY", and "Brooklyn, NY" that serve like counties in the standard placename hierarchy, but are not counties (nor, in Louisiana, parishes).
    4. At least three sets of strings that identify placename components in the "City/Town" position of the placename hierchary, and that aren't really cities or towns.
  • Output
    1. Text to represent the United States (which can, for example, be omitted)
    2. When or whether to use state abbreviations,
    3. When and how to use terms like "County" or "Parish" to explicitly identify, well, counties and parishes.
    4. Rules that determine how to treat placename components identified by the strings in the 4th Input option category above.
    5. Whether to place spaces between each placename component.


This mod was developed by Robin Richmond.


  • A working TNG installation.
  • A backup of all affected files (see the list in the summary in the upper right corner of the page)
  • An installed current version of the Mod Manager.


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.

Related Mods

For now, Placename Formatting can only be done during the Gedcom conversion process installed by Gedcom Converter, so this mod is pointless without Gedcom Converter.

Files Modified

  • This mod adds two tabs ("Levels" and "Name Options") to the tab menus of the native Admin>>Places programs:
    • admin_places, admin_newplace, admin_editplace, admin_mergeplacesm, admin_geocode, admin_geocodeform
  • English and English-UTF8 cust_text.php.


Files Installed

This mod installs files from its mod subfolder:

  1. placename_format_v12.0.0.5a - - The subfolder that you expect to exist for any mod that installs files. It contains
    1. rrplacenameformat_options.php - The form that edits and saves Placename Formatting options. This program is accessed through a new tab in the Admin>>Places tab menu
    2. rrplacenameformat_levels.php - A new program that sets Place Levels for as many places as it can. This program, like the Placename Formatting options form, is accessed through a new tab in the Admin>>Places tab menu
    3. rrplacenameformat_saveoptions.php - An Ajax program that saves the Placename Formatting options. As you would expect, it is invoked by the Placename Formatting options form.
    4. rrplacenameformat_lib.php - A function library (an Include file) used by some of the programs (including the Gedcom Converter) that format placenames and set place levels.
    5. rrplacenameformat_readoptionslib.php - A function library (an Include file) used by the programs that read the options file and/or display the Placename Formatting options.
    6. rrplacenameformat_optionslib.php - A third function library.
    7. rrplacenameformat_config-distrib.php - The distribution version of the Placename Formatting options configuration file. See Upgrades and Configuration.
    8. rrplacenameformat_help.php - A TNG help file accessible from the options form and the Place Levels program.
    9. rrplacenameformat_counties.png - An image file used within the Placename Format help file.
    10. rrplacenameformat_states.png - Another help file image.

[Show Installation Details]


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


  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.


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


This mod doesn't change the way that any TNG programs behave; its primary effect is in how it re-formats placenames. It also can do batch assignment of Place Levels. There are several formatting options, so any placename could wind up looking differently on different TNG sites. Here are some example, where

  • The initial value could have full state names, "USA", the word "County" or "Parish" after the county/parish name
  • the first formatted example would result from the default option values:
Initial Value Formatted Value
Chicago, Dade, IL Chicago, Dade County, Illinois, USA or
Chicago, Dade Co, IL USA or
Chicago, Dade, Illinois, etc.
Chicago, Dade County, Illinois Exactly like Chicago, Dade, IL
Greenwood Cemetery, Parker, Iowa unchanged, or Greenwood Cemetery, Parker County, Iowa, USA
Civil District 10, Bradley, TN Bradley County, Tennessee, USA, or Civil District 10, ,Bradley County, Tennessee, etc.

For "Civil District 10, Bradley, TN":

  • When "Civil District 10" (one of the "funky towns") is omitted from the result, it can be moved to an event note or just removed altogether.
  • In the second example result, note that "Civil District 10" has been moved to the Location position in the placename, and there is a blank value for the City..

Upgrades and Configuration

When either a mod or TNG is upgraded, the mod should be uninstalled. Uninstalling a mod could lead to the loss of a program's configuration settings. But this mod's configuration file survives the uninstallation (and even deletion) of the mod. When this mod is installed, it installs a distribution copy of the Placename Formatting options configuration file, and reads from the distribution copy until you save modified (or, for that matter, unmodified) options. It always writes to a permanent copy of the configuration file, and, of course, reads from the permanent copy once it has been created.

Thus, when the mod is uninstalled, and then reinstalled, the permanent copy remains in place, and the program will use your latest options. (If an upgrade to the mod adds options, the application provides default values for those options.)

Revision History

Mod Version TNG Version Date Note
v14.0.0.6c 14 23 Sep 2023 Executes $flags['tabs'] = $tngconfig['tabs']; conditionally to accommodate TNGv14.0.1 14 13 Jan 2023 Upgraded for TNGv14, with no functional changes 12.0 - 12.3 15 May 2020 No functional changes
  • Added flags to the Levels and Place Name tabs (which are installed by this mod) to report which mod installed the new tabs.
  • Added what I call "Inner Mod Menus" to the Place Levels and Place Name Options programs (which are installed by this mod). The "Inner Mod Menus" are not visible unless the Inner Mod Menus mod is installed. See Inner Mod Menu and visualizations below. 12.0 - 12.3 14 Dec 2019
  • Added a couple of language strings, and, as noted below, added a new include file.
  • All other changes were to the PHP files that are installed in the main TNG folder. (i.e. No changes to help files, image files, or target locations in the .cfg file.)
  • New functionality in the Placelevels program, rrplacenameformat_levels.php:
    • Changed the way "Options Saved" messages are displayed so that they can include a count of the number of times they have been saved.
    • Added an option to assign Placelevels to muli-part non-USA names. When it is set, the number of place-parts is used to determine the Placelevel.
    • Added the number of records that were processed to the completion message.
  • New functionality in rrplacenameformat_optionslib.php
  • Bug fix:
    • The county designator was not being added to 5-part placenames such as cemeteries. (This affected the place formatting library, rrplacenameformat_lib.)
  • Other:
    • Dealt with end-of-line whitespace in several files.
    • Moved all of the functions needed by rrplacenameformat_levels.php (which doesn't do formatting) to a new include file (rrplacenameformat_readoptionslib.php). For all other Place Formatting programs,the new include file is included in rrplacenameformat_optionslib.php.
    • In the Placelevels program (rrplacenameformat_levels.php), moved the code that executes the form actions so that it comes before the HTML stream is initiated. This was done because the form actions end with a redirect (i.e. header("Location..."), and template-generated HTML code was sometimes getting in the way. 12.0+ 04 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 14 EN
Our Immigrant Ancestors Jim Larson Private site 14.0.3 EN,NO