Age Calculation Mod
|Age Calculation Mod|
|Summary||Adds the age of a person to the Individual page|
|Validation||V8.1.4 and V220.127.116.11 of the mod are XHTML compliant.|
for and after
|Download stats||View download statistics|
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 Forums|
|Latest Mod||18.104.22.168 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.0.3|
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.
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)
Mod developer is Leon Hassing.
Config File for
- TNG V9 was created by Jeff Robison and Ken Roy
- TNG V8 was created by Ken Roy
- TNG V7 was created by Ken Roy
- TNG V6 was created by Leon Hassing.
|v22.214.171.124||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.
|v126.96.36.199||2 February 2012||updated for TNG V188.8.131.52 by Jeff Robison to use the new query functions in tngdblib.php|
|v184.108.40.206_mod||2 February 2012||Updated by to delete commas in the children line, see thread in the mailing-list. File can be downloaded from following link v220.127.116.11_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 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|
- 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.
|TNG version:||≤ 8.1.3|
|TNG version:||≥ 8.0|
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 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.
- Download the appropriate config file for your version of TNG as shown in the summary in the upper right hand corner
- Extract the appropriate zip file in your TNG admin/mod_folder (TNG V7 and V6) or mods (TNG V8)
- 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.
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
- the age to the parents, spouse, and children as shown in the image below
Sites using this mod
If you download and install this mod, please add your TNG site to the table below.
|The Genealogy of the Hassing-family||Leon Hassing||the mod developer's site||...||...||...|
|Our Acadian, French-Canadian, and Maine Ancestors||Ken Roy||Updated config file||18.104.22.168||9.0.3||EN, FR|
|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||(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 Genealogy Website||Dennis de Calonne||...||8.1.3||8.1.0||NL, EN, F|
|MacomberKin Family Tree||Rev. Clinton Macomber||...||22.214.171.124||9.0.0||EN|
|Majdan/Nanney Family Tree||Nik Majdan||...||126.96.36.199||9.0.0||EN|
|Van den Heuvel||Marco van den Heuvel||...||188.8.131.52||9.0.3||NL/EN|
|A Bisbee Family History||Rick Bisbee||184.108.40.206||9.0.4||EN|
|[The Zausmer Forest]||Joyaa Antares||220.127.116.11||9.1.0||EN|