Difference between revisions of "Admin Branches"

From TNG_Wiki
Jump to navigation Jump to search
(46 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{construction
 
|notes=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)
 
}}
 
 
{{TNGmod
 
{{TNGmod
 
| mod_name        =  Admin Branches
 
| mod_name        =  Admin Branches
| mod_summary    = Modifies the Admin>>Branches search page to display counts of People and Families <em>in the branch index</em>, as well as count of People and Families records that have the branch.
+
| mod_summary    = Modifies the Admin>>Branches search page to display counts of People and Families <em>in the branch index</em>,
 +
as well as count of People and Families records that have the branch.
 
| mod_validation  =  
 
| mod_validation  =  
| download_link  =  [[Media:admin_branches_v11.0.0.1a.zip|admin_branches_v11.0.0.1a.zip]] {{Tv110}}  
+
| mod_last_update = 26 Nov 2019
 
+
| download_link  =  [[Media:admin_branches_v12.0.0.4.zip|v12.0.0.4.zip]]{{Tv120}}
| download_stats  =
+
| download_stats  = -
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
| mod_url        = [http://www.robinrichmond.com/family/ Robin Richmond's Genealogy Database]
+
| mod_url        = ''this page''
 
| mod_contact    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_contact    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_support    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
 
| mod_support    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
| mod_version    = v11.0.0.1a
+
| mod_version    = 12.0.0.4
 
| min_TNG_ver    = 11.0
 
| min_TNG_ver    = 11.0
| max_TNG_ver    = at least 11.1.1
+
| max_TNG_ver    = 12.2
|   TNG_file_list  = admin_branches.php, admin_editbranch.php, ajx_labels.php, cust_text.php English;  
+
| TNG_file_list  = admin_branches.php, admin_editbranch.php, ajx_labels.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.php;
<br>Installed files: ajx_branchcounts.php, branchcountslib.php
+
<br>Installs shared files: rrshared_innermodmenu2.php, rrshared_modsettingsblocks2.php, img/rrshared_wikilogo.gif
 
+
| related_mods  = [[Branch Timestamps]] depends on this mod.
| related_mods  = [[Branch Timestamps]] depends on Admin Branches. [[Show Mod Names]] is optional.
+
| notes         =   
| notes   =   
 
 
}}
 
}}
 
+
== 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.
 
{| style="margin-right:0.5 em;" align="right"  
 
{| style="margin-right:0.5 em;" align="right"  
 
| __TOC__
 
| __TOC__
 
 
|}
 
|}
 +
* The Admin>>Branches>>Search page now:
 +
*# Has two new columns for the four branch rule parameters (with two values in each column):
 +
*# Flags the People and Families columns when the count of Branch Labels in People and Families records does not match the count of records in the BranchLinks table.
 +
*# Uses a Mod 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 it can take too long to count the branch labels in very large TNG databases.
 +
*# Has a "Results Per Page" field that uses the TNG system parameter "maxsearchresults" as its default.
 +
*# Adds "Field Buttons" to the search string field and the Results Per Page field.
 +
* In the Branch Edit form:
 +
*# All action buttons are now directly on the screen, in fieldsets, rather than in pop-ups. (I found the cascading pop-up forms confusing.)
 +
*# 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 don't always have to be displayed.
  
== Purpose of the Mod ==
+
== Mod Options ==
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.
+
There is just one option, which allows the branch counts in admin_branches.php to be omitted on sites with so many records that the branch counts take too long.  That is, the option determines whether the program with display
 
+
* The number of records in each branch, or
* The Admin>>Branches>>Search results now:
+
* A flag that says that there ''are'' records in the branch.
*# 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
 
*# 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)
 
*# 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:
 
*# All action buttons are now directly on the screen, in fieldsets, rather than in pop-ups(I found the cascading pop-up forms confusing.)
 
*# 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.
 
 
 
== Parameters ==
 
$countBranchLabels in admin_branches.php<br>
 
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 ==
+
The mod option is a custom TNG setting, defined and edited in the form at Admin>>Setup>>General&nbsp;Settings, in a new subform named '''Robin's Mod's'''. This subform takes advantage of a scheme that I call '''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Blocks]'''.
# 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
 
# 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.count recordsaThe AJAX program ajx_branchcounts.php is invoked by admin_editbranch.php
 
  
== Compatibility with Other Mods ==
+
== Compatibility ==
This mod is compatible with [[Add Name to PersonID]], [[Tree ID Mod]], [[TreeID-One Column]], [[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]]
+
This mod '''is''' compatible with [[Add Name to PersonID]], [[Tree ID Mod]], [[TreeID-One Column]], and [[Branch Timestamps]].  The current version of this mod '''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 is installed by the [[Branch Timestamps]] mod.
  
 
== Related Mods ==
 
== Related Mods ==
# [[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
+
# [[Branch Timestamps]] is a companion mod to Admin Branches and depends on Admin Branches. [[Branch Timestamps]]
#* in the Starting Individual column in the Admin>>Branches search results table, where the PersonID is already a hyperlink, and
+
#* Adds fields to the Branches table that record
#* 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.
+
#** The last action (Add Labels, Clear Labels, Delete, or Edit) that was taken on the branch
# [[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.
+
#** When that action occurred (hence the name "[[Branch Timestamps]]", and
# The optional [[Show Mod Names]] mod will use data saved by Admin Branches to to display information about the mods that affect admin_branches.php and admin_branchedit.php '''''if''''' [[Show Mod Names]] is installed.
+
#** The number of People records and Families records affected by that operation.
 +
#* Adds columns to the Admin >> Branches >> Search results page,
 +
#* Creates a queueing mechanism that allows a TNG site administrator to "queue up" a set of Add Labels operations so that the administrator doesn't have to wait for each branch to finish before starting the next one, and
 +
#* Installs a "Timestamp Test App" that lets a TNG site administrator review the results of recent actions, run actions, and queue actions.
 +
# The optional mod [[Add Name To PersonID]] modifies several programs, including the Branch Search program and the Branch Editor to display the ''name'' of a branch "Starting Individual" as well as the personID.
 +
# The optional [[Field Buttons]] mod implements small "Field Button" that are attached to the search string field and the new Result Per Page field in the Branches Search page. The field buttons serve as shortcuts to editing tasks such as "clear this field", and "restore the value that this field had when the page was loaded".
 +
#* Note that the [[Field Buttons]] mod ''is optional''. If it is not installed, the field buttons will simply not appear.
 +
# This mod saves information that ''can be used'' by the optional mod [[Show Mod Names]]. As with [[Field Buttons]], [[Show Mod Names]] is completely optional.  If it is not installed, its "Show Mods" button at the bottom of admin pages will simply not appear.
  
==Requirements==
+
== Installation ==
* A working TNG installation.
+
=== Files Installed ===
* An installed current version of the [[Mod Manager]].
+
This mod has two mod subfolders:
* You should backup files listed in the panel on the right.
+
# '''admin_branches_v12.0.0.4''' - The subfolder that you expect to exist for any mod that installs files. It contains
 +
#* '''rradminbranches_ajx.php''' (ajx_branchcounts.php in the TNGv11 version of the mod)<br>This AJAX program is called by the Branch Editor (admin_editbranch.php) after an operation that changes the branch contents (i.e. the records the in the branch) so that the Branch Editor can display the branch counts without having to reload the page. It is also used by the [[Branch Timestamps]] mod, which is a companion mod to Admin Branches, and depends on Admin Branches.
 +
#* '''rradminbranches_lib.php''' (branchcountslib.php in the TNGv11 version of the mod)<br>The functions in this PHP function library 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,
 +
#** The Branch edit program (admin_editbranch.php) to display counts for the current branch, and
 +
#** rradminbranches_ajx.php to retrieve updated counts after admin_editbranch.php has modified a branch.
 +
# The shared folder '''RR-shared_mod_includes_v12.0.0.3''', which contains files that support [https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner&nbsp;Mod&nbsp;Menus] and [https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Blocks].
 +
#* '''rrshared_innermodmenu2.php'''
 +
#* '''rrshared_modsettingsblocks2.php'''
 +
#* '''img/rrshared_wikilogo.gif'''
  
==Installation==
+
The shared folder is packaged with several mods, each of which may install some or all of its files. Once a file from this folder has been installed (by any mod), that file will not be overwritten or removed by the subsequent installation or un-installation of any mod (including this one), nor will its presence generate any Mod Manager errors.  
# Remove and delete previous version of this mod.
 
# Backup the files updated by this mod.  They are listed in the panel at the upper right.
 
# Download the .zip file, and extract its .cfg file to the mods folder.
 
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config Files]].
 
  
== In the event of a problem ==
+
If you unzip mod distribution files directly into your mods folder, then the presence of this second subfolder and the installation of its files should be invisible to you.  But if you generally ''copy'' mod subfolders to your mods folder, you need to make sure to copy the folder '''RR-shared_mod_includes_v12.0.0.2''' (well, unless you are confident that it is already in your mods folder because it was part of another mod).
# Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|Mod Manager Remove]] capability
+
{{RobinInstallationBoilerplate}}
# Contact me through [http://www.robinrichmond.com/family/mod_support.php My Mod Support form].
 
  
 
== Visualizations ==
 
== Visualizations ==
 +
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 +
|-
 +
| '''Admin>>Branches>>Search <span style="color: red"> Before Installation</span>'''<br>
 +
[[Image:admin_branches-before1.jpg]]
 +
|-
 +
| '''Admin>>Branches>>Search <span style="color: red">After Installation</span>'''<br>
 +
[[Image:admin_branches-after1.jpg]]<br/>
 +
New features installed by this mod (outlined in green):
 +
# The new [https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu], show closed, with just is Inner Menu Label "Mod Information". See below a visualization of the menu contents.
 +
# The 'Results per page' field that lets you change the number of search results per page without changing the TNG system parameter.
 +
# Two new columns for the four fields in the branch rule that are identified by the labels in the column heading.
 +
# As in the native code, the People and Families columns ''normally'' show the number of records in the branch (that is, the number of records in which the '''branches''' field contains the branchID.)  However, if the number of '''Branch Index''' records does not match the number of people and family records in the branch,
 +
#* The number of records in the Branch Index is shown and labeled with an X, and
 +
#* The record counts are highlighted in red text.
 +
# Branches (such as the branch named 'hk' in this screen clip) that are formed by merging other branches (in this case, the two branches with the suffix 'hk') are not expected to have the same number of branch labels and branch index entries. Thus, in third row, the discrepancy between the branch label counts and the branch index record counts is not an error, and really, should not be highlighted.
 +
'''Significantly''', a mod option can disable the counting of People and Families records, in which case the People and Families columns will just contain flag that indicates whether ''any'' People or Families records are in the branch. This feature is important for very large databases where it may take a long time to count the branch records.
 +
 +
Features in the visualization above that are installed or enabled by other mods (outlined in brown):
 +
<ol start=6>
 +
<li>The Search String and 'Results Per Page' fields have "Field Buttons", which appear only if the [[Field Buttons]] mod is installed. In brief, in this screen clip, there are two visible Field Buttons:
 +
  <ul><li>The search string's 'X' button clears the search string, and</li>
 +
  <li>The 'A' button for the 'Results Per Page' field supplies a value that displays all of the branches in one page, and</li></ul>
 +
<li>The names in the 'Starting Individual' column are added by the [[Add Name to PersonID]] mod, which affects several programs. As shown in the 'before' screen clip above, in the native code, this column contains only the personID.
 +
</li>
 +
</ol>
 +
|}
  
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
+
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
| style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Search <span style="color: red">BEFORE:</span>'''<br/>
+
|'''Admin>>Branches>>Edit <span style="color: red">Before Installation</span>'''
[[Image:Branches Before1.png]]
+
<div>Note that the Branch Edit screen also performs operations on branches. This is the only way that the native TNG code can use the branch rules to create or remove branch labels.</div>
 +
[[Image:admin_branches-before2-editbranch.jpg]]
 
|-  
 
|-  
| style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Search <span style="color: red">AFTER:</span>'''<br/>
+
|'''Admin>>Branches>>Edit <span style="color: red">After Installation</span>'''<br>
[[Image:Branches After1.png]]
+
[[Image:admin_branches-after2-editbranch.jpg]]
 +
|}
 +
 
 +
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
| style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">BEFORE:</span>'''<br/>
+
|'''Admin>>Branches>>Search <span style="color: red">After Installation</span> - The Inner Mod Menu'''
[[Image:Branches Edit Existing Branch - Before.png|750px]]
+
<div>[[Image:admin_branches-after-innermodmenu.jpg]]</div>
 +
In admin_branches.php the Inner Mod Menu links to:
 +
* The [[Admin Branches]] Wiki article.
 +
* The [[#Mod_Options|Mod Options]] section of the Wiki article, and
 +
* The Admin>>Setup screen where the mod's option can be edited.
 
|-  
 
|-  
| style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">AFTER:</span>'''<br/>
+
|'''The Admin Branches Option - in a "Mod Settings Block"
[[Image:Branches Edit Existing Branch - After.png|750px]]
+
The Mod Settings Block for Admin Branches (like most other Mod Settings Blocks) is at '''Admin>>Setup>>General&nbsp;Settings''' in a new subform named '''Robin's Mods'''.
 +
When Mod Settings Block are invoked from an Inner Mod Menu, the Admin>>Settings program automatically opens the subform and displays only the target Mod Settings Block, like this:
 +
<div>[[Image:admin_branches-after-modsettingsblock.jpg]]</div>
 
|}
 
|}
  
== Mod Change History ==
+
== Revision History ==
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
! Mod Version
+
! Mod Version !! TNG Versions !! Date !! Note
! TNG Versions
+
|- style="vertical-align:top;"  <!-- ############################################################## -->
! Date
+
| [[Media:admin_branches_v12.0.0.4.zip|12.0.0.4.zip]]
! Note
+
| 12.0 - 12.2+
|-  
+
| 26Nov2019
| 11.0.0.1
+
| No Functional Changes
 +
*The mod's option is now a custom TNG system setting, in a '''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Block]''' at '''Admin>>Setup>>General&nbsp;Settings>>Robin's&nbsp;Mods'''.
 +
