This is a TNG mod directive file %name:Count Descendants% %version:13.0.0.12b2% %description: Installs a new program that counts descendants if the selected person, and displays several summaries of the descendants and special cases such as cousins who marry. Also adds links to this new program to the Descendants inner menu of each Descendant program.
This mod includes Czech, Danish, Dutch, French, German, Norwegian, and Spanish 1language strings. % %wikipage:Count_Descendants% %author:Robin Richmond:https://tng.lythgoes.net/wiki/index.php?title=User:Robinrichm% ********************************** (Needs Dutch and Norwegian updates) *** Revision History *** v12b2 6 Jan 2021 * Language update for Danish and Spanish. * Fixed capitalizaion of UTF-8 surnames v12b 4 Oct 2020 * Fixed the counter in the primary results table. It was display the counts for the "self" generation in the first row, but saying "children" v13.0.0.12a 4 Aug 2020 * Changed target search strings affected by new isset() or empty() function calls. v12a 26 May 2020 - Moved language strings to files in the mod's subfolder v12 26 Feb 2020 - Changes the way a couple of target files are handled, to accommodate the ChartType Hint mod. - rrcount_descendants.php adds the ChartType Hint to the InnerMenu (if the mod has been installed) v11 20 Dec 2018 - No real function changes - Lots of code changes, especially for the lists of counts and the name clouds. - Improves the way that this mod coordinates with TextPlus Charts to share the help icon next to the Initial Dispay selection box at Admin >> Setup >> Chart Settings >> Descendancy Chart. - Moved numerous comments from the PHP files to the .cfg file v10b 13 Nov 20189 - Norwegian translation by Kåre Kjøllesdal - Spanish and Czech translations by Ron Krzmarzick v10a 8 Nov 2018 - My non-standard way of applying classes to the results tables didn't work in all templates. It's still non-standard, but it works now. - Added an options menu to show/hide the Living counts and the birth ranges. The checkboxes use the jquery function 'toggle'; they don't submit the form. The menu is in the Innermenu in the main window and in an unprintable fieldset in the Format for Printing window. v12.0.0.10 8 Nov 2018 - Responding to a request by Rick Hooley, added the number of living people in each generation. - Also added the birth year range for each generation. v12.0.0.9a 28 Oct 2018 - Added a missing text string v12.0.0.9 10 Oct 2018 - what can I say? v8 didn't work. I had changed the Count Descendants PHP filename, but didn't change it in the PHP code. The new filename is rrcount_descendants.php. - Removed my blue information icon style class. For the Chart Settings help link, the mod now uses the information icon png file that is native to TNGv12. - Now uses a (document).ready function rather than PHP/HTML code changes to o Add the 'Count' option to the Descendancy Chart Initial Display (i.e. default chart program) field in the Chart Settings form. o Add a hyperlinked help icon next to that form field. - Changed the pop-up text associated with the help icon; requiring a change to the Danish, Dutch, and German translations. (None have been implemented yet.) - Changed the text added to the Chart Settings help file, and changed its location in the file. - Coordinated more closely with TextPlus Charts: o As before, both mods add an option to the Descendancy Chart Initial Display form field. o As before, both mods add text to a help file describing the new Initial Display option(s). o Much like the previous versions of both mods, they both (try to) add a help link next to the Initial Display form field(s) that they modify. o What has changed: 1. Only one help icon is placed next to Descendancy Chart Initial Display form field. Both mods now add that help icon at run-time, and ONLY IF the other mod hasn't already added one. 2. Both mods now update the same help file (the Chart Settings help file) so that both mods' new help text is displayed, no matter which mod placed the help icon on the page. v12.0.0.8 11 Apr 2018 for TNGv12 - No functional changes. - Updated the cust_text.php search strings. - Updated the author tag. - Renamed the program installed by this mod. v8 25 Mar 2018 - Changes made to descendcount.php - Added descendant and spouse surname clouds, which link to lists of descenants and spouses, - Added a table of descendant surnames by generation - The new text strings are hard-coded in English v7c 25 Jan 2018 - Removed the second line from cust_text.php target location search strings. v7b 11 Jun 2017 - Just changed the font size of the help link on the Admin>>Setup>>Charts screen. v8 10 May 2017 - Moved the blue information button style to an embedded style sheet in admin_pedconfig.php, eliminating a dependency on the Blue Info Button mod v7 9 Mar 2017 - Followed Roger Mitchell's suggestion to add borders to the results table, and added a mod Parameter that can suppress the border & heading styling. - Eliminated the language .cfg file by moving the German and Dutch strings to this file. - DisplayModNames is now optional v6b 20 Nov 2015 - Registers the mod and displays mod names using the Show Mod Names conventions. - Adds a help link to the affected field on the Administration >> Setup >> Chart Settings form. v6a 8 Sep 2015 - Repositioned text strings in cust_text.php v6 24 May 2015 - Added a new footer that displays the program name and version. v5 1 May 2015 - Martin Pannier found some HTML typos that caused the copyright footer to be misplaced v4a 30 Apr 2015 - Separated Dutch, German, and Danish translations into a separate config file v4g 19 Apr 2015 - Added German UTF8 translations by Hendrik Martius v4 18 Apr 2015 - New way of displaying duplicates; - Handles Danish terminology that starts the G* equivalent after great-grandparents. - Adds an Administrative Charts option to use Count Descendants as the default descendant chart - Torben Devantie added Danish translations v3 14 Apr 2015 - Now checks for duplicates v2 11 Apr 2015 - Bernard Wortelboer added Dutch translations and caught some untranslated strings. v1 5 Apr 2015 *************************************************************************************** %target:admin_pedconfig.php% *** In a (document).ready function, *** 1. Add an option ('Count') to the 'Initial Display' selection box in *** the "Descendancy Chart" sections of the form. *** The Count Descendants mod uses essentially identical code to add a *** 'Text+' option to the Descendancy Chart Initial Display field. *** 2. Add a help link next to each of the 'Initial Display' field. *** The link bring up the Descendancy Chart section *** of the Chart Settings help page. *** The Count Descendants mod uses essentially identical code to add *** a help link next to the same field - but both mods add a link *** only if the other mod hasn't. (They each check for a shared *** classname on the link. *** Note that we are not adding new fields for new TNG system variables (just *** new selection box options for existing TNG system variables), and that we *** therefore do not need to modify admin_updatepedconfig.php. %location:% include("begin.php"); %end:% %insert:before% ##### admin_pedconfig.php, modified by ###Count Descendants, by Robin Richmond # Modifies the Admin>>Setup>Chart Settings form to allow Text+ Charts to be the Initial Charts. $tngModNames['Count Descendants']['admin_pedconfig.php'] = '12b2'; ############################################################### %end:% *************** admin_pedconfig.php Location 2 - New option & help link for the Descendancy Initial Display field. %location:% %end:% %insert:after% %end:% *************** admin_pedconfig.php Location 3 - Display mod names %location:% %end:% %insert:after% %end:% ********************************************************************** ********************************************************************** %target:descend.php% %location:% $textpart = "pedigree"; %end:% %insert:before% ##### descend.php, modified by ###Count Descendants, by Robin Richmond # - Set up an inner menu tab to link to the descendcount chart, and # - Invoke the Descendcount program as the default chart if $pedigree['defdesc']== -3 $tngModNames['Count Descendants']['descendtext.php'] = '12b2'; ############################################################ %end:% ******* descend.php Location 2 - Determine the descendcount chart URL %location:% $descendtext_url = getURL( "descendtext", 1 ); %end:% %insert:after% $descendcount_url = getURL( "rrcount_descendants", 1 ); ###Count Descendants Location 2:new program url %end:% ******* descend.php Location 3 - Invoke the Count Descendant report if it is the default %location:% elseif( (isset($display) && $display == "register") || ( !isset($display) && $pedigree['defdesc'] == 1 ) ) { header( "Location: $register_url" . "personID=$personID&tree=$tree&generations=$generations"); exit; } %end:% %insert:after% ###Count Descendants Location 3: Invoke the Count Descendant report if it is the default elseif( (isset($display) && $display == "count") || ( !isset($display) && $pedigree['defdesc'] == -3 ) ) { header( "Location: $descendcount_url" . "personID=$personID&tree=$tree"); exit; } ###Count Descendants Location 3: End of insertion %end:% ******* descend.php location 4 - Add descendcount to the Inner Menu *** code fragment search at the end of a line, with a two-line insertion *** (including the comment) %location:% PDF\n"; %end:% %triminsert:after% ###Count Descendants Location 4: Add the Count link to the Inner menu (one line insertion). $innermenu .= "    |    {$text['rrcd-descendcount']}\n"; %end:% ******************************************************************* ******************************************************************* %target:descendtext.php% %location:% $textpart = "pedigree"; %end:% %insert:before% ##### descendtext.php, modified by ###Count Descendants, by Robin Richmond #Add the new Text+ chart to the Inner Menu $tngModNames['Count Descendants']['descendtext.php'] = '12b2'; ############################################################ %end:% ******* descendtext.php location 2 - Find the descendcount chart URL %location:% $descendtext_url = getURL( "descendtext", 1 ); %end:% %insert:after% $descendcount_url = getURL( "rrcount_descendants", 1 ); ###Count Descendants Location 2:new program url %end:% ******* descendtext.php location 3 - Add descendcount to the Inner Menu *** code fragment search at the end of a line, with a one-line insertion %location:% PDF\n"; %end:% %triminsert:after% ###Count Descendants Location 3: Add the Count link to the Inner menu (one line insertion). $innermenu .= "    |    {$text['rrcd-descendcount']}\n"; %end:% ******************************************************************* ******************************************************************* %target:desctracker.php% %location:% $textpart = "pedigree"; %end:% %insert:before% ##### desctracker.php, modified by ###Count Descendants, by Robin Richmond #Add the new Text+ chart to the Inner Menu $tngModNames['Count Descendants']['desctracker.php'] = '12b2'; ############################################################ %end:% ******* desctracker.php location 2 - Find the descendcount chart URL %location:% $descendtext_url = getURL( "descendtext", 1 ); %end:% %insert:after% $descendcount_url = getURL( "rrcount_descendants", 1 ); ###Count Descendants Location 2:new program url %end:% ******* desctracker.php location 3 - Add descendcount to the Inner Menu %location:% echo getFORM( "descend", "GET", "form1", "form1" ); %end:% %insert:before% ###Count Descendants Location 3: Add the Descendant Count link at the end of the innermenu (one line). $innermenu .= "    |    {$text['rrcd-descendcount']}\n"; %end:% ******************************************************************* ******************************************************************* %target:descendvert.php% %location:% include("tng_begin.php"); %end:% %insert:after% ##### descendvert.php, modified by ###Count Descendants, by Robin Richmond #Add the new Text+ chart to the Inner Menu $tngModNames['Count Descendants']['desctracker.php'] = '12b2'; ############################################################ %end:% ******* descendvert.php location 2 - Find the descendcount chart URL %location:% $descendtext_url = getURL( "descendtext", 1 ); %end:% %insert:after% $descendcount_url = getURL( "rrcount_descendants", 1 ); ###Count Descendants Location 2:new program url %end:% ******* descendvert.php location 3 - Add descendcount to the Inner Menu %location:% echo getFORM( "descend", "get", "form1", "form1" ); %end:% %insert:before% ###Count Descendants Location 3: Add the Descendant Count link at the end of the innermenu (one line). $innermenu .= "    |    {$text['rrcd-descendcount']}\n"; %end:% ******************************************************************* ******************************************************************* %target:register.php% %location:% $textpart = "pedigree"; %end:% %insert:before% ##### register.php, modified by ###Count Descendants, by Robin Richmond #Add the new Text+ chart to the Inner Menu $tngModNames['Count Descendants']['register.php'] = '12b2'; ############################################################ %end:% ******* register.php location 2 - Find the descendcount chart URL %location:% $descendtext_url = getURL( "descendtext", 1 ); %end:% %insert:after% $descendcount_url = getURL( "rrcount_descendants", 1 ); ###Count Descendants Location 2:new program url %end:% ******* register.php location 3 - Add descendcount to the Inner Menu *** code fragment search at the end of a line, with a one-line insertion %location:% PDF\n"; %end:% %triminsert:after% ###Count Descendants Location 3: Add the Count link to the Inner menu (one line insertion). $innermenu .= "    |    {$text['rrcd-descendcount']}\n"; %end:% ******************************************************************* ******************************************************************* %target:tngrobots.php% %fileoptional:% %location:% if( !$cms['support'] ) %end:% %insert:before% #####tngrobots.php, modified by ###Count Descendants, by Robin Richmond # Adds the new Count Descendant programs to the same lists as the native descendant charts. # The file and mod are not being registered to the ShowModNames app because tngrobots is used by too # many programs that would incorrectly report that they were changed by this mod. #$tngModNames['Count Descendants']['tngrobots.php'] = '12b2'; ################################################################## %end:% ******* tngrobots.php location 2 - add rrcount_descendants.php right after descendtext.php %location:% case "descendtext": %end:% %insert:after% case "rrcount_descendants": %end:% ******************************************************************* ******************************************************************* %target:languages/English/pedconfig_help.php% *** The help file for Admin >> Setup >> Chart Settings *** *************** pedconfig_help.php Location 1 - Top-of-file comments %location:% include("../../helplib.php"); %end:% %insert:before% ##### pedconfig_help.php, modified by ###Count Descendants, by Robin Richmond $tngModNames['Count Descendants']['pedconfig_help.php'] = '12b2'; ############################################################## %end:% ******* pedconfig_help.php Location 2 - The Descendancy Chart Initial Display field %location:% style. The user will always have the option to switch among these display types after viewing the initial display.

