Regroup Person-Branch Members

From TNG_Wiki
Jump to: navigation, search
Regroup Person-Branch Members
Summary Turns branch names in the Person Profile into hyperlinks to a popup list of Branch members, as in the Branch editor. Users assigned to the branch may also be displayed.
Mod Updated 12 Sep 2020
Download link v13.0.0.19b
TNG 13.0
TNG 12.0
See the Revision History for older versions
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer this page
Latest Mod
Min TNG V 10.1
Max TNG V 13
Files modified
getperson.php, personlib In TNGv12 only: admin_editbranch.php, English cust_text.php
Related Mods

Purpose of the Mod

To allow selected users of the Person Profile to see the members in (and probably users assigned to) branches to which the profiled person belongs.

  • "To see the members of branches" means that the branch names are hyperlinked, and clicking on the hyperlinks pops up the same information box that is shown with the "Show Branch Members" function in the branch editor.
  • By "selected users", I mean that a mod options controls whether unauthenticated visitors and logged-in users can see the branch

In TNGv12 only, this mod contains an option that enhances the Branch Members popup to show branch-assigned users and to add links and settings. These enhancements appear (optionally) in all Branch Members popups; that is, both in the Person Profile and in the Branch Editor. In TNGv13, these enhancements are implemented by the new Admin Branches Show Users mod.

[Options for mod version 12]

The new features of the popup include:

  1. Since it now can be called from an end-user program (the Person Profile), the lists of people and families must make sure that the current user is allowed to see these people and families. If some records are restricted from being seen by the user, the restricted records are completely omitted from the lists.
  2. To accommodate inaccessible records, it modifies the wording in the subheading and adds the count of inaccessible records
  3. If any records are omitted from the lists because they are inaccessible by the user, a new message says how many were ommited.
  4. It ignores $tree as an input querystring parameter, since $branch is sufficient to identify the tree and branch uniquely.
  5. In the heading, it displays the tree to which the branch belongs, next to the branch name (unless the database has only one tree.)
  6. The heading now has id='top', to be used as a hyperlink destination.
  7. The word "Families" in the heading line with people and family counts is a hyperlink to the list of families.
  8. Person names and family names are now in ordered lists.
  9. Person names are now hyperlinked to the Person Profile rather than to the Person editor.
  10. There is now a heading above the list of families, with a hyperlink to the top of the litbox.
  11. Families are now hyperlinked to the Family Profile rather than tp the family editor.
  12. There is a list to the top of the litbox from the bottom.
  13. A new querystring parameter $showusers controls whether the branch's users are listed.
  14. In the new list of users
    • The "realname" field from the users is the value that identifies each user
    • If the user has an email address, the realname is displayed as a mailto: hyperlink.
    • If the user has an associated person, that person's ID and name are displayed as a hyperlink to the person profile.
[Hide Details]

Mod Options

These options were added with TNGv13, and are defined in a Mod Settings Block at Admin>>Setup>>General Settings in a new subform with the name "Mod Settings Blocks"

  • The options control which class of users (visitors, logged-in users, admins) can see people in the branch and/or users who are assigned to the branch.

See a visualization below.

Other Mods


No known mod conflicts or strict dependencies, but do please let me know if you find any.

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. The Mod Settings Blocks mod must be installed before this mod can be installed.
  2. Admin Branches Show Users was spun off from this mod for TNGv13. When it has been installed, the branch members popup in the Person Profile will (optionally) also show branch-assigned users.
  3. The optional mod Inner Mod Menus displays an "Inner Mod Menu" in the TNG "inner menu" (just below the tab menu). The Inner Mod Menu is defined by this mod but is visible only if Inner Mod Menus is installed. It is also visible only to TNG administrators; never to end-users. I highly recommend that you install the Inner Mod Menus mod because Inner Mod Menus provide links to handy information - particularly to the mod settings blocks for this mod's options.
  4. This mod gathers data that can be used by the optional mod Show Mod Names, but there is no dependency on Show Mod Names

This mod is compatible with, and coordinated with, the "Regroup Person" family of mods.    [Show the family members]

