Difference between revisions of "Admin Branches"

From TNG_Wiki
Jump to navigation Jump to search
(41 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{construction
 
{{construction
|notes=This mod is in a beta testing state. I've been using it for a while, but
+
|notes=Under Construction<br>(The text of this article describes Version 18, but the visualizations are from Version 15.)<br>Robin Richmond 30 Sep 2019}}
* It needs to be tested on other TNG sites,
 
* I haven't completed the description below, and
 
* I haven't created the visualizations this article needs
 
  
In truth, I have over 40 new and updated mods in this state, and I'd appreciate whatever help that anyone can offer.
+
{{V12_cust_text}}
So it would be great if you could download the mod, test it, and let me know how it works for you.
 
And if you're up for it, screenshots from before the mod was installed and after (annotated or not) would be a great help.
 
You're welcome to insert in the article, or just email them to me.
 
My email username is '''mail'', and my email domain is robinrichmond.com.
 
 
 
Thanks in advance.
 
Robin Richmond 18:55, 2 April 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  =  <br />
+
| mod_last_update = 30 Sep 2019
{{Tv110}}[[Media:admin_branches_v11.0.0.3.zip|admin_branches_v11.0.0.3.zip]]  
+
| download_link  =  [[Media:admin_branches_v12.0.0.3a.zip|v12.0.0.3a.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        = [http://www.robinrichmond.com/family/ Robin Richmond's Genealogy Database]
 
| 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.3
+
| mod_version    = v12.0.0.8
 
| min_TNG_ver    = 11.0
 
| min_TNG_ver    = 11.0
| max_TNG_ver    = 11.1
+
| max_TNG_ver    = 12.2
|   TNG_file_list  = admin_branches.php, admin_editbranch.php, cust_text.php English, <br> installed files: admin_branches_v11.0.0.3/ajx_branchcounts.php, admin_branches_v11.0.0.3/branchcountslib.php
+
| TNG_file_list  = admin_branches.php, admin_editbranch.php, ajx_labels.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.php;
 
+
<br>Installs shared files: rrinnermodmenu1_include.php, rrmodoptions1.php, img/rrmodadmin_wikilogo.png
| related_mods  = [[Show Mod Names]]
+
| notes   =   
+
<br>Installs: rradminbranches_ajx.php, rradminbranches_lib.php
 +
| 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.
 
{| 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 2 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. Note that the counts are ''expected'' not to match for what I call "dummy branches" whose BranchID's are incorporated into other branches, but they are still flagged. (See the visualizations)
 +
*# Uses a Mod Parameter 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. (Field buttons are small buttons with one-letter labels that are attached to form fields, and that perform four common editing tasks: Clear a field, Restore the field's initial value, set a Default, or set an "All items" value. See the [[Field Buttons]] mod, which must installed for the field buttons to be visible.
 +
* 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 ==
Modifies the Admin>>Branches search results page to add
+
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, it determines whether the Admin>>Branches>>Search results will display branch label ''counts'' for each branch, or just indicate ''whether'' each branch has labels.
# The parameters for the branch rule:
+
* In version 2 of the mod, this option is a "mod parameter", defined by the Mod Manager <code>%parameter</code> tag, and edited within the Mod Manager.
#* The number of generations of ancestors above the starting person (agen),
+
* In version 3, this option is a custom TNG setting, defined and edited in the form at Admin>>Setup>>General&nbsp;Settings, in the new subform '''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Robin's Mods]'''
#* The number of generations of descendants below the starting person (dgen), and
 
#* The number of generations of descendants below each ancestor (dagen).
 
# Optionally (depending on a Mod Parameter):
 
#* The number of People and Family records that have the branch.
 
#* The number of People and Family records in the branch index. (This value should normally be the same as the number of records that are in the branch, but can be different, especially when branches are defined as subsets of other branches.)
 
  
== Parameters ==
+
== Files Installed ==
$countBranchLabels in admin_branches.php<br>
+
# '''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.
This parameter determines whether admin_branches will display branch label counts for each branch, or just indicate **whether** each branch has labels. Sites with so many People records that the branch counts take too long will want to turn off the automatic branch counts.
+
# '''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.
  
== Compatibility with other Mods ==
+
== Compatibility ==
There are no known incompatibilities, but ''please'' let me know if you encounter any.
+
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]], like Admin Branches, adds columns to the Admin>>Branches results table, and adds options to the Branch Editor.  Branch Timestamps and Admin Branches are designed to work togetherr.
+
#** When that action occurred (hence the name "[[Branch Timestamps]]", and
# [[Show Mod Names]] - The Admin Branches mod saves data that can be used by the [[Show Mod Names]] utility mod, but is ''not dependent on'' that mod.
+
#** 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 the functionality of the field buttons that are attached to the search string field and the Result Per Page field in the Branches Search page. If it is installed, no errors occurs; the field buttons will simply not appear on the screen.
 +
