logo

My TNG Customizations

Resources - Genealogy

[post in progress]

Why

Keep all my customized/modified/new files in a separate directory from the program files. So I could change back to “factory” fairly easily, and so I could copy from test environment to live site quickly. It’s also WAY easier to keep a backup of my modified files if they’re all in one location.

How

Move config files out of TNG directory, and out of webroot. Partly for light security, and partly to keep ME from accidentally screwing stuff up. How to do this is covered in TNG Wiki Move Your Configuration Files.

    • program: mysite/public_html/testing/tng
    • config files: mysite/private/testing/tngconfig

Use customconfig.php for any custom text. Program says to use cust_text.php located in each language folder. I don’t use multiple languages, and that’s just one more place to forget I modified a file, so eliminate that, and if I need to create a text variable it goes in customconfig.php. [there’s probably a way to insert language check logic in the customconfig.php file so that this could work even in multi-lingual environments]

Use standard TNG Setup options to locate as many files as possible outside of the TNG directory

My “template” location will be a subdirectory under the TNG files, named “custom”. This directory is where I will put all of my template files, graphics, any custom stuff I can.

Index.php will stay in the TNG directory, but I’ll keep a master version of it in the custom directory for reference/backup purposes.

Admin/Setup/General Settings/Site Design and Definition

  • custom header = custom/header.php
  • custom footer = custom/footer.php
  • custom meta = custom/meta.php
  • tabs style sheet = custom/tngtabs.css

At this point, we have some variables set that we need to become aware of, because they’ll be important in determining how these files find each other.

  • Set in subroot.php via the TNG setup screens, because config files are moved out of the TNG directory
    $tngconfig[subroot] = "/home/mysite/private/testing/tngconfig/";
  • Set in config.php, via the TNG setup screens
    $rootpath = "/home/mysite/public_html/testing/tng/";
    $customheader = "custom/header.php";
    $customfooter = "custom/footer.php";
    $custommeta = "custom/meta.php";
    $tngconfig[tabs] = "custom/tngtabs.css";
  • Note that at the end of config.php, there is the command to call the customconfig.php file. That command is currently:
    @include($cms[tngpath] . "customconfig.php");
    and it should really be @include($tngconfig[subroot].”customconfig.php” or some way to have one customconfig if no CMS and a different one if using CMS, or perhaps both? the way it is right now, you get one or the other, and the path is set to the cms path which doesn’t make as much sense

Create the variables needed for the template

In customconfig.php,

$tngconfig[templatepath] = "custom/";


$text[tng_title] = "The Next Generation of Genealogy Sitebuilding";
$text[tng_version] = "7.1.1";
$text[tng_copyright] = "©2001-" . date('Y');
$text[tng_date] = "14 January 2009";
$text[tng_website] = "http://lythgoes.net/genealogy/software.php";
$text[tng_author] = "Darrin Lythgoe";

$text[pagestyle] = determined by switch command


blog comments powered by Disqus
Copyright © 2012 American Roots. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.