Difference between revisions of "Regroup Person-Hide Branches"

From TNG_Wiki
Jump to navigation Jump to search
(typos and some cleanup)
(18 intermediate revisions by 7 users not shown)
Line 3: Line 3:
 
|  mod_summary    = On the Person Profile, hides branch names unless the user is an administrator or has a branch restriction, in which case, only matching branches are shown.
 
|  mod_summary    = On the Person Profile, hides branch names unless the user is an administrator or has a branch restriction, in which case, only matching branches are shown.
 
| mod_validation  =  
 
| mod_validation  =  
| download_link  = For {{Tv100}}[[Media:hide_branch_names_v10.0.0.4.zip|(mod)_v10.0.0.4.zip]]
+
| mod_last_update = 15 May 2018
 +
| download_link  = [[Media:hide_branch_names_v12.0.0.4a.zip|v12.0.0.4a.zip]]{{Tv120}}
 
| download_stats  =
 
| download_stats  =
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
| mod_url        = [http://robinr.org/family/ Robin Richmond's Genealogy Database]
+
| mod_url        = [https//www.org/family/ Robin Richmond's Genealogy Database]
 
| mod_contact    = [http://robinr.org/family/mod_support.php My Mod Support form]
 
| mod_contact    = [http://robinr.org/family/mod_support.php My Mod Support form]
 
| mod_support    = [http://robinr.org/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
 
| mod_support    = [http://robinr.org/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
| mod_version    = 10.0.0.4
+
| mod_version    = v12.0.0.4a
| min_TNG_ver    = 10.0
+
| min_TNG_ver    = 10.1
| max_TNG_ver    = 10.1.3
+
| max_TNG_ver    = at least 12.2
 
|  TNG_file_list  = getperson.php
 
|  TNG_file_list  = getperson.php
 
| related_mods  = [[Show Branch Members]], [[Show Mod Names]]
 
| related_mods  = [[Show Branch Members]], [[Show Mod Names]]
 
| notes    =   
 
| notes    =   
 
}}
 
}}
 
 
{| style="margin-right:0.5 em;" align="right"  
 
{| style="margin-right:0.5 em;" align="right"  
 
| __TOC__
 
| __TOC__
 
 
|}
 
|}
  
Line 26: Line 25:
 
# Administrators see all branch names assigned to all Individuals.
 
# Administrators see all branch names assigned to all Individuals.
 
# Non-logged-in users and users without a branch restriction never see any branch assignments.
 
# Non-logged-in users and users without a branch restriction never see any branch assignments.
# If the mod parameter is true, then logged-in users who have a branch restriction see branch assignments ''for their branch only''. That is,
+
# Users who have a branch restrict may see ''their branch name'', depending on a mod option.
#* If an Individual has 3 branches, including the one assigned to the current user, only the user's branch would be shown.
+
 
#* If an Individual has one or more branches, bot not the one assigned to the current user, no branches branches would be shown.
+
== Mod Options ==
 +
The one option allows logged-in users with a branch assignment to see ''their branch name'' when they view the Person Profile for any individual who is a assigned to their branch.  
  
== Mod Parameters ==
+
The branch assignment that is relevant to this mod is branch to which this user is restricted and has nothing to do with branch assignments associated with a possible Person record associated with the User.
The one parameter allows logged-in users with a branch assignment to see ''their'' branch name, for Indivduals in their branch.  When the parameter is false, only administrators will see any branch names in the person profile.
 
  
 
==Compatibility With Other Mods==
 
==Compatibility With Other Mods==
Line 37: Line 36:
  
 
==Related Mods==
 
==Related Mods==
# This mod uses the mod registration and display features as defined by [[Show Mod Names]].  If you have not installed [[Show Mod Names]], you won't see any effect, but if you have  installed [[Show Mod Names]], the names of all mods that use this feature will be shown at the bottom of the Person Profile.
+
# [[Show Branch Members]] doesn't have a dependent relationship with this mod, but it also affects the display of branch names in the Person Profile.  [[Show Branch Members] turns whatever branch names are displayed into hyperlinks that show a list of the branch's members.
# [[Show Branch Members]] doesn't have a dependent relationship with this mod, but it also affects the display of branch names in the Person Profile.  It turns whatever branch names are displayed into hyperlinks that show a list of the branch's members.
+
# This mod supplies information that is used by the optional mod [[Show Mod Names]]. If you don't install [[Show Mod Names]], you simply won't see the "Show Mods" at the bottom of the Person Profile.  Note that end-users are unlikely to see the "Show Mods" button in any case, since the default value of a Show Mod Names option omits the "Show Mods" button from pages viewed by end-users.
  
 
==Installation==
 
==Installation==
# Remove previous version of this mod.
+
This mod uses the standard installation process. {{RobinInstallationBoilerplate}}
# Backup the getperson.php, the only file affected by this mod.
 
# Download the .zip file, and extract its .cfg file to your 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 ==
 
# Try using the [[Mod_Manager_-_Installing_Config_Files#Remove_Mod_Steps|Mod Manager Remove]] capability
 
# Contact me through [http://www.robinrichmond.com/family/mod_support.php My Mod Support form].
 
 
 
== Visualization of this Mod ==
 
  
 +
== Visualizations ==
 
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
Line 67: Line 58:
 
|}
 
|}
  
