Count Descendants

From TNG_Wiki
Revision as of 23:51, 8 October 2018 by Rmcrae (talk | contribs) (Added new mod templates, and boilerplate how to update cust_text.php to TNGv12 specs)

Jump to: navigation, search

Template:RobinV12 cust text update

Count Descendants
Summary Counts the descendants of a person, and prints a report broken down by generation.
Mod Updated 15 May 2018
Download link
TNG 12.0
TNG 10.0
Some download links for earlier versions of the mod for earlier versions of TNG are in the Mod Change History section below.
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod v10.1.0.7c & v12.0.0.8
Min TNG V 10.1
Max TNG V at least 12.0
Files modified
descend.php, descendtext.php, desctracker.php, register.php, tngrobots.php, English pedconfig_help.php, English, Danish, German, and Dutch cust_text.php
Installs rrcountdescendants.php
Related Mods

Purpose of the Mod

To display a count of a person's descendants, broken out by generation. Does no double-count descendants of cousins who marry each other, and displays information about married cousins and people who have two or more sets of parents.


  1. This mod installs descendcount.php, and places a link to descendcount.php on the "inner menu" (that is, the horizontal text menu just below the tab bar) on Descendant pages (the various types of descendant charts).
  2. descendcount.php was derived from descendtext.php, but there are some important differences (other than the obvious differences in report content):
    • When cousins marry, their descendants are displayed twice by descendtext.php, but descendcount.php counts them only once.
    • If the number of generations processed is limited by a generation count, descendtext.php does not display spouses in the last generation. But descendcount.php scans one more generation than the limit calls for, so it can count those spouses.
    • If invoked from the inner menu of another descendancy program, descendtext.php receives an initial value for the number of generations to process. But descendcount.php does not; it always starts by processing all generations, and then it can pass a generations parameter to itself.

More on "duplicates"

The mod now keeps track of everyone it counts to that it can avoid duplicate counts. It expects duplicates when cousins marry cousins, and simply counts all descendants of such marriages once.

Note that, when cousins marry, they are counted both as a descendant, and as a spouse. The program keeps track of "Descendants who married a cousin" so that users who really want to count unique people can adjust the count accordingly. And the program has the option to show who those married cousins are. (This in not limited to first cousins.)

The program also keeps track of "descendants who have two sets of parents". Such people are encountered twice in the scan for descendants, but they are counted only once. In the screen shot below, there is one such person who is there because he was adopted by his mother's second husband. But when I first ran this version of the program, it listed a couple of other people who had multiple sets of parents because of bad data. So really, "Descendants who have two sets of parents" are displayed mostly to reveal possible bad data.

Mod Parameters

Mod version 7 introduced standard results table formatting, with table borders, and a dark background in column headings. The $tablestyling parameter for descendcount.php simply allows the old formatting to be used, without table borders or highlighting.

Related Mods

This mod coordinates with TextPlus Charts in the following way:

  • The program descendcount.php (which is installed by this mod) displays a hyperlink to descendtextplus.php if and only if descendtextplus.php (which is installed by TextPlus Charts) is present (when descendcount.php is run, not when it is installed).
  • Conversely, Starting with TextPlus Charts v9, descendtextplus.php (which is installed by TextPlus Charts) displays a hyperlink to descendcount.php if and only if descendcount.php (which is installed by this mod) is present (when descendtextplus.php run, not when it is installed).

Compatibility with other mods

No conflicts that I know of. Most of the installation problems that have been reported to me have been caused by corruption of these two comment lines, which should be near the beginning of almost every cust_text.php file.

//Put your own custom messages here, like this:
//$text[messagename] = "This is the message";

[Show Installation Details]


  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • You should backup files listed in the panel on the right.


  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, Extract its .cfg file to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.


  1. Try using the Mod Manager Remove capability
  2. Contact me through My Mod Support form.
[Hide Details]

Visualization of this Mod

This is a new report, so there is no 'Before' visualization for the report. However, this mod does add a new Innermenu option called 'Count' to the Descendants Inner Menu associated with the Person Profile and other Descendancy report. This mod also adds a new setup option as shown in the Admin>>Setup screen visualization below, for which there no "Before" visualualization.

