Admin Branches Show Users

From TNG_Wiki
Jump to navigation Jump to search

notready


Admin Branches Show Users
Summary Modifies the Show Branch Members popup to include Users assigned to the branch
Validation
Mod Updated 23 Sep 2023
Download link
Download stats
Author(s) Robin Richmond
Homepage this page
Mod Support My Mod Support form
Contact Developer
Latest Mod 14.0.0.4
Min TNG V 13.0
Max TNG V 14.0.3
Files modified
ajx_showbranch.php, admin_editbranch.php, getperson.php, admin_genconfig.php
Related Mods
Notes


Purpose of the Mod

To include branch-assigned users in the branch members popup. The new features of the popup include:

  1. It ignores $tree as an input querystring parameter, since $branch is sufficient to identify the tree and branch uniquely.
  2. In the heading, it displays the tree to which the branch belongs, next to the branch name (unless the database has only one tree.)
  3. The heading now has id='top', to be used as a hyperlink destination.
  4. The word "Families" in the heading line with people and family counts is a hyperlink to the list of families.
  5. Person names and family names are now in ordered lists.
  6. Person names are now hyperlinked to the Person Profile rather than to the Person editor.
  7. There is now a heading above the list of families, with a hyperlink to the top of the litbox.
  8. Families are now hyperlinked to the Family Profile rather than tp the family editor.
  9. There is a list to the top of the litbox from the bottom.
  10. A new querystring parameter $showusers controls whether the branch's users are listed.
  11. In the new popup 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.
  12. If Regroup Person-Branch Members is also installed, the list branch members/user list can be invoked from the Person Profile. Thus
    • 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.
    • To accommodate inaccessible records, it modifies the wording in the subheading and adds the count of inaccessible records
    • If any records are omitted from the lists because they are inaccessible by the user, a new message says how many were omitted.

Mod Options

This mod has no options, but the Regroup Person-Branch Members mod has options that control whether branch member popups in the Person Profile can show branch members or branch-assigned users.

Other Mods

Compatibility

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

Related Mods

  1. Regroup Person-Branch Members, from which this mod was spun off, allows the branch members/users popup to be launched from the Person Profile. Admin Branches Show Users assigned a value to a variable in getperson.php and admin_genconfig.php so that code added by Regroup Person-Branch Members can know at execution time that the Show Branch Members popup box can list branch-assigned users.
  2. In particular, when Admin Branches Show Users is installed, the mod options added to admin_genconfig.php by Regroup Person-Branch Members control whether, for certain classes of users, the branch-assigned users are included in the branch members popup.

Installation

This mod doesn't change any code in getperson.php (the person profile) or admin_genconfig.php (Admin>Setup>General Settings). Since this mod changes Include files used by those programs, it adds a PHP statement to each file that tells the Show Mod Names mod that those programs have been changed.

Files Installed

This mod does not install any files, but it does still have a mod subfolder, which contains the mod's language strings. That is, this mod's language strings are not defined in its .cfg file nor copied to cust_text.php files. As a result

  • This mod's language strings are loaded only into the TNG programs that need them, not into all TNG programs, and
  • It is easier to create, edit, test, and save translation for this mod than for mods that use standard cust_text.php strings.

This non-standard technique should be invisible to you unless you want to define a translation or override any of this mod's string values.
Read more about this technique, the simplified translation process, and the procedure for defining site-specific overrides to its language strings.


[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

In the popup list created by ajx_showbranch.php:
  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 box:
  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

Revision History

Mod Version TNG Versions Date Note
14.0.0.4 14 23Sep2023 independent of Admin Branches

No options are needed since admins can always see all users

14.0.0.3b

rrabsu


8Feb2023 Upgrade to TNGv14
v13.0.3.1a 13 5Feb2022 Cleaned up undefined variable errors and changed "blank" to "_blank" to accommodate TNGv13.0.1
v13.0.0.1 13 5Oct2020 New mod, spun off from Regroup Person-Branch Members

Language Strings

language1


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 the new popup in a specific Person Profile)
Robin Richmond Mod developer 14.0.0.4

rrabsu


English
Osage County Cousins Larry G Banks Public/Private 13.0.3.1a 14.0 EN