== Mod Change History ==
+
== Revision History ==
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
|-
+
! Mod Version !! TNG Version !! Date !! Note
! Mod Version
+
|-
! TNG Versions
+
| [[Media:hide_branch_names_v12.0.0.4a.zip|12.0.0.4a]]
! Date
+
| 12.0+
! Note
+
| 15 May 2018
 +
| No functional changes; made compatible with TNGv12.
 +
|-
 +
| [[Media:textplus_charts_v10.0.0.4a.zip|10.0.0.4a]]
 +
| 10.0.0-10.1.3
 +
| 14 Feb 2016
 +
| - Uses Show Mod Names v2
 
|-  
 
|-  
 
| 10.0.0.4
 
| 10.0.0.4
Line 120: Line 117:
 
| [[User:Clausm|Claus Martinussen]]
 
| [[User:Clausm|Claus Martinussen]]
 
| Public Site
 
| Public Site
| 10.0.0.3
+
| 12.0.0.4a
| 10.1.3
+
| 12.0.3
 
| DA, EN
 
| DA, EN
 
|-
 
|-
| [http://www.bradyfamilytree.org/ Brady Family Tree in Western Australia]
+
| [https://www.bradyfamilytree.org/ Brady Family Tree in Western Australia]
 
| [[User:bradyfamilytree|Darryl Brady]]
 
| [[User:bradyfamilytree|Darryl Brady]]
 
| Public site  
 
| Public site  
| 10.0.0.2a
+
| 10.0.0.4
 
| 10.1.1
 
| 10.1.1
 
| EN, DE
 
| EN, DE
 +
|-
 +
| [http://www.OurFamilyLinks.org Our Family Links ]
 +
| [[User:Chuckfilteau|Chuck Filteau]]
 +
| Public site, modified Template 12
 +
| v10.0.0.3
 +
| v10.1.2
 +
| EN
 +
|-
 +
| [https://www.royandboucher.com/tng/getperson.php?personID=I39&tree=T0001 Our Roy and Boucher Family]
 +
| [[User:KenRoy|Ken Roy]]
 +
| Public site, modified Template 4<br />Installed without [[Show Mod Names]]
 +
| 10.0.0.4a
 +
| 11.1.0
 +
| EN
 +
|-
 +
| [https://www.martius-familie.de/ Martius family]
 +
| [[User:Hemar|Hendrik Martius]]
 +
| Half public
 +
| 12.0.0.4a
 +
| 12.0.1
 +
| DE, EN, FR, NL
 
|-
 
|-
 
|}
 
|}
  
 +
[[Category:Mods for TNG v12]]
 +
[[Category:Mods for TNG v11]]
 
[[Category:Mods for TNG v10]]
 
[[Category:Mods for TNG v10]]
 
[[Category:getperson.php mods]]
 
[[Category:getperson.php mods]]

Revision as of 13:18, 12 November 2019

Hide Branch Names
Summary On the Person Profile, hides branch names unless the user is an administrator or has a branch restriction, in which case, only matching branches are shown.
Validation
Mod Updated 15 May 2018
Download link v12.0.0.4a.zip
TNG 12.0
Download stats
Author(s) Robin Richmond
Homepage [https//www.org/family/ 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.4a
Min TNG V 10.1
Max TNG V at least 12.2
Files modified
getperson.php
Related Mods
Notes


Purpose of the Mod

In the Person Profile, this mod limits the visibility of the branches to which an Individual is assigned.

  1. Administrators see all branch names assigned to all Individuals.
  2. Non-logged-in users and users without a branch restriction never see any branch assignments.
  3. Users who have a branch restrict may see their branch name, depending on a mod option.

Mod Options

The one option allows logged-in users with a branch assignment to see their branch name when they view the Person Profile for any individual who is a assigned to their branch.

The branch assignment that is relevant to this mod is branch to which this user is restricted and has nothing to do with branch assignments associated with a possible Person record associated with the User.

Compatibility With Other Mods

There are no apparent conflicts, but there are so many mods that affect the Person Profile that I haven't tested them all against this mod. Please contact me if you encounter any conflicts.

Related Mods

  1. Show Branch Members doesn't have a dependent relationship with this mod, but it also affects the display of branch names in the Person Profile. [[Show Branch Members] turns whatever branch names are displayed into hyperlinks that show a list of the branch's members.
  2. This mod supplies information that is used by the optional mod Show Mod Names. If you don't install Show Mod Names, you simply won't see the "Show Mods" at the bottom of the Person Profile. Note that end-users are unlikely to see the "Show Mods" button in any case, since the default value of a Show Mod Names option omits the "Show Mods" button from pages viewed by end-users.

Installation

This mod uses the standard installation process. [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

BEFORE:

Note the circled branch name, visible to anyone who can see the person's name.

Hide branch names-before.png
AFTER:

The branch name is now invisible to non-administrators and to users not restricted by a matching branch.

Hide branch names-after.png
AFTER: If you have installed Show Mod Names, this mod will join other compliant mods in a list at the bottom of the page.
Person profile modlist.png

Revision History

Mod Version TNG Version Date Note
12.0.0.4a 12.0+ 15 May 2018 No functional changes; made compatible with TNGv12.
10.0.0.4a 10.0.0-10.1.3 14 Feb 2016 - Uses Show Mod Names v2
10.0.0.4 10.0.0-10.1.3 6 Dec 2015 - Uses the mod name display functionality defined by Show Mod Names

- Reworked code to be compatible with Show Branch Members
- Avoids database calls, thus removing any need to deal with TNGv10.0 vs 10.1.

10.0.0.3 10.0.0-10.1.1 11 Jul 2015 - Followed Ken Roy's suggestion to use the code
($allow_edit && $allow_add && $allow_delete && !$assignedtree)
to determine whether the user is an administrator.
- Added the option to display matching branches to users who have a branch restriction.
- Put the word "Branches" in front of the branch names.
- Includes conditional code to allow a SQL statement to be executed in TNG v10.0 or v10.1
10.0.0.2 10.0.0-10.1 26 Feb 2015 v10.0.0.1 would hide branch names from non-administrators, but wouldn't display them for administrators.
10.0.0.1 10.0.0-10.1 26 Dec 2014 New mod; adapted from a incompletely documented, un-credited mod already in use.

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 (not installed) Robin Richmond Mod developer 10.0.0.4 10.1.3 English
DJCM.DK Claus Martinussen Public Site 12.0.0.4a 12.0.3 DA, EN
Brady Family Tree in Western Australia Darryl Brady Public site 10.0.0.4 10.1.1 EN, DE
Our Family Links Chuck Filteau Public site, modified Template 12 v10.0.0.3 v10.1.2 EN
Our Roy and Boucher Family Ken Roy Public site, modified Template 4
Installed without Show Mod Names
10.0.0.4a 11.1.0 EN
Martius family Hendrik Martius Half public 12.0.0.4a 12.0.1 DE, EN, FR, NL