Family Chart in TNG v11

From TNG Wiki
Jump to: navigation, search
A typical chart

TNG V11 incorporated the Family Chart Mod

23. Family Chart: A new Family Chart has been added, showing a person's spouse, children and parents (original code by Chris Moss).

The Family Chart, which is part of TNG v11, provides a representation of a family together with those of the parents which can be used to navigate more easily around a tree. The chart includes siblings, parents, uncles and aunts and grandparents, with their dates and thumbnails. One click on a link, indicated by down or up arrows, takes you to children, cousins, in-laws and great and great-great grandparents, together with great-uncles etc., from which you can proceed further.

The mod adds a new item "Family" to the main menu bar so that you can easily switch from other views. Note that links to other families are only shown where they exist.


chart showing the values in famconfig.php which can be changed

To change the colours of the boxes and background you need to make changes in two places. The boxes can be changed by placing this block into your customconfig.php file and changing the colour values

// Added for Family Chart customisation
$familychart['fboxcolor'] = '#DEEAF2'; #colour of main family boxes
$familychart['boxcolor'] = '#ECF9FF'; #colour of other family boxes

A suggested color style for template8 is as follows:

// Added for Family Chart customisation [template8]
$familychart['fboxcolor'] = '#FBEFDE'; #colour of main family boxes (t8)
$familychart['boxcolor'] = '#cfc3b6'; #colour of other family boxes (t8)

To change the colour of the background around a family of boxes, and to change the background colour of the box to switch spouse, place this in your "mytngstyle.css" file and change the colour value.

.fambackground {
	background-color: #AAC;
.hiddenbox {
	background-color: #AAC;

NOTE that a default .fambackground color is defined for each template in the templatestyle.css and the default value for .hiddenbox is found in familychart.php

It is not necessary to move the famconfig.php file if you are using the Config Path as it won't be necessary to modify the file.

e.g. to change the 'boxwidth' value you should include a statement of the form

$familychart['boxwidth'] = 230;

When a parent has several families, these are indicated next to the box by a plus symbol with a popup which shows one or more extra families. A family symbol also indicates another family through adoption. For living people, a small 'alive' symbol Alive.png is shown if the user is not logged in.

These two settings can be used in customconfig.php affecting famconfig.php file:

 $familychart['livingsymbol'] = 1;		#set this to 0 to stop display of symbol
 $familychart['livingalways'] = 0;       #set this to 1 for use of living when logged in

A mod is available that displays a Help line explaining the various symbols used in the Family Chart

Another fix is available to correct an issue in TNG 11.0.0 whereby a logged in user who is unable to see details of a living person is prompted to log in. (Note that this fix is incorporated in TNG 11.0.1.)

The presence or absence of silhouettes is governed by the value of $tngconfig['usedefthumbs']

Impact if using mod previously

If you have been using this Mod and have now upgraded to TNG 11, you will get a lot of 404 errors from the Google crawler The reason for this is that the Mod used a file "family.php" where as in TNG this page is now called "familychart.php" and Google will at least for a while be looking for the "family.php" files it had previously indexed. You can fix this with a ReWriteRule in your .htaccess file similar to this one.

# To handle the Family Chart Mod that used family.php 
# but now uses familychart.php as part of TNG 11
RewriteEngine On
ReWriteBase /
ReWriteRule ^tng/family.php(.*)$ /tng/familychart.php$1 [NC,R=301,L]