Living Color Mod

From TNG_Wiki
Jump to navigation Jump to search
Ambox notice.png Living Color has been tested with other popular mods and no conflicts have been noted. If you encounter a clash with other mods on your website, please provide the details and we will look into it.
TNG 8.1.2


Living Color Mod
Summary Displays names of living persons in selected color on personal and family group sheets.
Validation n/a
Mod Updated {{{mod_last_update}}}
Download link living_color_v812g.zip
Download stats {{{download_stats}}}
Author(s) Rick Bisbee
Homepage Bisbee Family Connection
Mod Support TNG Forums
Contact Developer Support for Living Color Mod
Latest Mod 8.1.2b
Min TNG V 8.1.2
Max TNG V 8.1.2
Files modified
globallib.php, genlib.php, getperson.php, familygroup.php, search.php, admin_people.php, admin_families.php, showreport.php
Related Mods
None
Notes
Very easy to configure and use.


Introduction

When you are logged in as Admin it is impossible to tell at a glance if a person is flagged as living without going into the Edit tab. It is important because all those not flagged as living may have vital information shown to unregistered visitors. This mod affects all TNG pages by setting the names of everyone flagged as living to a color of your choice. The default is dark red, but you can change the color in the Mod Manager editor via the TNG Admin page. You can also determine who will be allowed to see living persons in the chosen color. By default it is Admin only, but you can set it to be visible to any logged in user who is permitted to see living persons. Note that this modification has only been tested in TNG v8.1.2.

CAUTION: TNG families also have a 'living' flag which serves to limit information shown to the public about marriages. Living Color on family group sheets or in family search lists only reflects the status of a person's 'living' flag and says nothing about the state of family/marriage 'living' flags.

Modifications to Distributed Files

We've been getting requests to extend Living Color to more and more pages. After looking at it, I've decided to re-engineer the mod to add Living Color to virtually all TNG pages. In the course of doing that, we have reduced the number files modified and lowered the likelihood of conflicts with other mods. We now set up some global variables in globallib.php to determine if user has living color privileges, then modify a function that constructs all TNG names to style them if privileged/living. We modify a function in genlib.php to strip styling from names used in page titles, and we modify admin_people.php and admin_families.php to add the 'living' flag to database record fetches.

It would be prudent back up the affected TNG script files before installing any mod.

Revision History

I apologize for this flurry of initial file updates. When I made Living Color universal, it introduced a few subtle bugs that took a few days to find. There may be more but we'll continue to update as we become aware of them. Thanks for all your patience and support.

Version Date Contents
v8.1.2g 15 Aug 2011 Deconflicted with Deceased Icon mod; included What's New page.
v8.1.2f 13 Aug 2011 Fixed a few bugs, reduced it's impact on TNG scripts, and made it a bit more bullet-proof.
v8.1.2e 11 Aug 2011 Fixes a bug on family edit page, where if you added a parent by personID it showed the styling tags as part of the name. Also fixed the alt text for small photos in family group sheets to remove styling tags.
v8.1.2d 10 Aug 2011 Adds living color to virtually all pages and lists
v8.1.2c 9 Aug 2011 Adds living color to individual and family search lists
v8.1.2b 2 Aug 2011 Adds living color to descendant charts
v8.1.2a 29 Jul 2011 Initial release of Living Color Mod

Visualizations

User's Page View

This is how part of a page might appear with Admin or View living persons privilege. Bear in mind, the color simply shows that the living flag is set.

Lc001.jpg

The example above is shown with the Child Descendant Indicator Mod by Chuck Filteau that replaces the greater-than symbol (>) with the more traditional plus sign (+) to indicate that a person has children.

Mod Manager

After the Living Color Mod is successfully installed, one of the items listed in the Mod Manager will look something like this.

Lc003.jpg

To change the program parameters, click on Edit.

Mod Manager Editor

The Mod Manager editor presents two program parameters for editing. The first sets the color of the text for a living person's name. The color can be expressed as a hex color code (e.g., #008080) or as a color constant (e.g., blue). In either case, do not surround the parameter with quotes. The second parameter sets access, either for just the Admin (default), or else for all users who have been granted View living persons privilege. After changing one or both values, click on Confirm Edit to save your preferences. Clicking on Read Existing Values from TNG files followed by Confirm Edit resets both values to their defaults as shown in parentheses.

Lc002.jpg

Requirements

  • A working TNG v8.1.2 installation
  • A copy of living_color_v812.cfg

Automated Install

  1. Remove previously installed version.
  2. Download the zipped config package: living_color_v812g.zip
  3. Unzip the config file and place it in the /mod folder.
  4. Click on Mod Manager in the Admin panel and install it.
  5. In the Mod Manager listing for this mod, click on Edit and change the color and access parameters as desired.

Manual Installation

Manual installation is not supported.

Side Affects

The names shown in 'living color' are also links, but they will no longer change their color when you hover over them as do your normal links.

Acknowledgements and Disclaimer

Thanks to Ken Roy for his assistance and always helpful suggestions. Also kudos to Bryan Larson and Rob van Rij for suggesting useful extensions.

As always, use this script at your own risk. The author will not be responsible for any damage to your website resulting from its use.