Admin Branches

Aus TNG_Wiki
Zur Navigation springen Zur Suche springen
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 28 Sep 2023
Download link v14.0.0.8
TNG 14.0
Download stats -
Author(s) Robin Richmond
Homepage this page
Mod Support My Mod Support form
Contact Developer My Mod Support form
Latest Mod v14.0.0.7
Min TNG V 11.0
Max TNG V 14.0.3
Files modified
admin_branches.php, admin_editbranch.php, ajx_labels.php, admin_genconfig.php, admin_updateconfig.php. Installs rradminbranches_ajx.php, rradminbranches_lib.php, rradminbranches_clear_ajx.php.
Related Mods
Requires Mod Settings Blocks. Admin Branches Queue depends on this mod.
Notes
There is a Danish translation.


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 will display

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

optionsmsb

Compatibility

Related Mods

  1. The Mod Settings Blocks mod packages this mod's options into what I call a "Mod Settings Block", which is a set of form fields that formatted and labeled so that it stands out among other options in an Admin>>Setting form. Mod Settings Blocks is a prerequisite for this mod; it must be installed before this mod can be installed.
  2. Admin Branches Queue is a companion mod to Admin Branches and depends on Admin Branches.

Installation

This mod does not use standard cust_text.php files for language strings. Instead, it stores languages strings in the mod's subfolder, and pages modified by this mod load language strings directly from files in the mod's languages/ subfolder. Read more about this technique and its procedure for handling site-specific language string overrides.

Files Installed

  1. rradminbranches_ajx.php - 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.
  2. rradminbranches_lib.php - 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
  3. rradminbranches_ajx.php to retrieve updated counts after admin_editbranch.php has modified a branch.

[Show Standard Installation Process]

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, shown closed, with just its label, "Mod Information". See a visualization of the menu contents below.
  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

Language Strings

This mod includes a typical mod subfolder, with the same base name as the mod's .cfg file. The subfolder is atypical in that no files in it are installed to working TNG folders. However, it does contain critical files that contain the mod's language strings, which the mod does not add to standard cust_text.php files. Instead, the PHP code modified by this mod loads the language strings from files in the mod's languages/ subfolder. Read more about this technique.

Revision History

Mod Version TNG Versions Date Note
v14.0.0.8 14 28 Sep 2003 Made changes to how branch members are displayed in Litbox by modifying the heading, watching for Living or Private people, separating people and families into two numbered lists, splitting person or family names and corresponding IDs into two separate hyperlinks with spacing, detecting the installation status of Mod Settings Blocks and Admin Branches Queue, and when Admin Branches Queue is installed, generating a bad target error and displaying an "Edit Options" button that links directly to the Mod Setting Block.
v14.0.0.7 14.0-14.0.1 7 Apr 2023 Removed ShowModNames Include, fixed some empty variable & subscript references, and added a test for undefined $tree that should be in the native code
13.0.0.6b.zip 13.0-13.0.3 10 Apr 2021 Added a Danish translation, thanks to Karsten Weikop
13.0.0.6a.zip 13.0-13.0.1 20 Nov 2020 Reset button wasn't working. Code cleanup.
13.0.0.6.zip 13.0-13.0.1 6 Sep 2020
12.0.0.5.zip 12.0 - 12.3 25Jul2020
  • Fixed a bug that wouldn't allow a tree to be selected nor to diplay the tree name in the results table.
  • Internal Changes:
    • Now uses a standalone version of the Inner Mod Menu library, installed by its own mod.
    • Moved the cust_text strings into a mod subfolder.
    • Cleaned up some references to undefined variables and subscripts
    • No longer removes the "Add New" tab from the edit program.
12.0.0.4c.zip 12.0 - 12.3 14Mar2020 No functional changes; Changed a target location to accommodate TNGv12.3, and upgraded to version 4 of the shared mod settings Include files.
12.0.0.4a.zip 12.0 - 12.2+ 3Jan2020 No functional changes; Upgraded to version 3 of the shared mod settings include files.
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 v14.0.0.8 14.0.1 English
Racine d'Alsace J-Louis Valory Public/Private - T17 customized 12.0.0.3 12.0.2 FR
The Cole / Tanner Family Tree David Cole Public/Private see here see here EN, DE, FR, ES, NL
Roots & Relatives Remembered Ron Krzmarzick Private See Here See Here EN,DE,CS