* This mod uses the '''[[Field Buttons]]''' mod to attach small 'field buttons' to several text fields, ''but it is not dependent on [[Field Buttons]]''. Field buttons are configurable (and generally one-character) buttons that are attached to HTML form fields, and that reduce the typing or mouse movements needed to perform several common editing tasks. This mod is not compatible with Field Buttons mod versions earlier than version 3.
  
==Requirements==
+
# The optional [[Show Mod Names]] mod ''can'' use data saved by Admin Branches to display information about mods that affect admin_branches.php and admin_branchedit.php.  As with [[Field Buttons]], if [[Show Mod Names]] is not installed, nothing bad happens; the "Show Mod Names" button will simply not be displayed at the bottom of either program.
* A working TNG installation.
 
* An installed current version of the [[Mod Manager]].
 
* You should backup files listed in the panel on the right.
 
  
==Installation==
+
== Installation ==
# Remove and delete previous version of this mod.
+
This mod uses the standard installation procedure, though it should be noted that this mod contains mod subfolders that are shared with other mods that implement "'''[[Inner Mod Menus]]'''" or whose options are organized as [https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod&nbsp;Settings&nbsp;Blocks] in Admin>>Setup forms. Because of these shared folders, as you unzip or copy the mod, you might get a warning noting that a file or folder already exists. You can just ignore that warning.<br>{{RobinInstallationBoilerplate}}
# 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 ==
+
== Visualizations ==
# Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|Mod Manager Remove]] capability
+
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
# Contact me through [http://www.robinrichmond.com/family/mod_support.php My Mod Support form].
+
|-
 +
| '''Admin>>Branches>>Search <span style="color: red">Before</span>'''<br>
 +
[[Image:admin_branches-before1.jpg]]
 +
|-
 +
| '''Admin>>Branches>>Search <span style="color: red">After</span>'''<br>
 +
[[Image:admin_branches-after1.jpg]]<br/>
 +
New features installed by this mod (highlighted in green):
 +
# The 'Results per page' field that lets you change the # of search results per page without changing the TNG system parameter.
 +
# Two new columns for the four fields in the branch rule.
 +
# In the People and Families columns, if the count of People and/or Families records with the branch does not match the number of entries in the Branch ''Index'', the counts are highlighed in red tex, and the count of index entries is displayed. Note that:
 +
#* The counts are ''expected'' not to match if the branch name includes other branch names, and
 +
#* 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.
  
== Visualizations ==
+
Features in the visualization above that are installed or enabled by other mods:
 +
<ol start=4>
 +
