Changes

Jump to navigation Jump to search
2,735 bytes added ,  22:01, 26 February 2020
no edit summary
Line 5: Line 5:  
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.  
 
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.
+
== Shared Mod Libraries ==
 +
Inner Mod Menus and [[Mod Settings Blocks]] are "Shared Mod Libraries" (aka "Shared Mod Includes") that are implemented in several mods by Robin Richmond.  I (Robin) don't expect them to be used by other mod programmers (though they ''could be'').  Still, they are fundamental to enough of my mods that they need some Wiki documentation. And since they a really are tied to me, I'll take the liberty of using first person pronouns and my name in this documentation. I'm not very happy with this documentation, but I don't think that there will be enough interest in the implementation details to justify the time it would take to clean it up.  So take what you can from it, and contact me through [https:/www.robinrichmond.com/family/suggest.php my TNG contact form] if you need more information.
   −
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.
+
=== The Shared Subfolder ===
 +
Both "Shared Mod Libraries", plus a few files used in similar ways, are stored in one mods subfolder named <span style='white-space:nowrap'>'''RR-shared_mod_includess_vx.y.z.?'''</span>, where x.y.z is the standard TNG version number that is part of all mod .cfg files and subfolders, and '?' is a version number that matches the version number of the PHP file.
 +
 
 +
The shared mods libraries depend on a Mod Manager feature (new in TNGv12) called "protected files" to assure that there is just one copy of a library's Include file in a TNG site's main TNG folder, and that the Include file remains in the main TNG folder when a mod is uninstalled (since other mods that need it may still be installed.)
 +
 
 +
The shared subfolder (<span style='white-space:nowrap'>'''RR-shared_mod_includess_vx.y.z.?'''</span>) is packaged into the distribution file for every mod that uses either or both of the shared mod libraries. When the distribution file is unzipped, the shared subfolder will be copied to the site's mods folder, and may (without causing any problems) overwrite an existing (identical) copy of the shared subfolder.  Each mod ''tries to'' install the necessary shared mods library with a Mod Manager %copyfile command just as it would install any other file, except that these %copyfile commands use the "protected file" flag (a tilde), like this:
 +
<code>%copyfile:~RR-shared_mod_includes_v12.0.0.4/rrshared_modsettingsblocks4.php%</code>
 +
 
 +
The tilde assures that Mod Manager:
 +
# Will copy the file (as it would any file) if the file does not exist in the main TNG folder,
 +
# ''Will not'' copy the file if the file ''does already exist'' in the main TNG folder, and
 +
# Will not report any error if the file is either present or missing, but
 +
# Will display an information message noting whether the file exists and whether it was or wasn't copied.
 +
# Also, importantly, Mod Manager ''will not'' remove the file from the main TNG folder when the mod is uninstalled.
 +
 
 +
== Inner Mod Menus ==
 +
Inner Mod Menus provide a way for programs (especially Admin programs) that have been affected by a mod to give TNG admins easy access to information about the mod and its changes, and to the mod's options.
 +
 
 +
An 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.
 
<div>[[Image:inner_mod_menu.jpg]]</div>
 
<div>[[Image:inner_mod_menu.jpg]]</div>
   Line 37: Line 56:     
== 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. When I am done, this will include [[Admin Branches]], [[Admin Branches Queue]], [[Admin Cemeteries Search]], [[Admin Cemetery Edit]], [[Admin Languages]], [[Admin Media Predefined Search]], [[Admin Media Search]], [[Admin Media Thumbnails]], [[Admin Places Date]], [[Admin Places Geocode]], [[Admin Places Search]], [[Admin Reports Search]], [[Admin Users-More]], [[Gedcom Converter]], [[Gedcom Import Mediatype]], [[Gedcom Import Monitor]], [[Gedcom Import Purge]], [[Placename Format]], [[Regroup Person Profile]], [[Regroup Person-Date Place]], and [[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]].
      
== See Also ==
 
== See Also ==
 
* [[Mod Settings Blocks]]
 
* [[Mod Settings Blocks]]
 
* [[User:Robinrichm#My_Mods|Robin's Mods]]
 
* [[User:Robinrichm#My_Mods|Robin's Mods]]
'''Experienced'''
5,069

edits

Navigation menu