Count Descendants

From TNG_Wiki
Revision as of 16:07, 30 October 2018 by Louis42 (talk | contribs) (Sites using this mod)

Jump to: navigation, search

Ambox notice.png The latest version of this mod uses the guidelines for TNG v12+ cust_text.php files. If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]

TNG 13.0
TNG 12.0

Count Descendants
Summary Counts the descendants of a person, and prints a report broken down by generation.
Mod Updated 25 Oct 2018
Download link v12.0.0.9a
TNG 12.0
See the Revision History for older versions
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
Min TNG V 12
Max TNG V at least 12.0.2
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 rrcount_descendants.php
Related Mods

Purpose of the Mod

To implement a new chart that contains a table of counts of a person's descendants, broken out by generation, plus

  • The count and a list of marriages between cousins,
  • The count and a list of spouses who married more than one descendant,
  • The count and a list of descendants who have two sets of parents,
  • The count of descendant surnames, and a Surname Cloud.
  • The count of descendants' spouses' surnames, and a Surname Cloud.
  • A table of descendant surname counts, by generation.


  1. This mod
    • Installs a new PHP program (rrcount_descendants.php) that generates the Descendant Count chart, and
    • Places a link to the Descendant Count program in the Inner Menu of all of the native Descendant Chart programs, e.g. Standard | Compact | Text | Register | PDF | Count.
  2. When cousins marry, their descendants are displayed twice by the native TNG descendant charts, but the Count Descendants program counts them only once.
  3. The native TNG Descendant Charts all pass their Generation count to any other native Descendant Charts when the second chart program is invoked from the first chart program's Inner menu. But the Count Descendant program ignores the generation count that is passed it. It always starts by processing all generations. Once the initial chart showing all generations is displayed, the user can select another value for the generation count. The Count Descendants program does, however, pass its generation count to the other chart programs.
  4. When cousins marry, they are counted both as a descendant and as a spouse. Since the program shows a count and a list of marriages between cousins, users who really want to count unique people can adjust the count accordingly.
  5. The program also keeps track of "descendants who have two sets of parents", which is the same as saying "descendants who appear twice in the tree as descendants. This typically occurs when a descendant's spouse adopts the children of an earlier spouse of that same descendant. As with the descendants of cousins who marry, descendants who appear twice in the list are counted only once.

Related Mods

TextPlus Charts

First, if you want to use both Count Descendants and TextPlus Charts, you should install Count Descendants v9 and TextPlus Charts v15

This mod coordinates with TextPlus Charts v15 in two distinct ways.

  1. Inner menu links:
    • The Count Descendants chart program installed by this mod contains a link to the Text+ Descendant chart. That link is displayed only if the TextPlus Charts mod is installed.
    • Similarly, the Text+ Descendant Chart installed by TextPlus Charts contains a link to the Count Descendants chart, and that link is displayed only if the this mod (Count Descendants is installed.
  2. The Admin >> Setup >> Chart Settings form
    Both mods add
    (1) An option to the "Initial Display" selection box in the "Descendancy Chart" section of the Chart Settings form, and
    (2) A help link next to that selection box
    The two mods coordinate over that help link in two ways:
    1. Both mods insert nearly-identical Javascript (document).ready functions that install the help link only if the other (document).ready function installed by the other mod has not already created the link, and</li>
    2. Both mods add text to the Chart Setting help file describing the choice(s) they add to the Chart Settings form.
      The two help file links to the help text necessarily use different anchors in the Chart Settings help file, and that only one of the two help file links get created. However, since both new blocks of text are small, and at the bottom of the help file, the text created by both mods should be visible no matter which link has been created and followed by a user.

Show Mod Names

Like almost all of my mods, the code installed by TextPlus Charts collects information that can be used by Show Mod Names, but only if Show Mod Names is installed. TextPlus Charts is not dependent on Show Mod Names.

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 the cust_text.php issue described in the notice at the top of this Wiki article.


This mod uses the standard installation process. [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]


This is a new chart, so there is no 'Before' visualization for the chart. 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 Chart Settings option, as shown below.

1. 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 exist.

Count descendants12-after.jpg
2. AFTER: Some details from the counts below the results table

The first two "Show them" buttons have been clicked. Note that "Descendants who married cousins" always come in pairs. The details link to the family record and to each spouse's record.

File:Count descendants12-after2.jpg
3. AFTER: More details from the counts below the results table

This screenclip shows the descendant surname cloud (with 79 names), and a portion of the pop-up panel that results from clicking on the name "HUTCHESON". In the pop-up panel, you can see that not all of my surnames are fully capitalized. In the data, I only capitalize my ancestors' surnames. But to avoid confusion between "MACINTYRE", "Macintyre" and, "MacIntyre", the Count Descendants chart uses all-caps for all surnames.

File:Count descendants12-after3-cloud.jpg
4. AFTER: A portion of the Surname Counts by Generation
Count descendants12-after4-surnamecounts.jpg
5. AFTER: Admin>>Setup>>Chart Settings options form

You can see the new option "Count", and the help icon. When you mouse over the help icon, the text "New Option(s)" is displayed.

Count descendants12-options.jpg

Revision History

Mod Version TNG Version Date Note
v12.0.0.9a 12.0 - 12.0.2+ 25 Oct 2018 Added surname clouds and a breakdown of descendant surname clouds by generation. Also replaced my little blue information icon style with the new image that was distributed with TNGv12. (See the last visualization above.) The mod is now fully compatible with TNGv12, and, as described above, coordinates more closely with TextPlus Charts v15.
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.
v10.1.0.7b 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. Show 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 EN,DE,CS,ES
Racine d'Alsace J-Louis Valory Public/Private - T17 customized 12.0.2 FR