Age Calculation Mod

From TNG_Wiki
Jump to: navigation, search
Obsolete This mod only applies to TNG V6, TNG V7, TNG V8, and V9

The Age Calculation Mod mod is obsolete with TNG V10 since the functionality has been included in TNG

TNG version: 9.2.2
TNG version: 6.0

TNG V10 action required

  • if you upgraded over existing environment -- Clean up and then Delete the mod
  • if you did a full install -- Delete the mod


Age Calculation Mod
Summary Adds the age of a person to the Individual page
Validation V8.1.4 and V9.0.0.0 of the mod are XHTML compliant.Valid-xhtml10.png
Mod Updated {{{mod_last_update}}}
Download link for
TNG 9.0
age_calculation_v9.0.0.2.zip

for and after
TNG 8.0.1
age_calculation_v8.1.4.zip
for
TNG 8.0

age_calculation_v8.1.2.zip
for
TNG 7.0
age_calculation_tng7_v1.4.zip
for
TNG 6.0
age_calculation_tng6_v1.2.zip
Download stats View download statistics
Author(s) Leon Hassing
Config File for TNG V7 was created by Ken Roy and for TNG V6 by Leon Hassin
updated by Jeff Robison for TNG V9
Homepage Age Calculation Mod (This page)
Mod Support TNG Community Forums
Contact Developer
Latest Mod 9.0.0.2 for TNG V9
8.1.4 for TNG V8.0.1 and above
1.4 for TNG V7
1.2 for TNG V6
Min TNG V 6.0.0
Max TNG V 9.2.2
Files modified
getperson.php
Related Mods
Notes
Both mods can now be installed independently of each other. However, if you are using both mods, you must install the Event Map add children mod first in TNG V8. This restriction does not apply to TNG V9.



Introduction

This TNG modification will calculate and display the age on the Individual (getperson.php) page

  • at death for all deceased persons
  • to current date for all living individuals when the user is allowed to view information on living individuals.

The mod adds a new Age row to the primary individual and shows the age in parentheses for other persons on the Individual page as shown in the Visualization of this mod

The mod can be installed, using a different version of the config file, on:

  • TNG V9
  • TNG V8
  • TNG V7 (7.0.0 through 7.1.3) and
  • TNG V6 (tested by Leon on versions 6.2.0, 6.1.3 and 6.0.0.).

Manual install of the mod is documented on Heinz web site.

Note that the Age Calculation Mod and the Event Map add children mod, both modify the same query, therefore there is a restriction on the order of installation and removal of the mod in TNG V8.

Note that even if a person is deceased, if the living flag is set, the age will be calculated to current date. This is not a problem. The living flag takes precedence over the death date. If profiles have no date of death and the living flag is not set, the age-field is not displayed.

Note that the updates made in v8.1.4 of the mod were only to make the mod XHTML compliant. The comma is still displayed after the birthinfo. If user who get a blank comma for birth info can provide the test case then the logic might be adjusted, otherwise Olaf's workaround to deleting the comma in line 153 of the mod file is still required.

Rules for Age Display

These are the rules for displaying the age:

  • When the death date is not filled in and the person has an indication "Not living" then nothing is displayed.
  • When the death date is not filled in and the person has an indication "Living" then the age is not calculated when the user is not logged in (depends on : "show living data" settings in privacy tab)
  • When the user has logged in then the age will be displayed, where the age is the age he/she has today.

The living tag is filled (when no death date present) according the setup in the administration: Import settings, "If no death date, assume deceased if older than xxxx". (Rules provided by Leon on User2 list on 26 Sep 2010)


Developer

Mod developer is Leon Hassing.

Config File for


Revision History

Version Date Contents
v9.0.0.2 10 March 2013 Updated by Jeff Robison to display the age after the birth-death in the header, and provide options to suppress the new age header or the Age event row display.
v9.0.0.1 11 February 2012 Non display of birth/death info if one of either is empty fixed.