[Hide details]

The "Regroup Person" family of mods, developed and supported by Robin Richmond, all affect the Person Profile. Each mods can be used by itself, though several of them are specifically intended to duplicate the functionality of other mods that don't happen to be compatible with Regroup Person Profile, the first and most complex member of the family.

  1. Regroup Person Profile Rearranges the data in and spacing and formatting of the Person Profile. Also (optionally) adds siblings.
  2. Regroup Person-Branch Members - Turns each of the profiled person's branch names into a hyperlink that pops up a list of branch members. Options control which classes of users (e.g. anonymous visitors) can see branch details.
  3. Regroup Person-Child2Parent - Hides the display of selected relationships (typically the most common relationships such as "natural" or "birth") between the profiled person and that person's parents and children.
  4. Regroup Person-Date Place - Adjusts the spacing used to display (1) Event dates, places, and values and/or (2) The name/birth/death/age data for the profiled person's relatives.
  5. Regroup Person-Family Indicators - Based on Jeff Robison's Family Indicators Mod, this mod adds flags (i.e. "indicators") next to the names of the profiled person's relatives. The flags provide information about and links to several aspects of those relatives' relatives, including popup profiles and ancestor or descendant charts.
  6. Regroup Person-Gender Before Birth - Simply moves the Gender "event" so that it appears above the Birth event.
  7. Regroup Person-Hide Branches - Hides branch names from anonymous visitors and/or logged-in users who are not assigned to the branch.
  8. Regroup Person-Map Children - Adds the births of the profiled person's children to the Event Map.
  9. Regroup Person-Move Media - Simply moves the media files above the event map.
  10. Regroup Person-No Living Data - Suppresses display of ANY data about a living or private person the user doesn't have rights to see. By default, TNG will show some data, plus spouses, parents, and children.
  11. Regroup Person-Remove Gender - Removes the Gender event (the sex) from the event tables, leaving the gender icon next to the name as the sole representation of the person's gender.
  12. Regroup Person-Sources - Allows some source and citation data to be hidden for brevity, and displayed as desired.
[Hide the list of Regroup Person mods]


Files Installed

In TNGv13, 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.

In TNGv12 only, there is a second mod subfolder, which is shared by several mods. The folder RR-shared_mod_includes_v12.0.0.4 contains Include files that help to manage mod options in many of my mods:

  1. rrshared_modsettingsblocks4.php - Mod Settings Blocks
  2. img/rrshared_wikilogo.gif - An icon that links to a mod's TNG Wiki page from a Mod Settings Block

Each mod that contains the shared folder may install some or all of its shared files, depending on whether those files already exist. Once a file from the shared 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 or absence generate any Mod Manager errors.

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

[Show Installation Details]


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


  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, 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.


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


Person Profile BEFORE: Note two branch names
Show branch members-before.png
Person Profile AFTER:
The branch names are now hyperlinks, and clicking on one pops up the list of members.

Show branch members-after.png

In the popup list created by ajx_showbranch.php:

(These features are implemented by this mod in TNGv12, but by Admin Branches Show Users in TNGv13)

  1. The heading has new wording, and lists both the BranchID and the Branch name
  2. There is a list of users assigned to this branch, because the Person Profile always sets the "show users" flag when calling ajx_showbranch.php.
  3. Consideration of inaccessible (Living or Private) records is new. The count is non-zero because the current user is either branch-restricted, or not logged in.
  4. The actual number of records in the branch is 783 + 880 + 308 = 1971
  5. The word "Families" next to the count of Families is a hyperlink down to the Families heading shown in the second section of the screen clip.
  6. The Families headings is new, as are the links back to the top of the litbox.
Admin Branch Edit BEFORE:
When you click on the button shown, the members of the branch are listed in the pop-up box. Note that the button and the pop-up box heading are identical, and that they refer to "people" rather than "members" (which include families).

Show branch members-before2.png