<li>Field buttons, which are enabled by the [[Field Buttons]] mod.  In this visualization,
 +
  <ol type='a'>
 +
  <li>The search string's 'X' button (for 'clear') is visible, because the search string has a value.</li>
 +
  <li>The search string's 'R' button (for 'Restore') is not visible. Thus, we know that the value "hk" in the search strings was loaded with the page. If you were to clear the field (with the 'X' button or not), or enter another value, then the 'R' button would appear.</li>
 +
    <li>The 'A' (for 'All') button for the Results Per Page field is visible because the Results Per Page field is not 'All', which means 'All Results'
 +
    <li>The 'R' button for the Results Per Page field is shaded out because the current value is the initial value. (That is, the value the field had when the page was loaded).</li>
 +
    <li>The 'D'(for 'Default' button is shaded out because, as it turns out, the current value is the same as the default value, which is the TNG system parameter, $maxsearchresults. If you were to change the 'Results Per Page' field to anything other than 30, the 'D' button would be visible.</li>
 +
    </ol>
 +
<li>The names in the Starting Individual column are added by the [[Add Name to PersonID]] mod, which affects several programs. The native TNG code displays only the Person ID in this column.</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</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</span>'''<br>
[[Image:Branches After1.png]]
+
[[Image:admin_branches-after2-editbranch.jpg]]
|-
+
|-  
| style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">BEFORE:</span>'''<br/>
+
|'''Admin>>Branches>>Edit <span style="color: red">After</span>''' Showing the results of an Add Labels action
[[Image:Branches Edit Existing Branch - Before.png|750px]]
+
<div>No pop-ups are needed</div>
 +
[[Image:admin_branches-after3-addlabels.jpg]]
 
|-  
 
|-  
| style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">AFTER:</span>'''<br/>
+
|'''Admin>>Branches>>Edit <span style="color: red">After</span>''' Showing the the popup list of branch members
[[Image:Branches Edit Existing Branch - After.png|750px]]
+
<div>Whether you are adding labels, removing labels, or just showing who is already in a branch, the list of branch members is displayed in a pop-up</div>
 +
[[Image:admin_branches-after4-shownames.jpg]]
 
|}
 
|}
  
== 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.3a.zip|12.0.0.3a.zip]]
! Note
+
| 12.0 - 12.2+
|-  
+
| 30 Sep 2019
| 11.0.0.3
+
| No Functional Changes
| 11.1
+
*Changes the mod parameter to a TNG system setting, using a Mod Setting Block
 +
*Adds Inner Mod Menus to admin_branches.php and admin_editbranch.php
 +
|- 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+
 +
| 24 May 2018
 +
| 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
 +
| 28 Dec 2017
 +
| 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+
 +
| 12 Dec 2017
 +
| 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+
 +
| 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
 +
# [[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.
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| 11.0.0.1
 +
| 11.0+
 
| 2 Apr 2017
 
| 2 Apr 2017
| New mod.
+
| New mod in Beta status.
 
|}
 
|}
  
Line 125: Line 179:
 
| [[User:Robinrichm|Robin Richmond]]
 
| [[User:Robinrichm|Robin Richmond]]
 
| Mod developer
 
| Mod developer
| v11.0.0.3
+
| v12.0.0.3
| 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: cust_text.php English mods]]
+
[[Category:ajx_labels.php mods]]
 +
[[Category:cust_text.php English mods]]
 +
[[Category:admin_genconfig.php mods]]
 +
[[Category:admin_updateconfig.php mods]]

Revision as of 13:17, 30 September 2019

Construction Under Construction
(The text of this article describes Version 18, but the visualizations are from Version 15.)
Robin Richmond 30 Sep 2019
Construction



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 14.0
TNG 13.0
TNG 12.0



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 30 Sep 2019
Download link v12.0.0.3a.zip
TNG 12.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 v12.0.0.8
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: rrinnermodmenu1_include.php, rrmodoptions1.php, img/rrmodadmin_wikilogo.png