The display should now be grammatically correct in English.

v9.0.0.0 2 February 2012 updated for TNG V9.0.0.0 by Jeff Robison to use the new query functions in tngdblib.php
v9.0.0.0_mod 2 February 2012 Updated by Oname.gif to delete commas in the children line, see thread in the mailing-list. File can be downloaded from following link v9.0.0.0_mod-Download
v8.1.4 8 February 2011 updates for TNG V8.0.1 and above to be XHTML compliant.
V8.1.3_mod 22 August 2010 Updated by Oname.gif to delete commas in the children line, see thread in the mailing-list. File can be downloaded from following link v8.1.3_mod-Download
v8.1.3 25 July 2010 update for TNG V8.0.1 originally provided by Joerg Baum
v8.1.2 1 July 2010 updated addition.php portion of the config file to use quoted variables as used by TNG V8
fixed formatting of child descendant indicator
v8.1.1 29 May 2010 updated addition.php portion of the config file to get images from new TNG img/ folder
Note that addition.php still requires update to use quoted variables as used by TNG V8
v8.1.0 24 May 2010 updated config file to remove blank after ($age) parameter since change was dropped in V1.3.

V1.4 config file updated by Ken Roy for TNG V8

v1.4 11 April 2010 updated config file to remove blank after ($age) parameter since change was dropped in V1.3.

V1.4 config file updated by Ken Roy for TNG V8

v1.3 24 September 2009 config file updated by Leon Hassing so that it can be installed independently of the Event Map add children mod
v1.2 23 September 2009 updated config file to remove blank after ($age) parameter
v1.1 19 September 2009 original Mod Manager config file

Requirements

  • A working TNG installation.
  • A backup of your TNG getperson.php and language cust_text.php files.
  • An installed current version of the Mod Manager.

Restriction

TNG version: 8.1.3
TNG version: 8.0
Note that the Age Calculation Mod and the Event Map add children mod, both modify the same query.

However, if you are using both mods, you must install the Event Map add children mod first in TNG V8. Mods must be removed in the reverse order, of course in TNG V8.


TNG version: 9.0
Note that this restriction does not apply. Both mods can now be installed independently of each other in TNG V9.

Behavior

Note that even if a person is deceased, if the living flag is set, the age will be calculated to current date. This is not a problem. The living flag takes precedence over the death date.

Automated Install

  1. Download the appropriate config file for your version of TNG as shown in the summary in the upper right hand corner
  2. Extract the appropriate zip file in your TNG admin/mod_folder (TNG V7 and V6) or mods (TNG V8)
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the appropriate config file.

Custom Text Additions

Note that for TNG V8 and above the config file includes the changes for the languages/English and languages/English-UTF8 folders.

Note that config file only includes the English language changes, so if you support multiple languages you will need to modify the config file to add the custom text for those other languages, or manually add the $text['years'] to the cust_text.php for all the languages you are using.

The following custom text will be added to your English/cust_text.php file by this mod. If you are using other languages, you must add these lines to each of your language cust_text.php files with appropriate translations of course.


// Age Calculation Mod text
$text['years'] = "years";

For example, you would add to the French/cust_text.php

// Age Calculation Mod text
$text['years'] = "années"

The translation for $text['years'] can be found in the appropriate language text.php file. The reason it is needed in the cust_text.php is because there is a case assignment to the one in the TNG distributed file.

Other Languages

If you use other languages in addition to English, you either need to modify the config files to include the cust_text.php for those languages, or you need to manually add the $text['years'] to the cust_text.php for all the languages you are using.

The translation for $text['years'] can be found in the appropriate language text.php file. The reason it is needed in the cust_text.php is because their is a case assignment to the one in the TNG distributed file.

Visualization of this mod

