Difference between revisions of "Mod Settings Blocks"
(→Sites using this mod: formatting?) |
(→Sites using this mod: New site added at the end) |
||
Line 313: | Line 313: | ||
|13.1.2 | |13.1.2 | ||
|EN | |EN | ||
+ | |- | ||
+ | |[http://jarocinscy.pl/drzewo/index.php Baza danych Rodziny Jarocińskich] | ||
+ | | | ||
+ | | | ||
+ | |[https://tng.lythgoes.net/wiki/index.php/User:Mjaro Michał Jarociński] | ||
+ | |non-public site | ||
+ | |13.0.0.1a | ||
+ | |13.1.2 | ||
+ | |PL,EN | ||
|} | |} | ||
Revision as of 05:24, 11 December 2022
This article describes
- A technique that organizes a mod's configuration settings (i.e. mod options) into a bordered block (called a Mod Settings Block) in an Admin>>Setup program, and that labels that block with the mod name,
- A mod that, in TNG13, installs the code that all of my mods (with options) depend on to organize and display Mod Settings Blocks, and
- An Include-file-sharing technique that I developed for Mod Settings Blocks in TNG12, but that I have replaced with the Mod Settings Blocks mod for TNG13.
The latest version of this mod uses the guidelines for TNG v12+ cust_text.php files. If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]
If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:
[See details in the TNGv12 Change Impacts Article][Hide the instructions] |
|
Mod Settings Block - TNG13 Only | ||
---|---|---|
Summary | Defines fields in Admin>>Setup programs for numerous mod options, where each mod's options are enclosed in a distinctive "Mod Settings Block" | |
Validation | ||
Mod Updated | 28 Sep 2020 | |
Download link | v13.0.0.1a
| |
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 | 13.0.0.1a | |
Min TNG V | 13 | |
Max TNG V | 13 | |
Files modified | cust_text.php English & French; Installs: rrmodsettingsblocks.php, img/rrmodsettingsblock_wiki.gif | |
Related Mods | ||
Notes | All of my mods that have options depend on this mod |
Purpose of the Mod
Installs the PHP & Javascript code that creates and formats mod options for mods. Essentially all of my (Robin Richmond's) mod options now use Mod Settings Blocks rather that Mod Manager "%parameter%" tags, and are thus dependent on this mod.
Mod Settings Blocks
My mods options are defined (in Mod Settings Blocks) in the appropriate Admin>>Setup page, e.g.
- The options for Gedcom Import mods such as Gedcom Import Purge and Gedcom Import Mediatype are in Admin>>Setup>>Import/Export Settings,
- The options for chart mods such as Count Descendants and TextPlus Charts are in Admin>>Setup>>Chart Settings, and
- Most of my mod options are in Admin>>Setup>>General Settings.
Mod settings block can best be described by illustrations.
First, I'll note that enough of my mods define Mod Settings Blocks in Admin>>Setup>>General Settings that I have defined a new subform strictly for Mod Settings Blocks.
This screenshot show the first few of several Mod Settings Blocks the new subform in Admin>>Setup>>General Settings. The subform is called "Robin's Mods" in TNG12, and "Mod Settings Blocks" in TNG13. Depending on how many of my mods have been installed on a given site, there could be as many as a couple of dozen Mod Settings Blocks here.
- The Wiki logo (a stylized W) is a link to the mod's Wiki Article
- Each Mod Settings Block has its own "Save" button ("Save All" in TNG12), which, like the other "Save" buttons in the form, means "Save all options defined in this page, not just the ones that are visible".
Here is a single Mod Settings Block, displayed as the result of a link directly to that specific Mod Settings Block. The concept of a link directly to TNG options or TNG options subforms does not exist, but is is possible to link directly to a Mod Settings Block. In this example, a link directly to the Mod Settings Block for the Admin Cemetery Edit mod has automatically opened the new subform and displayed only the options for Admin Cemetery Edit, leaving all other subforms and all other Mod Settings Blocks hidden.
See also the section "Links to Mod Settings Blocks".
Mod Settings Blocks are non-standard in TNG, but have several advantages over conventional options defined by %parameter% tags in Mod Manager.
Advantages
The distinct advantages that Mod Settings Blocks have over options defined by native Mod Manager %parameter% directives are that the options in Mod Settings Blocks
- Can be defined through checkboxes, radio buttons, and selection boxes,
- Can be validate at the time they are entered,
- Can use Javascript as necessary to do things like disable an option that is not relevant when another option has a certain value,
- Can be composite values that are built from more than one form field,
- Can have pop-up help text that provides more information than typical mod parameter prompts,
- Can be combined with related options into tables and lists, and, notably
- Can be applied readily to more than one program, and even be used by programs modified by other mods.
In addition,
- Programs that are affected by mod options can have links (visible only to Admins) directly from those programs to the relevant Mod Settings Block. That is, if you see program behavior that is driven by an option, and you want to change that option, you don't necessarily have to close the program, return to the Mod Manger, edit the option there, and then return back to the program that is affected by the option.
- The prompts, labels, and descriptions for options in Mod Settings Blocks can be translated into languages other than English. (Well, of course, with classic Mod Manager parameters, a prompt can include text in more than one language, but the language cannot be driven by the TNG language setting. Instead, all of the languages have to be visible at the same time.)
Note that some mods do already define their mod options in Admin>>Setup pages, but those options are relatively hidden among all of the many TNG settings. With Mod Settings Blocks, the options for a mod are clearly distinguished from other mods' options.
Disadvantages
- Classic Mod Manager Parameters are more familiar
- Every classic Mod Manager Parameter necessarily can be set back to a default value, but only a few settings in Mod Settings Blocks can be reset to a default value. For many options, there's no particular need to reset to a default value, but there could be times when a site administrator wants to revert to a default value and the Mod Settings Block form field doesn't supply a reset option.
Mod Options
This mod has no options. It supports the mod options defined by numerous other mods.
Compatibility
This mod does not change any TNG programs. Rather, it installs an Include file that is used only by mods that define Mod Settings Blocks. There are therefore no incompatible programs.
Related Mods
- This mod is a prerequisite for all of my mods that have mod options, including, Add Name to PersonID, Admin Branches, Admin Media Search, Admin Places Search, Browsemedia Search Form, Cemetery Burials Table, Headstones Report, Mod Manager Latest, Regroup Person Profile, Regroup Person-Date Place, and at least a dozen more.
- Inner Mod Menus - This mod is sort of a companion to Mod Settings Blocks. Like Mod Settings Blocks, Inner Mod Menus does not do anything by itself, but rather installs code that supports features defined by other mods. Unlike Mod Settings Blocks, Inner Mod Menus is entirely optional; no mods depend on it. However, I believe that its functionality is extremely useful, and that it should be installed on sites that use my mods. Its connection with Mod Settings Block is that, in TNG pages that
- Define an Inner Mod Menu and
- Have been affected by a mod with mod option,
Inner Mod Menus link directly to the Mod Settings Blocks for the relevant mods. See #Links_to_Mod_Settings_Blocks below.
Installation
In TNG13, this mod uses the standard installation procedure, with a mod subfolder that installs two files:
- rrmodsettingsblocks.php - The code that supports Mod Settings Blocks that are defined by various mods.
- img/rrmodsettingsblocks_wiki.gif - An icon that links to a mod's TNG Wiki page from a Mod Settings Block
[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
- 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.
Problems?
- Try using the Mod Manager Remove capability
- Contact me through My Mod Support form.
Links to Mod Settings Blocks
There are two places in TNG applications where links take you directly to a single Mod Options block (as illustrated in the second screenshot at the beginning of this article).
- In Mod Manager, where I have contrived the "Edit Options" page to link directly to the mod's options. That is, Edit Options page looks very much like this:
File:Mod settings blocks-modmanageroptions.jpg - From an Inner Mod Menu]. Mods that significantly affect a TNG page or that have options that affect a TNG page can define an Inner Mod Menu, which pulls down from the "Mod Information" label at the right end of TNG's standard "inner menu", as in the Admin>>Places page: which has been affected by three mods, only one of which has mod options. The "Change Mod Options" link for Admin Places Search goes directly to the Mod Options Block for Admin Places Search:
(This screenshot, with the subform name "Robin's Mods" was taken from TNG12.)
Implementation
In TNG12, there is no Mod Settings Blocks mod. Instead Mod Settings Blocks are implemented by an Include file that is incorporated into every mod that defines a Mods Setting Block. To allow the Mod Settings Blocks code to be contained in (and installed by) multiple mods, the mods use a Mod Manager feature called "Protected Flags" to share the Include files. With the Protected Flag,
- There is just one copy of the protected file in the main TNG folder, no matter how many mods use it,
- The protected file can be installed by any mod that uses it,
- If a protected file has already been installed, other mods that share it do not generate "File installed" warnings, and do not describe the mods as "Partially Installed". Instead they remain "OK to Install", and
- The protected file is not removed from the main TNG folder when a mod that uses it is uninstalled. The protected file remain in place for other installed mods that depend on it.
This feature, and my implementation of it in TNGv12, is very handy, but it has turned out to be confusing to some site admins, and I have found it to be difficult to update shared files. The mod that I use in TNG13 is less automatic, but can be updated very easily, and all updates automatically apply to all installed mods.
TNG13-The Mod
Protected files are a very handy way to implement functionality that is shared among multiple mods, but it just turns out that they don't work especially well for the shared Mod Settings Blocks code. Thus, in TNG13, Mod Settings Blocks are formatted and displayed by code that is installed by the Mod Settings Blocks mod, which must be installed before any mods that use Mod Settings Block can be installed.
Revision History
Mod Version | TNG Versions | Date | Note |
---|---|---|---|
13.0.0.1a | 13 | 28Sep2020 | French translation by Katryne Chauvigné-Bourlaud |
13.0.0.1 | 13 | 6Sep2020 | 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 | 13.0.0.1a | 13 | English | |||
Family tree of Marcin & Emilia Senderski | Marcin Senderski | Only home page is public | 13.0.0.1a | 13.0.4 | EN, PL | |||
Vitter-Weaver Genealogy | Jeffrey Vitter | Public site | 13.0.0.1b | 13.0.3 | EN, FR, CH, DE, ES, IT, NO | |||
Hooley Family Links | Rick Hooley | Public/Private | See Here | See Here | EN | |||
KK's Family History | Kathy Kult | Public/Private site | 13.0.0.1a |
|
EN | |||
Out Family https://jdewberry.net | James Dewberry | Private | 13.0.0.1a | 13.0.3 | EN | |||
The Cole / Tanner Family Tree | David Cole | Public/Private | see here | see here | EN, DE, FR, ES, NL | |||
Die Familie Assent-Metternich | Rainer H. Assent | Private | 13.0.0.1a | 13.0.3 | DE | |||
Bastiaanssen Genealogy | Jan Bastiaanssen | Public / Private | 13.0.0.1a | 13.1.2 | EN, NL, ES | |||
Roy Family Genealogy | Rob Roy | Public | 13.0.0.1a | 13.1.1 | EN | |||
Delvee Family Association | Rob Roy | Public | 13.0.0.1a | 13.1.1 | EN | |||
Sejarah Thümann | Jeffrey Thümann | Public | 13.0.0.1a | 13.0.3 | NL, EN | |||
Joseph Oran Holtz Genealogy Pages | Jim Holt | Private | See Here | See Here | EN | |||
Osage County Cousins | Larry G Banks | Public / Private | 13.0.0.1a | 13.1 | EN | |||
Huygens - Van de Moortel | Tom Huygens | Public/Private on WordPress | 13.0.0.1 | 13.1.2 | NL | |||
MOTYER Family Genealogy | John Mark Motyer | Public site | See here | See here | EN | |||
Your Roots are Showing | Harold Craswell | Public/Private | See Here | See Here | EN | |||
Van Peer Project | Drew McClenaghan | Private Site | 13.0.0.1 | 12.3 | EN | |||
Daniel Bender - Generations | Allison Sibert | Public/ Living Private | 13.0.0.1a | 13.1.2 | EN | |||
Baza danych Rodziny Jarocińskich | Michał Jarociński | non-public site | 13.0.0.1a | 13.1.2 | PL,EN |