*The Inner Menus of admin_branches.php and admin_editbranch.php each contain an '''[[User:Robinrichm#The_Inner_Mod_Menu|Inner Mod Menu]]''', which, among other things, provides handy access to the mod settings.
 +
 
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| [[Media:admin_branches_v12.0.0.3.zip|12.0.0.3.zip]] &amp; [[Media:admin_branches_v11.0.0.3.zip|11.0.0.3.zip]]
 +
| 11.0 - 12.0+
 +
| 24May2018
 +
| Brought to TNGv12 specs; Change the filenames of the installed files to be more distinctive.
 +
 
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| [[Media:admin_branches_v11.0.0.2a.zip|11.0.0.2a.zip]]
 +
| 11.0 - 11.1.2
 +
| 28Dec2017
 +
| No visible changes, except when printing
 +
* Added a "don't print on printer" class to the tab menu and innermenu, and the Action and Select columns of the results table.
 +
* Also no longer uses an external spreadsheet. Instead, the "don't print on printer" class is defined in an embedded stylesheet. It can be overriden in css/genstyle.css.
 +
 
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| 11.0.0.2
 
| 11.0+
 
| 11.0+
| 2 Apr 2017
+
| 12Dec2017
| New mod.
+
| Changes:
|-  
+
# Added the Results Per Page field
 +
