Difference between revisions of "Admin Branches"

From TNG_Wiki
Jump to: navigation, search
(Sites using this mod)
(Sites using this mod)
Line 144: Line 144:
| J-Louis Valory
| J-Louis Valory
| Public/Private - template 1
| Public/Private - template 1
| 11.1.1
| 11.1.1
| French  
| French  

Revision as of 11:02, 25 June 2017

Construction This mod is in a beta testing state. I've been using it for a while, but it needs to be tested on other TNG sites,

In truth, I have close to 40 new and updated mods in beta status, and I'd appreciate whatever help that anyone can offer. So it would be great if you could download the mod, test it, and let me know how it works for you.

Thanks in advance. Robin Richmond, 31 May 2017 (CDT)


Admin Branches
Summary Modifies the Admin>>Branches search page to display counts of People and Families in the branch index, as well as count of People and Families records that have the branch.
Mod Updated {{{mod_last_update}}}
Download link admin_branches_v11.0.0.1a.zip
TNG 11.0
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 v11.0.0.1a
Min TNG V 11.0
Max TNG V at least 11.1.1
Files modified
admin_branches.php, admin_editbranch.php, ajx_labels.php, cust_text.php English;
Installed files: ajx_branchcounts.php, branchcountslib.php
Related Mods
Branch Timestamps depends on Admin Branches. Show Mod Names is optional.

Purpose of the Mod

To add information to the Admin >> Branches >> Search results table, and simplify (from the author's perspective) the Add/Remove/Delete functionality in the Edit screen.

  • The Admin>>Branches>>Search results now:
    1. Has two columns for the branch rule parameters (with 2 values in each column):
      • The number of generations of ancestors above the starting person (agen),
      • The number of generations of descendants below the starting person (dgen),
      • The number of generations of descendants below each ancestor (dagen), and
      • The spouse flag
    2. Flags the People and Families columns when the index count does not match the count of Branch Labels in People and Family records. Note that the index count is expected not to match for what I call "dummy branches" whose BranchID's are incorporated into other branches. (See the visualizations)
    3. Uses a Mod Parameter and a Search option to determine whether to show counts in the People and Families columns, or just to indicate whether there are any People or Families in the branch. This feature was added because very large branches can take too long to count the branch labels.
  • In the Branch Edit screen:
    1. All action buttons are now directly on the screen, in fieldsets, rather than in pop-ups. (I found the cascading pop-up forms confusing.)
    2. There is now a "Show names" checkbox so that when branch labels are added or cleared, the names associated with each Person and Family record in the branch are not always displayed. When the names are displayed, they are listed in a pop-up as they are in the pristine code. When the names are not displayed, the count of affected records is displayed just below the action button that the user clicked.


$countBranchLabels in admin_branches.php
This parameter determines whether the Admin>>Branches>>Search results will display branch label counts for each branch, or just indicate whether each branch has labels. Sites with so many records that the branch counts take too long will want to turn off the automatic branch counts.

Files Installed

  1. ajx_branchcounts.php - The Branch Edit program, admin_editbranch.php, unlike most TNG edit programs, doesn't just edit the fields in a Branch record, but it also contains action button that Add branch labels (i.e. add People and Families to the branch), Clear labels, Delete records in the branch, and Display the branch members). After the user has modified the branch by adding labels, clearing labels, or deleting records in the branch, admin_editbranch.php invokes ajx_branchcounts.php to update the label counts (i.e. number of People and Families in the branch) that are displayed on the edit page
  2. branchcountslib.php - This PHP function library contains PHP functions that count records (People and Families) in a branch. It is used by the Admin >> Branches >> Search program (admin_branches.php) to display the search results table. It is also used by the Branch edit program (admin_editbranch.php) to display counts for the current branch, and by ajx_branchcounts.php to retrieve updated counts after admin_editbranch.php has modified a branch.

Compatibility with Other Mods

This mod is compatible with Add Name to PersonID, Tree ID Mod, TreeID-One Column, and Branch Timestamps. Is is not compatible with Branches Sort Mod. But the goal of Branches Sort Mod, to sort related branches together in the Admin Branches Search results table, is only achieved if the related branches use the common BranchID at the very beginning of their BranchIDs. A Branch Testing Application that can focus on all groups of related branches in installed by Branch Timestamps

Related Mods

  1. Add Name To PersonID also modifies both the Admin>>Branches search results and the Branches editor. Like Branch Timestamps, it is designed to work with Admin Branches. It adds the Person name to the PersonID
    • in the Starting Individual column in the Admin>>Branches search results table, where the PersonID is already a hyperlink, and
    • in the Find Person widget in the Branch Editor, where you select the Starting Individual for a branch. There, the PersonID is in a form field, and the name is a hyperlink.
  2. Branch Timestamps, which, like Admin Branches, adds columns to the Admin>>Branches results table, and adds options to the Branch Editor, is dependent on Admin Branches. The two mods can be installed independently, but Admin Branches installs code that implements the $summaryonly query string parameter in ajx_labels.php, and Branch Timestamps depends on that code.
  3. The optional Show Mod Names mod will use data saved by Admin Branches to display information about the mods that affect admin_branches.php and admin_branchedit.php if Show Mod Names is installed.


  • 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, and 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.

In the event of a problem

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


Admin>>Branches>>Search BEFORE:

Admin branches-before1.png

Admin>>Branches>>Search AFTER:

Admin branches-after1.png

Admin>>Branches>>Edit BEFORE:

Admin branches-before2-editbranch.png

Admin>>Branches>>Edit AFTER:

Admin branches-after2-editbranch.png

Admin>>Branches>>Edit AFTER:Showing the results of an Add Labels action

Admin branches-after3-addlabels.png

Mod Change History

Mod Version TNG Versions Date Note 11.0+ 2 Apr 2017 New mod in Beta status. 11.0+ 2 Jun2017 The new $summaryonly Query String parameter in ajx_labels.php is now implemented through this mod rather than through Branch Timestamps. As a result
  1. Branch Timestamps doesn't have to be installed for the new "Show Names" checkbox to be available in the modified admin_editbranch.php, but
  2. Branch Timestamps now requires that Admin Branches be installed.

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 v11.0.0.1a 11.1.1 English
racine d'Alsace J-Louis Valory Public/Private - template 1 11.1.1 French