Difference between revisions of "Show Mod Names"

From TNG_Wiki
Jump to navigation Jump to search
Line 20: Line 20:
 
| __TOC__
 
| __TOC__
 
|}
 
|}
if not all, mods Actually, [[Show Mod Names]] does not just reveal '''the mods that affect the running program'', it also reveals ''the TNG PHP files that have been modified and are used by the running program''.  For example, the [[TextPlus Charts]] mod '''installs'' two new programs (pedigreetextplus.php and descendtextplus.php), and modifies all of the other standard Pedigree and Descendancy charts so that they have links to the new Text+ Chart programs.
 
 
 
== Purpose of the Mod ==
 
== Purpose of the Mod ==
 
To display a list of the ''compliant'' mods that affect a particular program. This mod doesn't do anything by itself; it just installs code that can be used by other mods.  It exists as a separate mod only so that each mod that wants to use this new mod-listing scheme doesn't have to install the necessary code redundantly.   
 
To display a list of the ''compliant'' mods that affect a particular program. This mod doesn't do anything by itself; it just installs code that can be used by other mods.  It exists as a separate mod only so that each mod that wants to use this new mod-listing scheme doesn't have to install the necessary code redundantly.   

Revision as of 20:21, 19 July 2016

Show Mod Names
Summary A utility mod that doesn't change any programs by itself, but rather installs an include file that is used by other mods to reveal to admins (and potentially all users) the names of (some) mods that affect the running TNG programs.
Validation
Mod Updated {{{mod_last_update}}}
Download link For
TNG 11.0
TNG 10.0
show_mod_names_v10.0.0.3.zip
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod 10.0.0.3
Min TNG V 10.0
Max TNG V 11.0.1
Files modified
css/cust_text.css, genlib.php, creates showmodnames.php
Related Mods
My mods that require this mod are flagged on my Wiki home page
Notes


Purpose of the Mod

To display a list of the compliant mods that affect a particular program. This mod doesn't do anything by itself; it just installs code that can be used by other mods. It exists as a separate mod only so that each mod that wants to use this new mod-listing scheme doesn't have to install the necessary code redundantly.

Show Mod Names doesn't require users of an affected TNG program to do anything different, and end-users typically don't see anything different at all. Site admins who a run a program that uses Show Mod Names simply see a button that says "Show Mods", and can click on that button to see a list of compliant mods that affect that program.

You should install this mod only if you install one or more other mods that say they depend on this mod. (Or, in practice, you should install this mod if and only if you install any of Robin Richmond's mods.)

This mod (and the overall mod-reporting scheme behind it) is motivated primarily by the fact that when mod developers go to a TNG site to track down a possible mod problem it is often not clear which mods (and which versions) affect the program they are checking out. Although TNG Mod Manager does a good job of listing which versions of which mods are installed, and its Analyzer shows which mods affect which TNG files,

  1. It is only available to the administrator of a site, and
  2. It does not show which mods affect the function libraries used by a program.

Show Mod Names, on the other hand, lists

  1. The mods that affect the files used by the running program, and
  2. The files that those mods affect and that are used by the running program.

So it can work in conjunction with the Mod Manager.

This mod can also be useful for TNG site administrators as a reminder of which mods affect a given program, as it is not easy to remember exactly which features of a program are "pristine" and which are the result of mods.

This mod, and the mod-registration scheme behind it ARE NOT anything close to a TNG standard or convention. I have attempted to implement and document it so that it could be used more widely, but, in truth, I don't know of any other mod programmers who are considering using this scheme.

Mod Parameters

The three mod parameters determine how visible the mod list is to users.

  1. $showModNamesAtAll determines whether the running program will try to display the mod names on the screen, or just write them to an HTML comment. If it is false, the mod names will always be written to an HTML comment, and will never affect the visible output of any program. It defaults to true.
  2. $showModNamesAdminOnly determines whether to display mod information only only to administrators. When it is true, the code will not affect the output of programs run by non-admins. (Note that this parameter's value doesn't matter if the first parameter value is false.) It default to true.
  3. $showLinkToModNames causes the list of mods to be hidden behind a button. (Again, this parameter's value doesn't matter if the first parameter value is false.) It defaults to true.

With the parameters' default values:

  • End users never see information about the mods that affect the program they are running, since the list of mods is placed in an HTML comment.
  • Administrators see just a "Show Mods" button in the program footer, and can click on that button to see the list.

Compatibility And Dependencies

No known conflicts. This mod is not dependent on any other mod, but several mods are dependent on it.

Installation

  1. Uninstall previous version of this mod.
  2. Backup css/genstyle.css, the only distributed file affected affected by this mod.
  3. Download the .zip file and 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.

In the event of a problem

  1. Try using the Mod Manager Remove capability
  2. Contact the mod author through My Mod Support form.

Visualization of this Mod

AFTER:
With the default parameters, there is no visible effect to end-users, but admins will see this button in the footer of pages produced by programs that have been affected by mods that implement the Show Mod Names scheme. The list of mods can be made more or less visible through the mod parameters described above.
When admins run end-user programs that use this mod (and that have a template-controlled footer), they will see this button at the very body of the content area of the page:

Show mod names-after-enduser.png

Admin programs that use this mod will display the button on the left side of the page footer.

Show mod names-after-admin.png

Here's how an admin program footer might look after the button is clicked. The version of each mod is shown, and each mod name is a hyperlink to the mod's Wiki article.

Show mod names-after-expanded.png

Then, as you mouse over one of the mod names, you can see
  1. The hyperlink to the mod's Wiki page, and
  2. The mod's Title text, which lists the files that the mod edits, and possibly the PHP function(s) within a file.

Show mod names-after-mouseover.png
There are two pop-ups in this illustration,

  1. The address of the target page (i.e. the mod's Wiki article) on the left, and
  2. The list of files affected by the mod and used by this program:
    • admin_gedimport.php,
    • gedimport_misc.php,
    • The function ClearData in gedimport_trees.php.

Remember that the selected mod might modify other TNG files, but if those files are not used by the running program, then Show Mod Names won't know anything about them and won't list them.

Programmer Documentation

(I have moved the programmer documentation to a separate Wiki article.)

Mod Change History

Mod Version TNG Versions Date Note
10.0.0.3 10.0-11.0.1 18 Jul 2016 The "Show Mods" button does not print, since it is superfluous when printed. Also tweaked the style classes added to genstyle.css so that I could use them in other mods.
10.0.0.2a 10.0-11.0 20 Mar 2016 Tested in TNGv11 and fixed a couple of glitches - It wouldn't display, hide, and then display the mod names again, and there was a possible inaccurate warning message.
10.0.0.2 10.0-10.1.3 13 Feb 2016 Completely rewritten to use an include file (and include_once), to write the mod names to an HTML comment in most case, and to require the installation of Show Mod Names
10.0.0.1 10.0-10.1.3 6 Dec 2015 New mod.

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 Robin Richmond Mod developer 10.0.0.3 11.0.1 English
MOTYER Family Genealogy John Mark Motyer Public site see here see here EN, DE, RU
R G Strong Family Genealogy Russell Strong Public site 10.0.0.2b 11.0.0 EN, DE, FR, NL