# Added field buttons
 +
# Removed the second line of the two-line cust_text.php target location search string.
 +
 
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
| 11.0.0.1a
 
| 11.0.0.1a
 
| 11.0+
 
| 11.0+
| 31 May 2017
+
| 2Jun2017
 
| The new $summaryonly Query String parameter in ajx_labels.php is now implemented through this mod rather than through [[Branch Timestamps]]. As a result
 
| The new $summaryonly Query String parameter in ajx_labels.php is now implemented through this mod rather than through [[Branch Timestamps]]. As a result
 
# [[Branch Timestamps]] doesn't have to be installed for the new "Show Names" checkbox to be available in the modified admin_editbranch.php, but
 
# [[Branch Timestamps]] doesn't have to be installed for the new "Show Names" checkbox to be available in the modified admin_editbranch.php, but
 
# [[Branch Timestamps]] now requires that Admin Branches be installed.
 
# [[Branch Timestamps]] now requires that Admin Branches be installed.
 +
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| 11.0.0.1
 +
| 11.0+
 +
| 2Apr2017
 +
| New mod in Beta status.
 
|}
 
|}
  
Line 135: Line 195:
 
| [[User:Robinrichm|Robin Richmond]]
 
| [[User:Robinrichm|Robin Richmond]]
 
| Mod developer
 