The following images show how this mod changes the display of the Individual (getperson.php) page by adding:

  • a new row that displays the individual's age at death or if living the individual's current age for users allowed to view information on living individuals as shown in the image below Age calculation mod row added.jpg
  • the age to the parents, spouse, and children as shown in the image below Age calculation mod spouse age.jpg

With the v9.0.0.2 of the Age Calculation Mod,

  • the person's age is also now displayed after the birth-death years in the header

Age calculation mod person age display.png

  • the person's age display can now be controlled through the Edit parameters on the Mod Manager screen. The default is to show the age both after the birth-death years in the header and in the Age Event row. You could change the options to 0 to suppress one or the other.

Age calculation mod person age options.png


Sites using this mod

If you download and install this mod, please add your TNG site to the table below.

URL User Note Mod-Version TNG-Version User-language
The Genealogy of the Hassing-family Leon Hassing the mod developer's site ... ... ...
Our Acadian, French-Canadian, and Maine Ancestors Ken Roy Tested v9.0.0.2 updates 9.0.0.2 9.2.0 EN, FR
Robison & Blythe Genealogy Jeff Robison V9.0.0.2 updates V9.0.0.2 TNG 9.2.0 beta 3 English
The genealogies of the peat or fen colonies in the provinces of Groningen and Drenthe, Netherlands Henny Savenije ... ... ... NL
The genealogies of Claret Family, France Gilles Claret ... ... ... F
my family Oname.gif (no public site) see User:ojay see User:ojay D,(NL),(GB)
Fornal Family Tree Bob Fornal ... 8.1.3 8.0.1 EN
De Calonne Family Website Dennis de Calonne Integrated with WordPress 9.0.0.1 9.1.2 EN, NL
MacomberKin Family Tree Rev. Clinton Macomber ... 9.0.0.0 9.0.0 EN
Majdan/Nanney Family Tree Nik Majdan ... 9.0.0.1 9.0.0 EN
Genealogy.Ravensbeak.com Bob Mueller ... 9.0.0.2 9.2.0 EN
Van den Heuvel Marco van den Heuvel ... 9.0.0.1 9.0.3 NL/EN
A Bisbee Family History Rick Bisbee 9.0.0.1 9.0.4 EN
Nordic Ancestry Mogens C. Fenger 9.0.0.1 9.1.1 EN, DA
[The Zausmer Forest] Joyaa Antares (no public site) 9.0.0.1 9.1.0 EN
AppeltHaus Genealogy Lawrence Appelt Not a Public Site. 9.0.0.2 9.2.0 EN
Arsenault and Simpson families Bob Arsenault Not a Public Site V9.0.0.1 V9.0.3 EN
Palmer Family and Friends Gerry Hubacka Not a Public Site. V9.0.0.1 V9.0.3 EN
R G Strong Family Genealogy Russell G. Strong V9.0.0.1 V9.0.4 EN, DE, FR, NL
Kleinmann Family Tree John Kleinmann Not a public site. Email me for access. v9.0.0.1 v9.1.2 EN
Kemp(e) Family History Andrew Kemp see User:Kempons see User:Kempons EN
Our Family Genealogy Pages Roger Navarre Nice addition to my site 9.0.0.2 9.2.0 EN
Legacy Gazette: My Roots - My Legacy Melissa Watson Padilla ... 9.0.0.2 9.2.1 EN
Walls Wrightsman Family Carl B Zachary V9.0.0.2 TNG 9.2.0 English
Grogan Mob Margaret Grogan Public Site V9.0.0.2 TNG 9.2.0 English
Turner Mob Margaret Grogan Public Site V9.0.0.2 TNG 9.2.0 English
GenealogyWings John Mark Motyer Public site v9.0.0.2 TNG 9.2.1 EN, DE, RU
g.nomi William Vincent Integrated with WordPress 9.0.0.2 9.2.2 EN
Familienforschung Scabell Helga Scabell sehr schönes kleines Beiwerk zur Homepage Danke 9.0.0.0 9.2.2 D