Difference between revisions of "Count Ancestors n Descendants"

From TNG_Wiki
Jump to: navigation, search
(Sites using this mod)
Line 11: Line 11:
 
|  mod_version    = 10.1.1.2c
 
|  mod_version    = 10.1.1.2c
 
| min_TNG_ver    = 10.1.1
 
| min_TNG_ver    = 10.1.1
| max_TNG_ver    = 10.1.1
+
| max_TNG_ver    = 10.1.2
 
| TNG_file_list  = See [[Count_Ancestors_n_Descendants#TNG_Modules_Impacted|TNG Modules Impacted]]
 
| TNG_file_list  = See [[Count_Ancestors_n_Descendants#TNG_Modules_Impacted|TNG Modules Impacted]]
 
| related_mods    =
 
| related_mods    =
Line 56: Line 56:
 
== Requirements ==
 
== Requirements ==
  
{{TNG 10.1.1}}
+
{{TNG 10.1.1|and after}}
 
* A working TNG installation.
 
* A working TNG installation.
 
* A backup of all affected files (see the list below)
 
* A backup of all affected files (see the list below)

Revision as of 09:19, 9 July 2015

Count Ancestors (and) Descendants
Summary Show number of AnD under the person's name in getperson.php
Validation
Mod Updated {{{mod_last_update}}}
Download link for
TNG 10.1.1
Count Ancestors Descendants mod v10.1.1.2c.cfg.zip
Download stats Count Ancestors Descendants mod v10.1.1.2c
Author(s) Erik Hoppe
Homepage Count Ancestors n Descendants (this page)
Mod Support My Mod Support
Contact Developer My Mod Support
Latest Mod 10.1.1.2c
Min TNG V 10.1.1
Max TNG V 10.1.2
Files modified
Related Mods
Notes
Author of TNG Colouring Book
Mods by me: At my user page.


Preface

I want to upgrade my site (TNG v9.1.1) sometime after the summer and have set up a local test-v10.1.1 site. But as I want to keep all the functionality from all my hard-coded modifications, I have to write mods for v10.1.1.

Some of my mods may very well do the same things, or nearly, as other mods already posted.
I'm not posting these mods to compete or compare or claim anything but as I'm writing them and they are tested, why not post them here?

My mods work exactly as I want them to and I know that they don't have conflicts with eachother, and that's why I prefer them before other mods, even if they do exactly the same thing.

If you like a mod that's great, if not; that's fine too.
As I said: I'm not competing - just writing what I need and posting for anyone to use, modify or discard.

As i only have a local TNG v10 site, I can't show a live example of some of the mods. If you install one: Please add the URL to the Sites using this mod list at that page. Thank you.
(I link to my v9.1.1 site where the hard-coded versions can be seen)

/Erik


Purpose of the mod

To show the number of Ancestors and Descendants (up to 100 of each) below the person's name in getperson.php.

The max 100 is a limit I put there after measuring the time it took on the live server.
If I remember correctly, it took like 0.2 seconds to count to around 1,000 people.
You can change the limit to whatever you want, using the ModManager's built-in Edit Options.


What the mod doesn't do properly

In the cases where TNG would generate two identical branches, f.ex. cousins who get children, the mod counts both branches.


Developer

This mod was developed by Erik Hoppe


Requirements

TNG version: 10.1.1
  • A working TNG installation.
  • A backup of all affected files (see the list below)
  • An installed current version of the Mod Manager (is already included in TNG v10.1.1)


Installation

  1. Click on the download link, shown in the summary in the upper right corner of the page.
  2. Un-zip the file.
  3. Move/copy/FTP the un-zipped .cfg file to the mods folder of your TNG system.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.
  5. After installation you can edit the counter limit that defaults to 100.


In the event of a problem


Custom Text Additions

Note: The config file includes the English language custom text. If the German and Swedish texts are present in your system translations will be added.
For other languages you can modify the config file to add the custom text or manually add to whatever language you like.

English custom text For Reference Only!

$text['xerxxGPstarttext'] = "   Has ";
$text['xerxxGPstarttextNone'] = "";
$text['xerxxGPstarttextSing'] = "";
$text['xerxxGPstarttextPlur'] = "";
$text['xerxxGPdescs'] = " descendants";
$text['xerxxGPdesc'] = " descendant";
$text['xerxxGPancs'] = " ancestors";
$text['xerxxGPanc'] = " ancestor";
$text['xerxxGPno'] = "no";
$text['xerxxGPone'] = "one";
$text['xerxxGPand'] = " and ";
$text['xerxxGPbut'] = " but ";
$text['xerxxGPmore'] = "more than ";
$text['xerxxGPfinishtext'] = " in our family tree.";

(The empty ones close to the top are used for German word and MUST be present in ALL languages)


Uninstalling the mod

If you want to completely Remove (uninstall) this mod and all its tables, you should

  1. click the Uninstall button to uninstall the mod and then
  2. click the Delete button to delete the config file from the mods folder.


Revision History

Version Date Description
V10.1.1.2c 15 June 2015 Reported to not install (thanks Rick Hooley). Solved.
V10.1.1.2b 10 June 2015 Clumsy solution for the below made it Crash in some situations.
V10.1.1.2 9 June 2015 Could not be installed after Mobile Media mod. Now can.
V10.1.1.1 29 May 2015 Added the MM Edit Option to set the counter limit
V10.1.1.0b 19 May 2015 Changes in the German text only (Thanks Hendrik M.)
V10.1.1.0 17 May 2015 Introduction.


Visualization of this mod (v10.1.1.0)

Some examples of texts:
CalcAncDesc.jpg
CalcAncDesc3.png
The hard-coded version at my 9.1.1 site (link to this page below):
CalcAncDesc2.png


Sites using this mod

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

URL User Note Mod-Version TNG-Version User-language
Andersson, Hoppe, Sahlin, Thorell Erik Hoppe Mod author. Please read Preface Pre-mod 9.1.1 Swedish, German, English
Wortelboer Genealogy Bernard Wortelboer Public site 10.1.1.1 10.1.1 NL, EN
Brady Family Tree in Western Australia Darryl Brady Public site 10.1.1.1 10.1.1 EN, DE
MOTYER Family Genealogy John Mark Motyer Public site see here see here EN, DE, RU
Mitchell Families Online Roger Mitchell Another great idea from Erik 10.1.1.2c 10.1.1 EN, DE, ES, NL, FR
Hooley Family Links Rick Hooley Public Site 10.1.1.2c 10.1.1 EN

TNG Modules Impacted

The following TNG Modules are modified, and should be backed up prior to installing this mod:

  • genlib.php
  • languages/English/cust_text.php
  • languages/English-UTF8/cust_text.php
  • languages/German/cust_text.php - if present
  • languages/German-UTF8/cust_text.php - if present
  • languages/Swedish/cust_text.php - if present
  • languages/Swedish-UTF8/cust_text.php - if present