| Mod developer
| v11.0.0.1a
+
| v12.0.0.4
| 11.1
+
| 12.0
 +
| English
 +
|-
 +
| [http://racine-ad.fr/TNG/index.php Racine d'Alsace]
 +
| [[User:Louis42|J-Louis Valory]]
 +
| Public/Private - T17 customized
 +
| 12.0.0.3
 +
| 12.0.2
 +
| FR
 +
|-
 +
| [http://colegenealogy.dynu.net/ Cole / Tanner Family Tree]
 +
| [[User:dlcole|David Cole]]
 +
| Public/Private
 +
| [[User:Dlcole|see here]]
 +
| [[User:Dlcole|see here]]
 
| English
 
| English
 
|}
 
|}
  
 
[[Category:Mods for TNG v11]]
 
[[Category:Mods for TNG v11]]
 +
[[Category:Mods for TNG v12]]
 
[[Category:admin_branches.php mods]]
 
[[Category:admin_branches.php mods]]
 
[[Category:admin_editbranch.php mods]]
 
[[Category:admin_editbranch.php mods]]
 
[[Category:ajx_labels.php mods]]
 
[[Category:ajx_labels.php mods]]
[[Category: cust_text.php English mods]]
+
[[Category:cust_text.php English mods]]
 +
[[Category:admin_genconfig.php mods]]
 +
