Template Manager

From TNG_Wiki
Jump to: navigation, search
Template Manager
Summary Supports the loading, unloading, saving, and erasing of template data from the TNG database.
Validation
Mod Updated 20 May 2018
Download link v12.0.0.0
TNG 12.0

Download stats
Author(s) Bill Herndon
Homepage Template_Manager
Mod Support Template Manager support.
Contact Developer Email me.
Latest Mod 12.0.0.0 for TNG 12.0+
Min TNG V 12.0
Max TNG V 12.0.3
Files modified
admin_templateconfig.php
Related Mods
Notes


Purpose

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.

Developer

Bill Herndon

Requirements

  • A working TNG installation (12.0 - 12.0.3)
  • The Mod Manager

Installation

  • Download the .zip file to your mods directory and unpack it.
  • Install the mod using the TNG Mod Manager.
  • Edit the supplied parameters.

Upgrading

  • Disable the mod through the Mod Manager
  • Install the new version of the mod
  • Enable the mod through the Mod Manager

Features

Use Cases

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:

  1. Execute Save on the template — This writes template to the file system.
  2. Edit the local _templateconfig.php file, adding new parameters or language specific translations for existing parameters.
  3. 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.

Operations

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.

Internationalization

None. (This mod is not does not support language localization.)

Screenshots

TBD

Mod Compatibility

At this time there are no known compatibility issues. Please report any compatibility issues to the mod developer.

Frequently Asked Questions

Coming soon.

Revision History

Version Release Date Comments
12.0.0.0 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 12.0.0.0 12.0.3 DA, DE, EN, ES, FR, SV
Roots & Relatives Remembered Ron Krzmarzick Public & Private 12.0.0.0 See Here EN, DE, CS, ES
Our Roy and Boucher Family Ken Roy Great mod to preserve template values and help modify existing templates 12.0.0.0-rc3 12.0.1 (beta) EN, FR
Hooley Family Links Rick Hooley Public/Private See Here See Here EN