Changes

Jump to navigation Jump to search
1,906 bytes added ,  18:05, 2 December 2019
no edit summary
Line 1: Line 1: −
{{construction
  −
|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}}
  −
  −
{{V12_cust_text}}
   
{{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  =  
| mod_last_update = 30 Sep 2019
+
| mod_last_update = 26 Nov 2019
| download_link  =  [[Media:admin_branches_v12.0.0.3a.zip|v12.0.0.3a.zip]]{{Tv120}}
+
| 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    = v12.0.0.8
+
| mod_version    = 12.0.0.4
 
| min_TNG_ver    = 11.0
 
| min_TNG_ver    = 11.0
 
| max_TNG_ver    = 12.2
 
| max_TNG_ver    = 12.2
 
| TNG_file_list  = admin_branches.php, admin_editbranch.php, ajx_labels.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.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
+
<br>Installs shared files: rrshared_innermodmenu2.php, rrshared_modsettingsblocks2.php, img/rrshared_wikilogo.gif
  −
<br>Installs: rradminbranches_ajx.php,  rradminbranches_lib.php
   
| related_mods  = [[Branch Timestamps]] depends on this mod.
 
| related_mods  = [[Branch Timestamps]] depends on this mod.
 
| notes          =   
 
| notes          =   
Line 30: Line 25:  
|}
 
|}
 
* The Admin>>Branches>>Search page now:
 
* The Admin>>Branches>>Search page now:
*# Has two new columns for the four branch rule parameters (with 2 values in each column):
+
*# 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. 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)
+
*# 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 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.
+
*# 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.
 
*# 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.
+
*# Adds "Field Buttons" to the search string field and the Results Per Page field.
 
* In the Branch Edit form:
 
* 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.)
 
*# All action buttons are now directly on the screen, in fieldsets, rather than in pop-ups. (I found the cascading pop-up forms confusing.)
Line 40: Line 35:     
== Mod Options ==
 
== 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.
+
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
* 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 records in each branch, or
* 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]'''
+
* A flag that says that there ''are'' records in the branch.
   −
== 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]'''.
# '''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.
      
== Compatibility ==
 
== Compatibility ==
Line 64: Line 54:  
#* Installs a "Timestamp Test App" that lets a TNG site administrator review the results of recent actions, run actions, and queue actions.
 
#* 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 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.
+
# 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".
# 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.
+
#* 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.
    
== Installation ==
 
== 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 [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}}
+
=== Files Installed ===
 +
This mod has two mod subfolders:
 +
# '''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'''
 +
 
 +
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).
 +
{{RobinInstallationBoilerplate}}
    
== Visualizations ==
 
== Visualizations ==
 
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
| '''Admin>>Branches>>Search <span style="color: red">Before</span>'''<br>
+
| '''Admin>>Branches>>Search <span style="color: red"> Before Installation</span>'''<br>
 
[[Image:admin_branches-before1.jpg]]
 
[[Image:admin_branches-before1.jpg]]
 
|-  
 
|-  
| '''Admin>>Branches>>Search <span style="color: red">After</span>'''<br>
+
| '''Admin>>Branches>>Search <span style="color: red">After Installation</span>'''<br>
 
[[Image:admin_branches-after1.jpg]]<br/>
 
[[Image:admin_branches-after1.jpg]]<br/>
New features installed by this mod (highlighted in green):
+
New features installed by this mod (outlined in green):
# The 'Results per page' field that lets you change the # of search results per page without changing the TNG system parameter.
+
# 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.
# Two new columns for the four fields in the branch rule.
+
# The 'Results per page' field that lets you change the number of search results per page without changing the TNG system parameter.
# 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:
+
# Two new columns for the four fields in the branch rule that are identified by the labels in the column heading.
#* The counts are ''expected'' not to match if the branch name includes other branch names, and
+
# 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,
#* 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.
+
#* 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:
+
Features in the visualization above that are installed or enabled by other mods (outlined in brown):
<ol start=4>
+
<ol start=6>
<li>Field buttons, which are enabled by the [[Field Buttons]] mod. In this visualization,
+
<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:
   <ol type='a'>
+
   <ul><li>The search string's 'X' button clears the search string, and</li>
  <li>The search string's 'X' button (for 'clear') is visible, because the search string has a value.</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 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 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>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>
    <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>
 
</ol>
 
|}
 
|}
Line 101: Line 107:  
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
|'''Admin>>Branches>>Edit <span style="color: red">Before</span>'''
+
|'''Admin>>Branches>>Edit <span style="color: red">Before Installation</span>'''
 
<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>
 
<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]]
 
[[Image:admin_branches-before2-editbranch.jpg]]
 
|-  
 
|-  
|'''Admin>>Branches>>Edit <span style="color: red">After</span>'''<br>
+
|'''Admin>>Branches>>Edit <span style="color: red">After Installation</span>'''<br>
 
[[Image:admin_branches-after2-editbranch.jpg]]
 
[[Image:admin_branches-after2-editbranch.jpg]]
 +
|}
 +
 +
{| border="3" cellspacing="1" cellpadding="2" class="wikitable"
 +
|-
 +
|'''Admin>>Branches>>Search <span style="color: red">After Installation</span> - The Inner Mod Menu'''
 +
<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.
 
|-  
 
|-  
|'''Admin>>Branches>>Edit <span style="color: red">After</span>''' Showing the results of an Add Labels action
+
|'''The Admin Branches Option - in a "Mod Settings Block"
<div>No pop-ups are needed</div>
+
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'''.
[[Image:admin_branches-after3-addlabels.jpg]]
+
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>
|'''Admin>>Branches>>Edit <span style="color: red">After</span>''' Showing the the popup list of branch members
  −
<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 !! TNG Versions !! Date !! Note
 
! Mod Version !! TNG Versions !! Date !! Note
|-  
+
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| [[Media:admin_branches_v12.0.0.4.zip|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 '''[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]]
 
| [[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+
 
| 11.0 - 12.0+
| 24 May 2018
+
| 24May2018
 
| Brought to TNGv12 specs; Change the filenames of the installed files to be more distinctive.
 
| 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]]
 
| [[Media:admin_branches_v11.0.0.2a.zip|11.0.0.2a.zip]]
 
| 11.0 - 11.1.2
 
| 11.0 - 11.1.2
| 28 Dec 2017
+
| 28Dec2017
 
| No visible changes, except when printing
 
| 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.
 
* 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.
 
* 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.0.2
 
| 11.0+
 
| 11.0+
| 12 Dec 2017
+
| 12Dec2017
 
| Changes:
 
| Changes:
 
# Added the Results Per Page field
 
# Added the Results Per Page field
 
# Added field buttons
 
# Added field buttons
 
# Removed the second line of the two-line cust_text.php target location search string.
 
# 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+
| 2 Jun2017
+
| 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.0.1
 
| 11.0+
 
| 11.0+
| 2 Apr 2017
+
| 2Apr2017
 
| New mod in Beta status.
 
| New mod in Beta status.
 
|}
 
|}
Line 170: Line 195:  
| [[User:Robinrichm|Robin Richmond]]
 
| [[User:Robinrichm|Robin Richmond]]
 
| Mod developer
 
| Mod developer
| v12.0.0.3
+
| v12.0.0.4
 
| 12.0
 
| 12.0
 
| English
 
| English
Line 195: Line 220:  
[[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]]
'''Experienced'''
5,069

edits

Navigation menu