[[Category:admin_updateconfig.php mods]]

Revision as of 18:05, 2 December 2019

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.
Validation
Mod Updated 26 Nov 2019
Download link v12.0.0.4.zip
TNG 12.0
Download stats -
Author(s) Robin Richmond
Homepage this page
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod 12.0.0.4
Min TNG V 11.0
Max TNG V 12.2
Files modified
admin_branches.php, admin_editbranch.php, ajx_labels.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.php;
Installs shared files: rrshared_innermodmenu2.php, rrshared_modsettingsblocks2.php, img/rrshared_wikilogo.gif
Related Mods
Branch Timestamps depends on this mod.
Notes


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 page now:
    1. Has two new columns for the four branch rule parameters (with two values in each column):
    2. Flags the People and Families columns when the count of Branch Labels in People and Families records does not match the count of records in the BranchLinks table.
    3. Uses a Mod 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 it can take too long to count the branch labels in very large TNG databases.
    4. Has a "Results Per Page" field that uses the TNG system parameter "maxsearchresults" as its default.
    5. Adds "Field Buttons" to the search string field and the Results Per Page field.
  • In the Branch Edit form:
    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 don't always have to be displayed.

Mod Options

There is just one option, which allows the branch counts in admin_branches.php to be omitted on sites with so many records that the branch counts take too long. That is, the option determines whether the program with display

  • The number of records in each branch, or
  • A flag that says that there are records in the branch.

The mod option is a custom TNG setting, defined and edited in the form at Admin>>Setup>>General Settings, in a new subform named Robin's Mod's. This subform takes advantage of a scheme that I call Mod Settings Blocks.