Admin Branch Edit AFTER:
In the popup litbox:
  1. The main heading text is different from the native code, but the same as in the box popped up the Person Profile.
  2. By definition, the Branch members list generated by the Admin Branch Edit program will not have any inaccessible records, because it must be run by an administrator.
  3. Thus, in this case, the subheading just says "Members" rather than "Accessible Members", and the counts are larger.
  4. The "native" Admin Branch Edit program does not have a way to set the flag that causes the popup to display users of the branch. A new checkbox created through the Admin Branches controls that flag.

Show branch members-after2.png

AFTER: The Person Profile "Inner Mod Menu"

This menu drops down from the label "Mod Information" at the right end of the standard TNG "Inner Menu", just below the tab bar. It is visible only to site administrators. Several mods add Inner Mod Menu entries to the Person Profile. This screenshot shows the menu with four mods, plus a link to "more mods". Regroup Person-Branch members will always be shown above the "more mods" link.

The button that is cut off to the right of "Mod Information" is added by Regroup Person-Date Place

Branch members-imm.jpg

7. AFTER: The Regroup Person-Branch Members Profile "Mod Settings Block"

A Mod Settings Block is an outlined subform within an Admin>>Setup program that contains the options for a single mod. What is most notable about a Mod Settings Block is that a hyperlink directly to a Mod Settings Block displays only that block (i.e. only one mod's options), not all of the other options in the form or subform.

Here, you see the this mod's Mod Settings Block, in admin_genconfig.php, at Admin>>Setup>>General Configuration. The triangular arrow next to the subfolder heading Mod Settings Blocks is pointing to the right, meaning that the subform is not open, and that your site's other mod settings blocks are not visible. If you were to open the subform by clicking on the heading, you would see the mod settings blocks for other mods that you have installed.

Branch members-msb.jpg

Revision History

Mod Version TNG Versions Date Note
v13.0.0.19b 13 12 Sep 2020
  1. In upgrading to TNGv13, changed one target location to accommodate a new empty() function call.
  2. Uses the Mod Settings Blocks mod rather than the shared files.
  3. Spun off the changes to ajx_showbranch.php (i.e. including branch-assigned users in the Branch Members popup
  4. Added mod options to control which class of users (visitors, logged-in users, admins) can see people in the branch or users tied to the branch.
v12.0.0.19 12.0-12.3 10May2020 Renamed the mod to Regroup Person-Branch Members and jumped to v19 to be consistent with other mods in the Regroup Person family. No other meaningful functional changes
  • Added an Inner Mod Menu.
  • Moved the cust_text strings into a mod subfolder.
  • Cleaned up references to undefined variables and subscripts 10.1-11.1.2+ 14 Jan 2018 This and earlier versions of the mod are named Show Branch Members

In the Branch Members litbox popup used by the Branch editor, and now by the Person Profile,

  • Added more information to the heading
  • Made the people and families lists ordered lists
  • Added a Families heading, a link to the Families heading from the top heading, and links to the top from the Families heading and the bottom of the page.
  • The code now uses the correct gedcom field in the Users table to determine whether there is a default genealogy record for the user. 10.1-11.1.2+ 4 May 2017 Now makes sure that a branch-restricted user has an associated user before trying to display the associated user, and makes sure that the associated user exists. 10.1-10.1.3 30 Nov 2015 New mod.

Language Strings

This mod, like many of my newer mods, does not add strings to the standard TNG cust_text.php files. Instead, the language strings are stored in the languages subfolder of the mod's normal subfolder, in files named {language}_custtext.php (e.g. French-UTF8_custtext.php.) I'm using this nonstandard technique for several reasons, but there is a rarely-relevant downside that comes in to play only if you want to override the string value that the mod assigns to a language string. (Read about the problem and the solution.)

TNG User sites using this mod

If you download and install this mod, please add your TNG site to the table below

URL User Note Mod-Version TNG-Version User-language
Richmond's Genealogy Database
(See a specific Person Profile)
Robin Richmond Mod developer 13 English
Roots & Relatives Remembered Ronald Krzmarzick Public & Private See Here See Here EN,DE,CS
Martius family Hendrik Martius Use to inform living branch members on assigned users, e.g. corr. GDPR 12.0.1 DE, EN, FR, NL