|Summary||Supports the loading, unloading, saving, and erasing of template data from the TNG database.|
|Mod Updated||20 May 2018|
|Mod Support||Template Manager support.|
|Contact Developer||Email me.|
|Latest Mod||220.127.116.11 for TNG 12.0+|
|Min TNG V||12.0.0|
|Max TNG V||12.1.0|
This mod supports the loading, unloading, saving, and erasing of template data from the TNG database. Local template configuration files having the same format as in previous TNG releases are used to store template data when not resident in the TNG database. The mod can be used to preserve templates across releases or for loading entirely new templates.
- A working TNG installation (12.0 - 12.1)
- The Mod Manager
- Download the .zip file to your mods directory and unpack it.
- Install the mod using the TNG Mod Manager.
- Edit the supplied parameters.
- Disable the mod through the Mod Manager
- Install the new version of the mod
- Enable the mod through the Mod Manager
Load New Templates
In TNG 12 template parameters and values are stored in the database. For templates already installed prior to a TNG 12 upgrade, this isn't a problem because all the parameters in the existing templateconfig.php file at the time of the upgrade are read and inserted into the tng_template table. Newly installed templates also need a way to have those parameters written to the TNG database. Template Manager's Load function reads a local template configuration file and writes parameters and values to the database. For example, the templates NearDark and NearDawn are now distributed with such a file to support installation using the Template Manager.
Modify or Add Parameters
The Save, Load, and Unload functions support writing a template's parameters to the local file-system and then reloading the parameters back into the TNG database. To add new parameters in an existing template:
- Execute Save on the template — This writes template to the file system.
- Edit the local _templateconfig.php file, adding new parameters or language specific translations for existing parameters.
- Execute Load on the template — When the data from the _templateconfig.php file is written to the database the new or language specific parameters and values are added.
To modify the names of existing parameters, use the same procedure as above but substitite Unload for Save in the first step. This removes the template's data from the database in addition to writing it to the file-system.
Preservation of Parameter Values
The Template Manager supports the preservation of Template Parameter Values Across TNG Releases.
If you are concerned about losing a template's configuration across TNG releases or when installing/de-installing mods, you can always save or unload a template prior to an upgrade or mod installation, restoring its original values after the operation. The Save All and Load All functions can be used to do this for all currently loaded templates.
For templates currently loaded into the TNG database, four operations are supported:
- Save - Saves the selected template to a template configuration file in the template's root folder or to whatever subfolder has been set in the mod parameters. The configuration file does not need to exist. It will be created or overwritten. But subfolders (when specified) must exist. The template's data remains in the TNG database.
- Wipe - Removes the selected template's data from the TNG database.
- Unload - Executes a Save operation followed Wipe on the selected template.
- Save All - Attempts to save all currently loaded templates to the TNG installation in their respective template folders.
For templates currently in the TNG installation that have valid template configuration files, the following two operations are supported:
- Load - Loads data from the chosen template's local configuration file into the TNG database. Existing field values are overwritten. New field values are appended.
- Load All - Attempts to load all templates in the TNG installation that have valid template configuration files into the database.
None. (This mod is not does not support language localization.)
At this time there are no known compatibility issues. Please report any compatibility issues to the mod developer.
Frequently Asked Questions
|18.104.22.168||20 May 2018||Initial release|
Sites Using Template Manager
If you download and install this mod, please add your TNG site to the table below.
|URL||User||Note||Mod Version||TNG Version||Language(s)|
|Lindell-Herndon Genealogy||Bill Herndon||Mod developer, public site||22.214.171.124||12.1||DA, DE, EN, ES, FR, SV|
|Roots & Relatives Remembered||Ron Krzmarzick||Public & Private||126.96.36.199||See Here||EN, DE, CS, ES|
|Our Roy and Boucher Family||Ken Roy||Great mod to preserve template values and help modify existing templates||188.8.131.52-rc3||12.0.1 (beta)||EN, FR|
|Hooley Family Links||Rick Hooley||Public/Private||See Here||See Here||EN|
|Dabbling in Genealogy||Jeff Rueger||Public/Private site||184.108.40.206||12.1b1||EN|