Compatibility

This mod is compatible with Add Name to PersonID, Tree ID Mod, TreeID-One Column, and Branch Timestamps. The current version of this mod 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 is installed by the Branch Timestamps mod.

Related Mods

  1. Branch Timestamps is a companion mod to Admin Branches and depends on Admin Branches. Branch Timestamps
    • Adds fields to the Branches table that record
      • The last action (Add Labels, Clear Labels, Delete, or Edit) that was taken on the branch
      • When that action occurred (hence the name "Branch Timestamps", and
      • The number of People records and Families records affected by that operation.
    • Adds columns to the Admin >> Branches >> Search results page,
    • Creates a queueing mechanism that allows a TNG site administrator to "queue up" a set of Add Labels operations so that the administrator doesn't have to wait for each branch to finish before starting the next one, and
    • Installs a "Timestamp Test App" that lets a TNG site administrator review the results of recent actions, run actions, and queue actions.
  2. The optional mod Add Name To PersonID modifies several programs, including the Branch Search program and the Branch Editor to display the name of a branch "Starting Individual" as well as the personID.
  3. The optional Field Buttons mod implements small "Field Button" that are attached to the search string field and the new Result Per Page field in the Branches Search page. The field buttons serve as shortcuts to editing tasks such as "clear this field", and "restore the value that this field had when the page was loaded".
    • Note that the Field Buttons mod is optional. If it is not installed, the field buttons will simply not appear.
  4. This mod saves information that can be used by the optional mod Show Mod Names. As with Field Buttons, Show Mod Names is completely optional. If it is not installed, its "Show Mods" button at the bottom of admin pages will simply not appear.

Installation

Files Installed

This mod has two mod subfolders:

  1. admin_branches_v12.0.0.4 - The subfolder that you expect to exist for any mod that installs files. It contains
    • rradminbranches_ajx.php (ajx_branchcounts.php in the TNGv11 version of the mod)
      This AJAX program is called by the Branch Editor (admin_editbranch.php) after an operation that changes the branch contents (i.e. the records the in the branch) so that the Branch Editor can display the branch counts without having to reload the page. It is also used by the Branch Timestamps mod, which is a companion mod to Admin Branches, and depends on Admin Branches.
    • rradminbranches_lib.php (branchcountslib.php in the TNGv11 version of the mod)
      The functions in this PHP function library 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,
      • The Branch edit program (admin_editbranch.php) to display counts for the current branch, and
      • rradminbranches_ajx.php to retrieve updated counts after admin_editbranch.php has modified a branch.
  2. The shared folder RR-shared_mod_includes_v12.0.0.3, which contains files that support Inner Mod Menus and Mod Settings Blocks.
    • rrshared_innermodmenu2.php
    • rrshared_modsettingsblocks2.php
    • img/rrshared_wikilogo.gif

The shared folder is packaged with several mods, each of which may install some or all of its files. Once a file from this folder has been installed (by any mod), that file will not be overwritten or removed by the subsequent installation or un-installation of any mod (including this one), nor will its presence generate any Mod Manager errors.

If you unzip mod distribution files directly into your mods folder, then the presence of this second subfolder and the installation of its files should be invisible to you. But if you generally copy mod subfolders to your mods folder, you need to make sure to copy the folder RR-shared_mod_includes_v12.0.0.2 (well, unless you are confident that it is already in your mods folder because it was part of another mod).

[Show Installation Details]

Requirements

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

Procedure

  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.

Problems?

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

Visualizations

Admin>>Branches>>Search Before Installation

Admin branches-before1.jpg

Admin>>Branches>>Search After Installation

Admin branches-after1.jpg
New features installed by this mod (outlined in green):

  1. The new Inner Mod Menu, show closed, with just is Inner Menu Label "Mod Information". See below a visualization of the menu contents.
  2. The 'Results per page' field that lets you change the number of search results per page without changing the TNG system parameter.
  3. Two new columns for the four fields in the branch rule that are identified by the labels in the column heading.
  4. As in the native code, the People and Families columns normally show the number of records in the branch (that is, the number of records in which the branches field contains the branchID.) However, if the number of Branch Index records does not match the number of people and family records in the branch,
    • The number of records in the Branch Index is shown and labeled with an X, and
    • The record counts are highlighted in red text.
  5. Branches (such as the branch named 'hk' in this screen clip) that are formed by merging other branches (in this case, the two branches with the suffix 'hk') are not expected to have the same number of branch labels and branch index entries. Thus, in third row, the discrepancy between the branch label counts and the branch index record counts is not an error, and really, should not be highlighted.

Significantly, a mod option can disable the counting of People and Families records, in which case the People and Families columns will just contain flag that indicates whether any People or Families records are in the branch. This feature is important for very large databases where it may take a long time to count the branch records.

Features in the visualization above that are installed or enabled by other mods (outlined in brown):

  1. The Search String and 'Results Per Page' fields have "Field Buttons", which appear only if the Field Buttons mod is installed. In brief, in this screen clip, there are two visible Field Buttons:
    • The search string's 'X' button clears the search string, and
    • The 'A' button for the 'Results Per Page' field supplies a value that displays all of the branches in one page, and
  2. The names in the 'Starting Individual' column are added by the Add Name to PersonID mod, which affects several programs. As shown in the 'before' screen clip above, in the native code, this column contains only the personID.
Admin>>Branches>>Edit Before Installation
Note that the Branch Edit screen also performs operations on branches. This is the only way that the native TNG code can use the branch rules to create or remove branch labels.

Admin branches-before2-editbranch.jpg

Admin>>Branches>>Edit After Installation

Admin branches-after2-editbranch.jpg

Admin>>Branches>>Search After Installation - The Inner Mod Menu
Admin branches-after-innermodmenu.jpg

In admin_branches.php the Inner Mod Menu links to:

  • The Admin Branches Wiki article.
  • The Mod Options section of the Wiki article, and
  • The Admin>>Setup screen where the mod's option can be edited.
The Admin Branches Option - in a "Mod Settings Block"

The Mod Settings Block for Admin Branches (like most other Mod Settings Blocks) is at Admin>>Setup>>General Settings in a new subform named Robin's Mods. When Mod Settings Block are invoked from an Inner Mod Menu, the Admin>>Settings program automatically opens the subform and displays only the target Mod Settings Block, like this:

Admin branches-after-modsettingsblock.jpg

Revision History

Mod Version TNG Versions Date Note
12.0.0.4.zip 12.0 - 12.2+ 26Nov2019 No Functional Changes
  • The mod's option is now a custom TNG system setting, in a Mod Settings Block at Admin>>Setup>>General Settings>>Robin's Mods.
  • The Inner Menus of admin_branches.php and admin_editbranch.php each contain an Inner Mod Menu, which, among other things, provides handy access to the mod settings.
12.0.0.3.zip & 11.0.0.3.zip 11.0 - 12.0+ 24May2018 Brought to TNGv12 specs; Change the filenames of the installed files to be more distinctive.
11.0.0.2a.zip 11.0 - 11.1.2 28Dec2017 No visible changes, except when printing
  • Added a "don't print on printer" class to the tab menu and innermenu, and the Action and Select columns of the results table.
  • Also no longer uses an external spreadsheet. Instead, the "don't print on printer" class is defined in an embedded stylesheet. It can be overriden in css/genstyle.css.
11.0.0.2 11.0+ 12Dec2017 Changes:
  1. Added the Results Per Page field
  2. Added field buttons
  3. Removed the second line of the two-line cust_text.php target location search string.
11.0.0.1a 11.0+ 2Jun2017 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.
11.0.0.1 11.0+ 2Apr2017 New mod in Beta status.

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 v12.0.0.4 12.0 English
Racine d'Alsace J-Louis Valory Public/Private - T17 customized 12.0.0.3 12.0.2 FR
Cole / Tanner Family Tree David Cole Public/Private see here see here English