rumseyfamilypages
genealogy of the rumsey and ballou families
First Name:  Last Name: 
[Advanced Search]  [Surnames]

HomeHome    SearchSearch    PrintPrint    Login - User: anonymousLogin   

TNG Addon Enhancement for Developers
This page is meant to serve as a guide for TNG addon developers.

To download this mod, or to see end user instructions please visit the TNG Addon Mod page.


Overview
As a developer of an addon, following this methodology allows for users to easily integrate your addons without having to modify their actual TNG files. This is done by housing the configuration files and modifications for an addon in a separate 'addons' directory under the main TNG site. Each addon has a separate subdirectory which contains that addon's customizations. This results in a directory structure similar to the following (this assumes that your main TNG directory is called 'genealogy' and there are three addons installed, named 'legacy', 'signature', and 'research'):

genealogy ----- addons ----- legacy
            |            |
            |            --- signature
            |            |
            |            --- research
            |
            --- admin
            | 
            --- photos
            |
            .....

Within each individual addon directory, there are a number of files that can be present and are used to control how the addon integrates itself into TNG. A short synopsys of each file follows:

General Integration Files
addon_config.php: This file defines the addon, specifying information such as the name of the addon, version, author, etc. It also specifies all of the TNG functions that are modified as part of the addon. More details on the format of this file below. This is the only file that is required to be present.
override.php: All TNG functions that are overridden will be included in this file (regardless of which TNG file the function belongs to).
addon.js: Any javascript that should be loaded as part of your addon should be included here.

Public Pages
tabs_[type].php: Adds a new tab. You have control over the tabs on different pages based on the name of the file, the options being:
   tabs_I.php: Individual pages; this includes all of the pages with tabs except for the three below.
   tabs_F.php: Family group page (familygroup.php).
   tabs_S.php: Source page (showsource.php).
   tabs_R.php: Repository page (showrepo.php).
innermenu_[page].php Adds items to the "inner menu". The innermenu addon can be made specific to a TNG page. For example, to add an entry to the inner menu text on the pedigree.php page, you would create a innermenu_pedigree.php file in the addon directory.
menu_[type].php: Allows for new items to be added to the Find, Media or Info using the menu_find.php, menu_media.php and menu_media.php files, respectively.

Admin Pages
admin_left.php
admin_right.php
admin_main.php


A More Visual View
The following images give a visual representation of which files are used to modify areas of different pages. Public Pages Modification of the public pages is controlled by the tabs_[type].php, innermenu_[page].php and menu_[type].php files.


Format of addon_config.php