Inner Mod Menus

From TNG_Wiki
Revision as of 13:32, 6 May 2020 by Robinrichm (talk | contribs)
Jump to navigation Jump to search
Construction Inner Mod Menus should be used with appropriate caution since the page is still under construction and information may be incomplete Construction


This article describes an optional utility mod that does not change any TNG program, but rather installs PHP libraries (i.e. Include files consisting of functions that are called by a parent program) that implement functionality specified by other mods.

As of May, 2020, my mods are in transition from a shared version of the Inner Mod Menu libraries that was automatically installed with each mod. I am transitioning to this standalone mod because it turned out to be too hard to update the automatically-installed shared libraries. The "Related Mods" and "Installation" sections of each mod's Wiki article tell which type of library that mod uses, and thus whether rely on the Show Inner Mod Menu mod. In any case, you never have to install Show Inner Mod Menus.

Finally, though any mod programmer could implement Inner Mod Menus, practically speaking, they are only used in my mods. Thus, I will break Wiki conventions and use first person pronouns in this article.

- Robin Richmond 5 May 2020
Inner Mod Menus
Summary Provides PHP function libraries that create and display "Inner Mod Menus" and "New Tab Flags" in programs that been modified by numerous other mods. This mod does not modify any TNG programs; it simply installs the code that numerous other mods call to create Inner Mod Menus and New Tab Flags in the programs that they modify.
Validation
Mod Updated 5 May 2020
Download link v12.0.0.1
TNG 12.0
Download stats
Author(s) Robin Richmond
Homepage This page
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod 12.0.0.1
Min TNG V 12.0
Max TNG V 12.3
Files modified
English cust_text.php; Installs rr_innermodmenu_lib.php, rr_innermodmenu_newtabs.php, rr_rrrrcemeteriessearch_ajx.php, rrcemeteriessearch_lib.php;
May Install rrshared_innermodmenu3.php, rrshared_modsettingsblocks3.php, rrshared_wikilogo.gif
Related Mods
Notes


Purpose of the Mod

To allow other mods to display

  1. "Inner Mod Menus", which provides handy information about what a mod does to a particular program and handy access to the mod's options, and
  2. "New Tab Flags", which make it easy to see when new tab-menu tabs have been added by a mod, and to identifythe mod that installed them.
  1. "Inner Mod Menus", which provides handy information about what a mod does to a particular program and handy access to the mod's options, and
  2. "New Tab Flags", which make it easy to see when new tab-menu tabs have been added by a mod, and to identify the mod that installed them.

Inner Mod Menus

An "Inner Mod Menu" is a drop-down menu that some mods add to programs that they change in some significant way. The idea is to provide handy reference to information about the mod and handy access to the mod's options. Significantly, Inner Mod Menus are only visible to TNG admins, never to end-users. Most of my Admin mods generate Inner Mod Menus, whereas Inner Mod Menus appear in only a few end-user programs.

Inner Mod Menus can contain links to

  1. The mod's Wiki article,
  2. The section of the Wiki article that describes mod options,
  3. A direct link to the mod's options, if the options are defined in a Mod Settings Block
  4. A popup window that succinctly describes what the mod has changed in the program.

All but the first of these possible menu items are optional; the second and third only exist if the mod has options, and the fourth exists only if the mod programmer has created such a description.

Inner Mod Menus are floated to the right end of the standard TNG "Inner Menu", which is the light-on-dark link menu immediately below the standard Tab Menu. The menu label from which an Inner Mod Menu drops down is "Mod Information".

The term "Inner Mod Menu" is, in sense, defined at two levels in that

  • Mods are said to define an Inner Mod Menu when they call an Inner Mod Menu library function to specify any of the four Inner Mod Menu links listed above.
  • If more than one mod "defines an Inner Mod Menu" in same program, only one Inner Mod Menu will be present on the program's web page. Each mod's Inner Mod Menu list will appear in that consolidated drop-down menu. Each mod's name is a heading under for that mod's menu entries.

Inner Mod Menus drop down from the label "Mod Information" that is floated to the right of a program's "innermenu" - the standard horizontal link menu that is immediately below the tab menu. Essentially all of TNG's Admin programs have innermenus, but only a few end-users have them. Here is an example of an Inner Mod Menu in the Places Search program, admin_places.php, which has been affected by three mods. Only one of the three mods has mod options.

Show inner mod menus.jpg

Mods define Inner Mod Menus in programs that they modify "significantly". For instance, Admin Places Copy installs a new program that copies Place records from one site to another, and adds a "Copy" tab to the tab menu in the other Admin>>Places program. So Admin Places Copy would define an Inner Mod Menu in the copy program that it creates. But since all it does in the other Admin>>Places programs is install a new tab, it won't define Inner Mod Menu links in them..

New Tab Flags