%end:% %insert:after%

The Count Descendants mod adds its chart as a choice ('Count') in the Initial Dispay field.

%end:% ******* pedconfig_help.php Location 3 - Show mod names %location:% %end:% %insert:before% %end:% ******************************************************************* ******************************************************************* %target:languages/English/cust_text.php% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-modfolder'] = "count_descendants_v13.0.0.12b2"; $text['rrcd-descendcount'] = "Count"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "New Option(s)"; $admtext['rrcd-newoptionhelp'] = "New Option"; $admtext['rrcd-pedcount'] = "Count"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/English-UTF8/cust_text.php% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-modfolder'] = "count_descendants_v13.0.0.12b2"; $text['rrcd-descendcount'] = "Count"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "New Option(s)"; $admtext['rrcd-newoptionhelp'] = "New Option"; $admtext['rrcd-pedcount'] = "Count"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Czech/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Spočítat"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "New Option(s)"; $admtext['rrcd-newoptionhelp'] = "New Option"; $admtext['rrcd-pedcount'] = "Spočítat"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Czech-UTF8/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Spočítat"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "New Option(s)"; $admtext['rrcd-newoptionhelp'] = "New Option"; $admtext['rrcd-pedcount'] = "Spočítat"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Danish/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Optælling"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nye muligheder"; $admtext['rrcd-newoptionhelp'] = "Ny mulighed"; $admtext['rrcd-pedcount'] = "Optælling"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Danish-UTF8/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Optælling"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nye muligheder"; $admtext['rrcd-newoptionhelp'] = "Ny mulighed"; #admtext['rrcd-pedcount'] = "Optælling"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Dutch/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Aantal"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nieuwe opties"; $admtext['rrcd-newoptionhelp'] = "Nieuwe optie"; $admtext['rrcd-pedcount'] = "Aantal"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Dutch-UTF8/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Aantal"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nieuwe opties"; $admtext['rrcd-newoptionhelp'] = "Nieuwe optie"; $admtext['rrcd-pedcount'] = "Aantal"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/German/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Anzahl"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "neue Optionen"; $admtext['rrcd-newoptionhelp'] = "neue Option"; $admtext['rrcd-pedcount'] = "Anzahl"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/German-UTF8/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Anzahl"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "neue Optionen"; $admtext['rrcd-newoptionhelp'] = "neue Option"; $admtext['rrcd-pedcount'] = "Anzahl"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:@languages/Norwegian/cust_text.php% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Opptelling"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nye alternativer"; $admtext['rrcd-newoptionhelp'] = "Nytt alternativ"; $admtext['rrcd-pedcount'] = "Opptelling"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:@languages/Norwegian-UTF8/cust_text.php% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Opptelling"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nye alternativer"; $admtext['rrcd-newoptionhelp'] = "Nytt alternativ"; $admtext['rrcd-pedcount'] = "Opptelling"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Spanish/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Contar"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nuevas Opciònes"; $admtext['rrcd-newoptionhelp'] = "Nueva Opciòn"; $admtext['rrcd-pedcount'] = "Contar"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/Spanish-UTF8/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Contar"; #For inner menus of various programs # For admin_pedconfig.php & the default descendant chart $admtext['rrcd-newoptionshelp'] = "Nuevas Opciónes"; $admtext['rrcd-newoptionhelp'] = "Nueva Opción"; $admtext['rrcd-pedcount'] = "Contar"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/French/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Compter"; #For inner menus of various programs # For the Descendancy Chart Initial Display field in admin_pedconfig.php $admtext['rrcd-newoptionshelp'] = "Nouvelles Options"; $admtext['rrcd-newoptionhelp'] = "Nouvelle Option"; $admtext['rrcd-pedcount'] = "Compter"; ######################Count Descendants mod: End of new strings %end:% ******************************************************************* ******************************************************************* %target:languages/French-UTF8/cust_text.php% %fileoptional:% %location:% //Mods should put their changes before this line, local changes should come after it. %end:% %insert:before% ######################Count Descendants mod: new strings $text['rrcd-descendcount'] = "Compter"; #For inner menus of various programs # For the Descendancy Chart Initial Display field in admin_pedconfig.php $admtext['rrcd-newoptionshelp'] = "Nouvelles Options"; $admtext['rrcd-newoptionhelp'] = "Nouvelle Option"; $admtext['rrcd-pedcount'] = "Compter"; ######################Count Descendants mod: End of new strings %end:% *************** FILES ************************************************ %target:files% %copyfile:count_descendants_v13.0.0.12b2/rrcount_descendants.php% *** The language strings are in the mod's subfolder ***