Age Calculation Mod/es

From TNG_Wiki
Jump to navigation Jump to search
Age Calculation Mod
Summary Adds the age of a person to the Individual page
Validation {{{mod_validation}}}
Mod Updated {{{mod_last_update}}}
Download link age_calculation_v8.1.3.zip for TNG V8.0.1
age_calculation_v8.1.2.zip for TNG V8.0.0
age_calculation_tng7_v1.4.zip for TNG 7
age_calculation_tng6_v1.2.zip for TNG 6
Download stats {{{download_stats}}}
Author(s) Leon Hassing
Config File for TNG V7 was created by Ken Roy and for TNG V6 by Leon Hassing.
Homepage Age Calculation Mod (This page)
Mod Support TNG Forums
Contact Developer {{{mod_contact}}}
Latest Mod 8.1.0 for TNG V8
1.4
Min TNG V 6.0.0
Max TNG V 8.0.0
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.


Introducción

Esta modificación de TNG calculará y mostrará la edad en la página de la Persona (getperson.php)

  • al momento de la muerte de todas las personas fallecidas
  • hasta la fecha actual para todos los individuos que viven, cuando el usuario tiene permiso para ver información de los individuos que viven.

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

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

  • TNG V8
  • TNG V7 (7.0.0 through 7.1.2) 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.

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.

Developer

Mod developer is Leon Hassing.

Config File for


Revision History

Version Date Contents
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

Note that the Age Calculation Mod and the Event Map add children mod, both modify the same query. 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. Mods must be removed in the reverse order, of course.

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 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 their 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

Sites using this mod

Please add TNG site that you have found that utilize this modification!