New Tags Flags do just what the name implies - they highlight the fact that a new tab has been created by a mod, and allow the user to see which mod installed the new tab. The flag is an asterisk, and the mod name is displayed when the user hovers over the asterisk, like this:

Show inner mod menu-newtab1.jpg

Mod Settings Blocks

Mod Settings Blocks are another mod management tool that was developed in conjunction with Inner Mod Menus. When I put mod options in Admin>>Setup program, I use Mod Settings Blocks to place an outline around the each mod's options so that it is easy to see which options come from a given mod.

Mod Settings Blocks are also defined so that hyperlinks to the relevant Admin>>Setup program can focus on a specific Mod Settings Block. That is, hyperlinks with specific querystring parameters will

  • Automatically open the subform that contains the target options, and
  • Display only that Mod Settings Blocks; no other other options.

Mod Settings Blocks are related to Inner Mod Menus only in that

  • They both deal with mod options,
  • They were developed at the same time, and both were initially implemented as shared automatically-installed libraries that were distributed with each mod that used them, and
  • Inner Mod Menus know how to link directly to a Mod Settings Block.

A Mod Settings Block is illustrated in the Visualizations below, and described in more detail in their own Mod Settings Blocks Wiki article.

Mod Options

none

Conflicts

This mod does not, by its very nature, conflict with any other mods in the installation of the mod. There is a functional conflict in that two Inner Mod Menus will appear in a TNG program if

  • more than one mod defines an Inner Mod Menu in a given program, and
  • the installed version of those mods mods do not all use the same type of Inner Mod Menu library (meaning the libraries from this mod vs the shared, automatically installed libraries),

However, in all cases where more than one mod defines an Inner Mod Menu in a given program, the latest version of all of those mods use the same type of Inner Mod Menu libraries. Thus, this functional conflict can only occur if a TNG site administrator has not installed compatible versions of the mods that affect a given program

(For example, Admin Branches and Admin Branches Queue both affect admin_branches.php, and both define Inner Mod Menus in admin_branches.php. The latest version of each of these two mods rely on this mod to display the Inner Mod Menu, but older versions contain the shared libraries.

  • If the newest versions of these two mods are both installed, only one consolidated Inner Mod Menu will be displayed.
  • If older versions of each mod are installed, and both of the older versions uses the shared libraries, then only one consolidated Inner Mod Menu will be displayed.
  • But if the latest version of one of the mods and an earlier version of the other are installed, two Inner Mod Menus will be displayed in admin_branches.php.

Related Mods

Here are some of the mods that use (or soon will use) the Show Inner Mod Menus libraries to display their Inner Mod Menus. (Since mods are being actively transitioned from the old shared Inner Mod Menus libraries to the new standalone libraries installed by Show Inner Mod Menus, I'm not really going to try to keep these lists up to date.)

Installation

Files Installed

  • rr_innermodmenus_lib.php - The library that implements Inner Mod Menus
  • rr_innermodmenus_wiki.gif - A stylized "W" icon that is used as a link to a mod's Wiki article in Inner Mod Menus
  • rr_innermodmenus_newtab.gif - The library that implements flags in new tab menu tabs.

[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

This screen clip shows the Inner Mod Menu in admin_places.php, where the New Tab Flag highlights a tab that was created by the Placename Format mod. The Inner Mod Menu reveals that Placename Format did not define Inner Mod Menu links here, since all it did to admin_places.php was to add new tabs. (It turns out that two of the tabs in this screen clip were added by Placename Format.)
Show inner mod menu-newtab3.jpg
This screen clip illustrates the Inner Mod Menu in the Place Levels program, which is launched from the "Levels" tab in the previous screen clip. Here, the Placename Format mod is definitely significant, so Placename Format has defined an Inner Mod Menu. However, Placename Format does not define any mod options1, so the only links you see here are the always-present link to the Wiki article, and a link that pops up information about what the mod has done to this program.
Show inner mod menu-newtab4.jpg

1 Well, the Placename Format mod does have options, but they are defined in a completely different way that most mod options. Actually, as you might guess from the presence of the "Name Options" tab in the screen clip above, the Placename Formatting options are defined in that page. Inner Mod Menus specifically link to mod options that are defined in Mod Settings Block

A Mod Settings Block

A lot of my mods have mod options, and, so far, at least 23 of those mods defined Mod Settings Blocks. Most of them are in Admin>>Setup>>General Settings, where, to avoid getting in the way of the native TNG options, they are in a new subform named "Robin's Mods". This screen clip illustrates is a fairly typical Mod Settings Block that has been opened by itself, perhaps from an Inner Mod Menu link.

Admin cemeteries search-after-modsettingsblock.jpg

Revision History

Mod Version TNG Version Date Note
v12.0.0.1 12.0-12.3 14 Apr 2020 Initial release.

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 12.0.0.1 12.3 English