Change ID prefix

From TNG_Wiki
Revision as of 14:27, 26 March 2018 by Chris Moss (talk | contribs) (1b correction to tng_associations)

Jump to: navigation, search

The prefix for IDs for individuals (personIDs) is "I" which is very easily mistaken for "1". This mod allows you to change it to another character, the default being "P" for person. The option to change the prefix already exists in Setup, but if you already have entries in the database, or have imported entries from an offline database which already uses I, then you need change all occurrences in the database.

Installation and use

Change prefix
Summary Allows a simple change of character set and collation sequence for the TNG database
Mod Updated 24 Mar 2018
Download link
Download stats show
Author(s) Chris Moss
Mod Support contact author
Contact Developer contact author
Latest Mod
Min TNG V 10.0
Max TNG V 11.1.2
Files modified
Related Mods
only available with English instructions

Download and install the mod in the normal way. Then click on the line for the mod in the mod manager and you will see a button marked "Change database". Click on this and it will change all the tables in the database which have individual ids.

If for any reason you want to revert to the original, click on the Edit options button and swap around the I and P in the $from and $to boxes, pressing Update in each case. You can select any other prefix by putting it in the $to box.

There is also an option called $change here: setting it to 0 will cause the mod to list the number of entries in each table which have the existing ($from) prefix but it won't change anything. Sometimes the same table will show twice if there is more than one field containing personIDs.

Several mods install tables which contain personIDs. The mod checks those for Census Plus International and Cousins. If the tables aren't found it records the fact. So if you don't have these loaded they will be ignored and a "not found" message will be printed. It may be there are other such mod-tables. If you know of any please let me know.

TNG version

This has only been tested on TNG11 but it should work on much earlier versions as it has very little dependence on the coding of TNG, including any version that allows the person prefix to be set.

Search engines

Changing the prefix does change the URL of many pages which refer to individuals and will therefore invalidate the references held by Google etc. It is advisable to create or update a site index using Create Site Map Mod.

Don't forget to change any hard links to people that you have on the site, e.g. on the front page.

TNG User sites who have used this mod

If you have installed this mod, please add your TNG sites to the table below.

URL User Note Mod-Version/TNG-Version User-language Chris Moss En, Fr, De

Revision History

Version Date Contents 24 Mar 2018 Add tng_forumthreads and tng_forumposts tables. Thanks Erik. 26 Mar 2018 Add passocID field in tng_associations. Thanks Jürgen.