Difference between revisions of "Inner Mod Menus"

From TNG_Wiki
Jump to navigation Jump to search
(Replaces the template)
 
Line 37: Line 37:
  
 
== Mods with Inner Mod Menus ==
 
== Mods with Inner Mod Menus ==
Almost all of my Admin mods (starting in August, 2019) create (or will create) Inner Mod Menus in one or more of the programs that they modify or install. In mid-September, 2019, this includes [[Admin Branches]], [[Admin Cemeteries Search]], [[Admin Cemetery Edit]], [[Admin Languages]], [[Admin Media Predefined Search]], [[Admin Media Search]], [[Admin Thumbnails]], [[Admin Places Date]], [[Admin Places Geocode]], [[Admin Places Search]], [[Admin Reports Search]], [[Gedcom Import Mediatype]], and [[Place Edit-Cemeteries]].
+
Almost all of my ''Admin mods'' (starting in August, 2019) create (or will create) Inner Mod Menus in one or more of the programs that they modify or install. In mid-September, 2019, this includes [[Admin Branches]], [[Admin Cemeteries Search]], [[Admin Cemetery Edit]], [[Admin Languages]], [[Admin Media Predefined Search]], [[Admin Media Search]], [[Admin Thumbnails]], [[Admin Places Date]], [[Admin Places Geocode]], [[Admin Places Search]], [[Admin Reports Search]], [[Gedcom Import Mediatype]], and [[Place Edit-Cemeteries]].
  
At some point in time, these mods may also implement Inner Mod Menus: [[Admin Places Copy]], [[Admin Settings Save All]], [[Admin Users-More]], [[Gedcom Converter]], [[Gedcom Import Name Fixes]], [[Gedcom Import Purge]], [[Branch Timestamps]], [[Mod Manager Compare]], [[Mod Manager Latest]], [[Placename Format]], [[Reports-Floating Editor]]
+
Other mods that will have Inner Mod Menus include [[Admin Users-More]], [[Gedcom Converter]], [[Gedcom Import Name Fixes]], [[Gedcom Import Purge]], [[Branch Timestamps]], [[Mod Manager Compare]], [[Mod Manager Latest]], [[Placename Format]], and [[Reports-Floating Editor]].
 
 
(Note that some of the mods in the list just above have not yet been published at all, and who knows, other mods that do not exist yet may wind up with Inner Mod Menus.)
 
  
 
== See Also ==
 
== See Also ==
 
* [[Mod Settings Blocks]]
 
* [[Mod Settings Blocks]]
 
* [[User:Robinrichm#My_Mods|Robin's Mods]]
 
* [[User:Robinrichm#My_Mods|Robin's Mods]]

Revision as of 15:10, 13 September 2019

What They Are

An "Inner Mod Menu" is a drop-down menu that some mods add to right end right end of the standard TNG Inner Menu of Admin programs. An Inner Mod Menu contains links to resource that describe mods that affect the program that contains the Inner Mod Menu.

The notion of an Inner Mod Menu was devised by Robin Richmond, and is implemented in his (my) new and updated Admin mods, beginning in August 2019. The mods subfolder described below contains an HTML file with programmer documentation.

Each Inner Mod Menu drops down from the label "Mod Information" in a program's Inner Menu. Note that if multiple mods create Inner Mod Menus in the same program, the menus' links are combined into one Inner Mod Menu. Here is an example of an Inner Mod Menu in the Places Search program, admin_places.php, which has been affected by three mods.

Inner mod menu.jpg

For each mod in an Inner Mod Menu, there can be up to four hyperlinks, to:

  1. The mod's Wiki article
  2. The Wiki article's "Mod Options" section
  3. The options editor (typically at Admin>>Setup>>General Settings)
    • This link opens the appropriate Admin>>Setup form, and, in many case, also opens the subform (e.g. Admin>>Setup>General Settings>>Misc), and displays only that mod's settings.
  4. The program's Help File, opened to a section that describes what the mod has changed.

Links 2 and 3 exists only if the mod has options, and link 4 exists only if I have created such content in the program's help file.

When do mods define Inner Mod Menus?

The idea is that mods will 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 new copy program, but there would generally be no reason for it to define an Inner Mod Menu in the other Admin>>Places programs.

Implementation

The code that actually creates an Inner Mod Menu when a TNG program is executed, is in PHP Include file that is shared by, and can be installed by, all mods that implement an Inner Mod Menu. The ability for multiple mods to share files was made possible by the Mod Manager "Protected Flag" that was introduced with in TNGv12. The Protected Flag

  • Suppresses errors that would ordinarily be caused if a file being installed by a mod already exists,
  • Prevents the installed copy of the file from being overwritten, and
  • Suppress the deletion of the file when the mod is Uninstalled.

The Inner Mod Menu Include file is distributed in the zip file of every mod that needs it, and, in every case, it is stored in a mods subfolder named rrshared_innermodmenu_v# (where v# is, of course, in the form v12.0.0.1). Since the Inner Mod Menu subfolder has the same name in every mod, that subfolder will exist only once in the Mods folder structure in a given TNG site (no matter how many mods that contain that subfolder are downloaded to that site.)

The files that are installed from rrshared_innermodmenu_v# are

  1. rrinnermodmenu1.php (where '1' is a version number that corresponds to the last part of the subfolder's version number), and
  2. rrshared_wikilogo.png:img/rrshared_wikilogo.png, which is placed in the img/ subfolder, and which is the stylized "W" icon (shown in the screen clip above) that serves as a link to a TNG Wiki article.

Files that already exist

If you have already downloaded a mod that implements mod settings this way, the shared folder will already exist in your Mods folder structure. As a result, when you unzip or copy another mod that uses the shared subfolder, you may see a warning that a file or subfolder already exists. You can essentially ignore that warning, and can overwrite the files or not.

Mods with Inner Mod Menus

Almost all of my Admin mods (starting in August, 2019) create (or will create) Inner Mod Menus in one or more of the programs that they modify or install. In mid-September, 2019, this includes Admin Branches, Admin Cemeteries Search, Admin Cemetery Edit, Admin Languages, Admin Media Predefined Search, Admin Media Search, Admin Thumbnails, Admin Places Date, Admin Places Geocode, Admin Places Search, Admin Reports Search, Gedcom Import Mediatype, and Place Edit-Cemeteries.

Other mods that will have Inner Mod Menus include Admin Users-More, Gedcom Converter, Gedcom Import Name Fixes, Gedcom Import Purge, Branch Timestamps, Mod Manager Compare, Mod Manager Latest, Placename Format, and Reports-Floating Editor.

See Also