== Purpose of the Mod ==
To generate a list of mods (really just my mods) that affect a particular program while it is running.
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 uses this new mod-listing scheme doesn't have to install the necessary code redundantly.
Note that, when this mod is installed with the default mod parameter values,
- Non-admin programs won't look any different at all, since the list of mods that affect such programs is simply generated as an HTML comment.
- Some small "information buttons" in administrative programs are formatted (a blue circle around an i). It 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 utilize this mod. (Or, in practice, you should install this mod if you install any of Robin Richmond's mods or a mod from other mod programmers who are using this scheme.)
This mod (and the overall mod-reporting scheme behind it) is motivated primarily by this problem:
When mod developers go to a TNG site to track down a reported 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 potentially affect which TNG files,
- It is only available to the administrator of a site, and
- It does not show which mods affect the function libraries used by a program.
Show Mod Names, on the other hand, lists
- The mods that affect the files used by the running program, and
- The files that those mods affect and that are used by the running program.
So Show Mod Names supplements the information provided by the Mod Manager.
Show Mod Names can also be useful for TNG site administrators as a simple 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. Currently there are few mod programmers who are using this scheme.
Compatibility And Dependencies
No known conflicts. This mod is not dependent on any other mod, nor is any mod dependent in it. But almost all of my mods can utilize the functionality of Show Mod Names if and only if Show Mod Names is installed. Remember that there is no benefit to installing this mod unless you also install one of my mods that uses it or a mod from other mod programmers who are using this scheme.
The three mod parameters determine how visible the mod list is to users.
- $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.
- $showModNamesAdminOnly determines whether to display mod information 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 defaults to true.
- $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.
[Show Installation Details]
- A working TNG installation.
- An installed current version of the Mod Manager.
- You should backup files listed in the panel on the right.
- Remove and delete previous version of this mod.
- Backup the files updated by this mod. They are listed in the panel at the upper right.
- Download the .zip file, Extract its .cfg file to the mods folder.
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.
- Try using the Mod Manager Remove capability
- Contact me through My Mod Support form.
| End Users|
With the default parameters, there is no visible effect to end-users, but admins will see a "Show Mods" button in the footer of pages produced by programs that have been affected by mods that use Show Mod Names. The list of mods can be made more or less visible through the mod parameters described above.
| Admins running end-user Programs|
When site admins run end-user programs that use this mod (and that have a template-controlled footer), they will see the "Show Mods" button at the very bottom of the content area of the page. This screen shot shows the bottom of a page using Template 5.
| Admin Programs|
Admin programs that use this mod will display the button on the left side of the page footer.
| After clicking the "Show Mods" Button|
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.
| Hovering over a Mod Name|
As you mouse over one of the mod names, you can see
- The hyperlink to the mod's Wiki page, and
- The mod's Title text, which lists the files that the mod edits, and possibly the PHP function(s) within a file.
There are two pop-ups in the illustration just above,
- The address of the target page (i.e. the mod's Wiki article) on the left, and
- The list of files affected by the mod and used by this program:
- 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.
(See the Wiki article Show Mod Names Programmer Documentation.)
| Mod Version
|| TNG Versions
|| 25 Oct 2018
|| Brought into compliance with TNGv12, and changed the named of the installed file to be consistent with my naming conventions.
|| 11 Jan 2018
|| Removed the second line from the cust_text.php target location search string
|| 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.
|| 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.
|| 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
|| 6 Dec 2015
|| New mod.
Sites using this mod
If you download and install this mod, please add your TNG site to the table below:
| Local Host
|| Great for identifying Mods affecting a page. Used in my local Mods and added to some published Mods.
| Woking Family Tree Project
|| Pete Smee