TNG Files - Configuration

From TNG_Wiki
Jump to navigation Jump to search

This is one of several articles describing the files released with TNG, beginning with TNGv10.1.1. This article is up-to-date through TNGv12.1

  • These files are often referred to as "config files", and they store the definitions of dozens of TNG settings (aka options).
  • Note that most these files contain 'config' in their filenames, that is, all except subroot.php, which is a special case in more than one way.
  • In TNG distributions, the config files are stored in the main TNG folder.
  • The config files other than subroot.php can be moved, as a group, to another folder. See Move your configuration files
    When the config files are moved, they are generally moved to a folder outside of the web server's folder structure for security's sake.
  • All TNG programs read subroot.php, config.php, logconfig.php, and customconfig.php.
  • The config files consist of PHP assignment statements that assign values to TNG system variables.
    Several of the settings are stored in the array $tngconfig, but most are in variables whose names cannot readily be identified as that of a system variable.
  • Except where noted below, it is generally a bad idea to try to edit these files manually.
  • Numerous TNG mods add setting to config files.
    • Some mods add their settings to config files that are updated at Admin>>Settings, and modify the Admin>>Setup programs with new form fields that update the new options.
    • Other mods add settings to customconfig.php. Some of those mods have their own programs that update those options, but other customconfig.php settings modified by editing customconfig.php manually.
    • Note that when using the Mod Manager to add or change options in the TNG configuration files shown below, you only need to specify %target:config.php% for example. The Mod Manager will find where your config files reside.
Filename Description
config.php The primary configuration file. Holds the database connectivity settings, file paths for media files, and many others.
Updated, for the most part, by Admin>>Setup>>General Settings.
  • The update program contains one large HTML form that consists of several subforms, each of which can be opened and closed independently. The Save button always saves all settings in all of the subforms.
  • Starting with TNGv12, two settings in this file (the active template and a flag that says whether the template can be changed) are edited by the form at Admin>>Setup>>Template Settings.
  • The program at Admin>>Setup>>General Settings also updates subroot.php.
importconfig.php Settings associated with Gedcom Imports and Exports.
Updated by Admin>>Setup>>Import Settings.
logconfig.php Paths to the two access logs (for end-user programs and admin programs), and other log file settings.
Updated by Admin>>Setup>>Log Settings.
mapconfig.php Settings related to the Google Maps that appear on several TNG pages.
Updated by Admin>>Setup>>Map Settings.
pedconfig.php Settings for various charts. "Ped" refers to the Pedigree charts, but this file's settings also cover other charts.
Updated by Admin>>Setup>>Chart Settings.

The update program contains one HTML form, which consists of several subforms, each of which can be opened and closed independently. The Save button always saves all settings in all of the subforms.

Special Cases - not updated by Admin>>Setup
customconfig.php Custom settings. This file is distributed with nothing but comments. The site's time zone is often placed in this file manually. It can contains settings used by TNG mods.
mmconfig.php Settings for the Mod Manager.
Updated by the Mod Manager options tab, not by Admin>>Setup.
templateconfig.php Contains language strings and image references that are used in the index.php and topmenu.php files for each template.
  • Before TNGv12, this file also identified the active template for the site, was maintained by the form at Admin>>Setup>>Template Settings, and was read by every TNG program.
  • after the TNG v12 upgrade this file is obsolete
TNG version: 12.0.0
Starting with TNGv12,
  • The language strings and image references in this file are loaded into a new templates table in the database during the site setup process, and the file is not used again.
  • The language strings and image references are still updated at Admin>>Setup>>Template Settings but not written to the database
  • The active template setting and a related setting are updated at Admin>>Setup>>Template Settings, but are saved in genconfig.php.
An extra-special case
subroot.php Holds only an error setting and the path to all of the other configuration files.
  • The configuration path is saved in the two system variables - $subroot, and $tngconfig['subroot'].
  • This file is updated by the "Config Path" option in the "Paths and%nbsp;Folders" subform under Admin>>Settings>>General Settings. It can be updated manually to recover from an error when moving the files from one environment to another, if the file was inadvertently moved.
  • This file must always be in the TNG root folder; it cannot be moved to the a configuration folder, since TNG program must read it to learn the path to the configuration folder.

Articles that list TNG Files

Configuration | Admin PHP | Non-Admin PHP | Ajax | TNG Files - Language-Specific | Images | JavaScript | CSS | Fonts | Miscellaneous