Customization

From TNG_Wiki
Jump to navigation Jump to search
Construction The Customization is currently under development, is not complete, and needs a major rewrite. The related links are areas that should probably be covered in the customization overview.--Ken Roy 07:02, 23 August 2015 (CDT)
This information applies mainly to TNG V0 and above.
TNG 10.0
Construction



The following are some of the ways you can customize TNG and maintain your customizations across a TNG upgrade:

  • update the TNG Settings which are saved as config.php files and should be backed up before making any changes
  • update the custom text files (cust_text.php) in the language specific folder
  • update the custom config file (customconfig.php)
  • create a custom menu for your site
  • update the user style sheet (mytngstyle.css) to override the TNG style sheets
  • modify the TNG code by editing them or preferably by using the Mod Manager to install the modifications

TNG Settings

The TNG Admin > Setup screen allows you to change the default TNG settings. Some of the information is covered in the Setup category.

thispagedoesnotexist.html

An example showing Search & Home buttons

There are jumps to this page defined in over 20 files in the code, but it isn't defined. If it's called, it will then produce a "404 page not found" error. It's intended as an "emergency exit" and can occur when an id has been deleted or when a person logs out whilst looking at a "member-only" page.

The answer is not to define it yourself with an html editor but to define the proper "page not found" page that is given on your server. For example, a commonly used name is "404.shtml". Remember that it applies to all the files within the site, so you need to take special action if you have several applications within one url.

You will probably want the styling to correspond to your template, so the index.php from there is a good place to start. You won't need most of the text enclosed by <?php ... ?> but you will need to provide the correct "include"s for style sheets. An instruction to search for a person or to click the "back" button on the browser is probably a good idea. The example on the right may be found here. You may wish to provide several languages on this page.

Custom Text

Nearly all the text on a page in any language is defined via assignment to strings such as:

$text['cannotexecutequery'] = "Cannot execute query";

These have the property that the last assignment for any particular left hand side (up to the =) trumps any previous assignment, even if it doesn't occur in the same file.

You can thus use the custom text file cust_text.php in the languages/language_name folder to override the TNG text variables defined in the admintext.php, alltext.php, and text.php files for that language. The cust_text.php is usually not replaced by TNG in an upgrade. This file is often used by TNG mods to add additional text variables for the modification.

See following articles

Custom Configurations

Many of the settings such as the widths of boxes are set in the various config files such as config.php and pedconfig.php. Many of these can be changed using the administration menu. Don't change the files as they will be overwritten by the system on the next update if not before. You can add your own custom configuration to TNG using the customconfig.php file. You can also override some of the TNG configuration variables using the customconfig.php. For example, you can override the Randomphoto options. Some TNG mods also use the customconfig.php file to provide user tailoring capabilities and new database tables for their mods.

The Census Plus International, Persistent Bookmarks, and Same Person Link mod uses the customconfig.php file to define the additional tables used by the mod.

The Custom Menu Hook and Custom Menu Hook Mod uses the customconfig.php to add the 4th pull down menu and add entries to the TNG Find and Info pull down menus.

The Family Chart Mod uses the customconfig.php file to override the colors specified in the mod's configuration settings.

Custom Menu

To add your own Site menu as a 4th pull down menu see the Custom Menu Hook and the Custom Menu Hook Mod

Override Styles

You can override the TNG style sheets (genstyle.css, tngtabs1.css or tngtabs2.css, and the templatestyle.css using the mytngstyle.css for the template. See Overriding Colors in a Template

TNG Mods

TNG mods are modifications made to the TNG scripts by users and are normally installed by the Mod Manager, which also allows you to quickly uninstall the mods before doing an upgrade and re-install them after the upgrade. The mod developers usually provided updated versions of the mod if required in an upgrade.

A number of users list the mods they are using on their user pages. As of TNG v10 the most popular are:

Link to mod Description
Relationship Display Mod* Displays the relationship between a default person and the current person in the header
Family Group Worksheet Provides a form for visitors to enter genealogical information and upload it to the website
Married Name in Search Mod Allows search for a woman by married name
Submit Photo Mod Add a link to the submit photo form after the date on an individual's page
FGW Tabs Mod Places tabs at the top of TNG personal and family pages to open a pre-populated Worksheet
Redundant Person Tabs* Removes Ancestors and Descendants tabs on pages where not applicable
Customized Logs Mod Splits the search engine bots from the normal TNG user access into three separate logs
Persistent Bookmarks Store the bookmarks for logged in user making them available on any computer or browser
Submit Photo Tab Mod Add a tab linked to the submit photo form to the tab menu.
Life Dates Mod Separate the life dates of parents and families onto separate lines on the getperson pages
Living Color Mod Sets the names of everyone flagged as living or private to the colors of your choice
Cemetery Edit View and add new cemeteries more easily
Geocode Assist Mod Provides an easy way to geocode locations
Count Descendants Display a count of a person's descendants, broken out by generation
Same Person Link Shows two people as the same person in a different tree
Cemeteries Admin List Adds the Associated Place Name in the Cemetery selection list
Mod User Support Form Asks for helpful initial information for debugging mods
Family Preview Mod Adds a person preview on mouseover of family member's name on an individual's page
Family Indicators Mod Adds a ^ sign for parents who have ancestors, and > for married children who have no descendants
Submit Photo/Document Form Mod Allows visitors to submit photos and/or documents for an individual or family.
Family Chart Mod Provides a representation of a family which can be used to navigate more easily around the tree

* May cause problems with large databases (>25,000 people)

For a list of mods that apply to TNG V10 see Mods for TNG v10

Related Links

WebApps - The Least You Need To Know

How TNG builds a page

Text variables - explained

Understanding Template Settings - TNG V9

Overriding Colors in a Template

Setup

Setup - Privacy

Histories - Creating

Custom Menu Hook

Custom Menu Hook Mod

Collapsible Items

Contact Us Subject Line

Customizing Welcome email

Mods for TNG v10

Mod Manager