Changes

Jump to navigation Jump to search
v4
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 {{Tv1010}}{{Tv100}}<br />[[Media:hide_branch_names_v10.0.0.3.zip|hide_branch_names_v10.0.0.3.zip]]
+
| download_link  =  {{Tv100}}<br />[[Media:hide_branch_names_v10.0.0.4.zip|hide_branch_names_v10.0.0.4.zip]]
 
| download_stats  =
 
| download_stats  =
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
Line 9: Line 9:  
| 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.3
+
| mod_version    = 10.0.0.4
 
| min_TNG_ver    = 10.0
 
| min_TNG_ver    = 10.0
| max_TNG_ver    = 10.1.1
+
| max_TNG_ver    = 10.1.3
 
|  TNG_file_list  = getperson.php
 
|  TNG_file_list  = getperson.php
| related_mods  = none
+
| related_mods  = [[Show Branch Members]], [[Show Mod Names]]
 
| notes    =   
 
| notes    =   
 
}}
 
}}
Line 23: Line 23:     
== Purpose of the Mod ==
 
== Purpose of the Mod ==
In the person profile, shows all branch names assigned to the individual being profiled only if the user is an administrator. If a user has a branch restriction, the person profile shows only matching branches.
+
In the Person Profile, this mod limits the visibility of the branches to which an Individual is assigned.
 +
# Administrators see all branch names assigned to all Individuals.
 +
# 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, but only their branch only. That is,
 +
#* If an Individual has 3 branches, including the one assigned to the current user, only the user's branch is shown.
 +
#* If an Individual has one or more branches, bot not the one assigned to the current user, no branches are shown.
    
== Mod Parameters ==
 
== Mod Parameters ==
The one parameter can suppress the display of matching branches for non-administrators with branch restrictions.  When the parameter is turned off, only administrators will see branch names in the person profile.
+
The one parameter allows logged-in users with a branch assignment to see the branch assignment of people 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==
 
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.
 
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.
   −
==Requirements==
+
==Related Mods==
* A working TNG installation.
+
# 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.  
* An installed current version of the [[Mod Manager]].
+
# [[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.
* You should backup files listed in the panel on the right.
     −
==Automated Installation==
+
==Installation==
# Remove and delete previous version of this mod.
+
# Remove previous version of this mod.
# Backup the files updated by this mod.  They are listed in the panel at the upper right.
+
# Backup the getperson.php, the only file affected by this mod.
# Download the .zip file, Extract its .cfg file to the mods folder.
+
# 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]].
 
# Follow the normal automated installation for Mod Manager, as shown in the example [[Mod Manager - Installing Config Files]].
   Line 57: Line 61:  
The branch name is now invisible to non-administrators and to users not restricted by a matching branch.
 
The branch name is now invisible to non-administrators and to users not restricted by a matching branch.
 
| [[Image:hide_branch_names-after.png]]
 
| [[Image:hide_branch_names-after.png]]
 +
|-
 +
| colspan="2" | <span style="color: red">'''AFTER:'''</span>
 +
If you have installed [[Show Mod Names]], this mod will join other compliant mods in a message at the bottom of the page.
 +
|-
 +
| colspan="2" style="text-align:right;" | [[Image:person_profile_modlist.png]]
 
|}
 
|}
   Line 66: Line 75:  
! Date
 
! Date
 
! Note
 
! Note
 +
|-
 +
| 10.0.0.4
 +
| 10.0.0-10.1.3
 +
| 6 Dec 2015
 +
| - Uses the mod name display functionality defined by [[Show Mod Names]]<br/>
 +
- Reworked code to be compatible with [[Show Branch Names]]<br/>
 +
- Avoids database calls, thus removing any need to deal with TNGv10.0 vs 10.1.
 
|-  
 
|-  
 
| 10.0.0.3
 
| 10.0.0.3
Line 71: Line 87:  
| 11 Jul 2015
 
| 11 Jul 2015
 
| - Followed Ken Roy's suggestion to use the code<br/>($allow_edit && $allow_add && $allow_delete && !$assignedtree)<br/>to determine whether the user is an administrator.<br/> - Added the option to display matching branches to users who have a branch restriction.<br/> - Put the word "Branches" in front of the branch names.<br/> - Includes conditional code to allow a SQL statement to be executed in TNG v10.0 or v10.1
 
| - Followed Ken Roy's suggestion to use the code<br/>($allow_edit && $allow_add && $allow_delete && !$assignedtree)<br/>to determine whether the user is an administrator.<br/> - Added the option to display matching branches to users who have a branch restriction.<br/> - Put the word "Branches" in front of the branch names.<br/> - Includes conditional code to allow a SQL statement to be executed in TNG v10.0 or v10.1
|-
  −
| 10.0.0.2a
  −
| 10.0.0-10.1.1
  −
| 1 Jul 2015
  −
| No functional changes. Just simplified the comments.
   
|-  
 
|-  
 
| 10.0.0.2
 
| 10.0.0.2
 
| 10.0.0-10.1
 
| 10.0.0-10.1
 
| 26 Feb 2015
 
| 26 Feb 2015
| I was using the wrong TNG constant. v10.0.0.1 would hide branch names from non-administrators, but wouldn't display them for administrators.
+
| 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.1
'''Experienced'''
5,069

edits

Navigation menu