Installs: rradminbranches_ajx.php, rradminbranches_lib.php
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 2 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. Note that the counts are expected not to match for what I call "dummy branches" whose BranchID's are incorporated into other branches, but they are still flagged. (See the visualizations)
    3. Uses a Mod Parameter 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. (Field buttons are small buttons with one-letter labels that are attached to form fields, and that perform four common editing tasks: Clear a field, Restore the field's initial value, set a Default, or set an "All items" value. See the Field Buttons mod, which must installed for the field buttons to be visible.
  • 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, it determines whether the Admin>>Branches>>Search results will display branch label counts for each branch, or just indicate whether each branch has labels.

  • In version 2 of the mod, this option is a "mod parameter", defined by the Mod Manager %parameter tag, and edited within the Mod Manager.
  • In version 3, this option is a custom TNG setting, defined and edited in the form at Admin>>Setup>>General Settings, in the new subform Robin's Mods

Files Installed

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

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 the functionality of the field buttons that are attached to the search string field and the Result Per Page field in the Branches Search page. If it is installed, no errors occurs; the field buttons will simply not appear on the screen.
  • This mod uses the Field Buttons mod to attach small 'field buttons' to several text fields, but it is not dependent on Field Buttons. Field buttons are configurable (and generally one-character) buttons that are attached to HTML form fields, and that reduce the typing or mouse movements needed to perform several common editing tasks. This mod is not compatible with Field Buttons mod versions earlier than version 3.
  1. The optional Show Mod Names mod can use data saved by Admin Branches to display information about mods that affect admin_branches.php and admin_branchedit.php. As with Field Buttons, if Show Mod Names is not installed, nothing bad happens; the "Show Mod Names" button will simply not be displayed at the bottom of either program.

Installation

This mod uses the standard installation procedure, though it should be noted that this mod contains mod subfolders that are shared with other mods that implement "Inner Mod Menus" or whose options are organized as Mod Settings Blocks in Admin>>Setup forms. Because of these shared folders, as you unzip or copy the mod, you might get a warning noting that a file or folder already exists. You can just ignore that warning.
[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

Admin branches-before1.jpg

Admin>>Branches>>Search After

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

  1. The 'Results per page' field that lets you change the # of search results per page without changing the TNG system parameter.
  2. Two new columns for the four fields in the branch rule.
  3. In the People and Families columns, if the count of People and/or Families records with the branch does not match the number of entries in the Branch Index, the counts are highlighed in red tex, and the count of index entries is displayed. Note that:
    • The counts are expected not to match if the branch name includes other branch names, and
    • 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.

Features in the visualization above that are installed or enabled by other mods:

  1. Field buttons, which are enabled by the Field Buttons mod. In this visualization,
    1. The search string's 'X' button (for 'clear') is visible, because the search string has a value.
    2. The search string's 'R' button (for 'Restore') is not visible. Thus, we know that the value "hk" in the search strings was loaded with the page. If you were to clear the field (with the 'X' button or not), or enter another value, then the 'R' button would appear.
    3. The 'A' (for 'All') button for the Results Per Page field is visible because the Results Per Page field is not 'All', which means 'All Results'
    4. The 'R' button for the Results Per Page field is shaded out because the current value is the initial value. (That is, the value the field had when the page was loaded).
    5. The 'D'(for 'Default' button is shaded out because, as it turns out, the current value is the same as the default value, which is the TNG system parameter, $maxsearchresults. If you were to change the 'Results Per Page' field to anything other than 30, the 'D' button would be visible.
  2. The names in the Starting Individual column are added by the Add Name to PersonID mod, which affects several programs. The native TNG code displays only the Person ID in this column.
Admin>>Branches>>Edit Before
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

Admin branches-after2-editbranch.jpg

Admin>>Branches>>Edit After Showing the results of an Add Labels action
No pop-ups are needed

Admin branches-after3-addlabels.jpg

Admin>>Branches>>Edit After Showing the the popup list of branch members
Whether you are adding labels, removing labels, or just showing who is already in a branch, the list of branch members is displayed in a pop-up

Admin branches-after4-shownames.jpg

Revision History

Mod Version TNG Versions Date Note
12.0.0.3a.zip 12.0 - 12.2+ 30 Sep 2019 No Functional Changes
  • Changes the mod parameter to a TNG system setting, using a Mod Setting Block
  • Adds Inner Mod Menus to admin_branches.php and admin_editbranch.php
12.0.0.3.zip & 11.0.0.3.zip 11.0 - 12.0+ 24 May 2018 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 28 Dec 2017 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+ 12 Dec 2017 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+ 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.
11.0.0.1 11.0+ 2 Apr 2017 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.3 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