AFTER: A screenshot of the report

Note that the default number of generations is "All". This screenshot shows the message that is displayed when you choose fewer generations than possible. The selection list goes up to 20.

Count descendants-after.png
AFTER: The information below the results table, With both "Show them" buttons clicked

Note that "Descendants who married cousins" always come in pairs. The details link to the family record, and to each spouse's record.

Count descendants-after2.png
Admin>>Setup>>Chart Settings options form AFTER:
Count descendants-options.png

Revision History

      • The latest version of the mod is at the top of this table ***
Mod Version TNG Version Date Note 12.0+ 15 May 2018 No functional changes; made compatible with TNGv12.
v10.1.0.7c 10.1 - 11.1.2+ 25 Jan 2018 Again, no functional changes; just removed the second line of cust_text.php target location strings for compatibility with anticipated changes in TNGv12. 10.1 - 11.1.2+ 11 Jun 2017 No real function changes; just changed the font size of the help button and hyperlink on the Admin>>Options>Charts screen.
v7a 10.1+ 10 May 2017 No real function changes
  1. Followed Roger Mitchell's suggestion to add borders to the results table.
  2. Added a mod Parameter that can suppress the border & heading styling.
  3. Eliminated the language .cfg file by moving the German and Dutch strings to this file.
  4. Display Mod Names is now optional, and a style class was defined in an embedded style sheet to remove a dependency on Blue Info Button
Count Descendants v6 10.0 - 10.0.3 25 May 2015 Moved the "Count" innermenu link from before the "PDF" link to the end of the inner menu, to avoid conflicts with a new mod.
Added a right-justified footer that displays the program name and version number.
For the TNGv10 variant only, fixed the database calls that were broken in v5 of the mod. [[|Download Modv6 for TNGv10.0]
Languages v5 10.0 - 10.1.1 25 May 2015 Small changes to German translation; added HTML entities to German non-UTF8.
Count Descendants v5 10.0 - 10.1.1 1 May 2015 Martin Pannier found two HTML typos that caused the copyright footer to be mispositioned.
v4a & languages file 10.0 - 10.1.1 30 Apr 2015 - The base mod with English strings is unchanged.

- The Danish, German, and Dutch translations are in a separate file. - The - Adds the option in Administration >> Setup >> Charts to allow Count Descendants to be the default descendants chart, and
- Torben Devantie added Danish translations

v4 10.0 - 10.1.1 18 Apr 2015 - A new, more understandable (and more translatable) way of displaying special counts below the table of descendant counts,

- Handles Danish terminology that counts great*(n)grandparents differently,
- Adds the option in Administration >> Setup >> Charts to allow Count Descendants to be the default descendants chart, and
- Torben Devantie added Danish translations

v3 10.0 - 10.1.1 15 Apr 2015 Eliminated the duplicates caused when cousins marry each other, and displays other duplicates.
v2 10.0 - 10.1.1 12Apr2015 Bernard Wortelboer added Dutch translations and caught some untranslated strings.
v1 10.0 - 10.1 4Apr2015 Initial Release

Sites using this mod

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

URL User Note Mod-Version TNG-Version User-language
Robin Richmond's Genealogy Database Robin Richmond Mod developer 10.1.1 English
Brady Family Tree in Western Australia Darryl Brady Public site 10.1.1 EN, DE
MOTYER Family Genealogy John Mark Motyer Public site see here see here EN, DE, RU
Wortelboer Genealogy Bernard Wortelboer Public site 11.0.0 NL, EN
DJCM.DK Claus Martinussen Public site 10.1.3 DA, EN
Kemp(e) Family History Andrew Kemp Public site see User:Kempons see User:Kempons EN
Kleinmann Genealogy John Kleinmann 12.0 EN
An Aotearoa Genealogy Website Merv Priestley Public & Private, modified v10.1.0.7c 12.0.2 EN
Roots & Relatives Remembered Ron Krzmarzick Public & Private 12.0.2 EN,DE,CS,ES