Difference between revisions of "Mod Manager Compare"

From TNG_Wiki
Jump to navigation Jump to search
Line 359: Line 359:
 
| Public & Private, modified
 
| Public & Private, modified
 
|12.0.0.5c
 
|12.0.0.5c
| 12.0.2
+
| [https://kmtrees.com/modlist_wiki?whichoptions=basic&cachemethod=3&sortby=filename See Here]
 
| EN,ES,CS,DE
 
| EN,ES,CS,DE
 
|-
 
|-

Revision as of 16:19, 31 December 2018

Mod Manager Compare
Summary Installs a program to generate a Mod Compare Report, which compares the version # of each mod on a TNG site with the mods' Wiki pages. It can be used, with some limitations, so see if a site has the latest versions of its mods.
Validation
Mod Updated 15 May 2018
Download link
v12.0.0.5c
TNG 12.0
v11.0.0.4a
TNG 11.0
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 v11.0.0.4a & v12.0.0.5c
Min TNG V 11.0
Max TNG V at least 12.0
Files modified
admin_modhandler.php, admin_modoptions.php, admin_updatemodoptions.php, admin_showmodslog.php, admin_analyzemods.php, admin_modeditor.php, admin_modtables.php, admin_modupdates.php,admin_ cust_text.php English;


Installed:

rradmin_modcompareform.php, rradmin_modcomparereport.php, rradmin_modcompare_modlist.php, English/rradmin_modcompare_help.php, rradmin_modcompare_files.php, rradmin_modcompare_filesandobjects.php, css/rradmin_modcompare.css, rradmin_modcompare_objects.php,
Related Mods
Notes


Purpose of the Mod

Installs PHP programs that generate a Mod Compare Report that compares a site's mods to:

  1. The mods in a second site and/or
  2. The corresponding mod articles in the TNG Wiki.

Note that if there are multiple versions of a mod (i.e. multiple files that have the same mod Name at the top of the mod .cfg file), the Mod Compare Report only looks at the latest version.

This mod also modifies the Mod List program (admin_modhandler.php) and lister module (class/modlister.php) to implement a querystring parameter (dump) that makes the Mod List results table suitable for screen-scraping by the Mod Compare Report. The dump querystring parameter is not used by any TNG links. The Mod Compare Report invokes the Mod List by opening it as a web page and specifying the query string parameter &dump=1.

Files Installed

  1. admin_modcompareform.php - The form that kicks off the new report. It allows the user to update several new Mod Manager options, and displays Mod Manager options that can only be updated by the Mod Manager Options screen.
  2. admin_modcomparereport.php - The report program invoked by submitting the kickoff form.
  3. css/modcompareform.css - A CSS style sheet used by the kickoff form.
  4. css/modcomparereport.css - A style sheet used by the report.

The two external style sheets are placed in the HTML of their program before css/genstyle.css so that rules in them can be overridden at the bottom of css/genstyle.css. (The style sheets are separate files simply because there are already too many style rules in css/genstyle.css that are needed for only one program, and as more rules are added, the chance of random rules stepping on each other increases.)

Mod Manager Options

This mod installs new Mod Manager Options under the heading "Mod Comparison Report". The new options are divided into four groups:

  1. Defaults for "Basic" Options in the Mod Comparison Report Kickoff Form (That is, these options can be changed on the kickoff form.)
    • Two text fields that are used to search for mod names (1) to be included in the report, or (2) to be excluded from the report.
    • Two checkboxes that specify whether the text fields are regular expression. An information button next to the checkboxes pop up some regular expression help text.
    • The expiration time for Wiki the the Wiki article cache. See The section on 'Caching' near the bottom of this article. Note that the expiration time is a search parameter, not something that is defined when Wiki article is added to the cache.
  2. "Basic" options that are used by the report program but whose values cannot be updated in the kickoff form, specifically
    • A checkbox indicating whether you want certain values in the Comparison Report to be highlighted.
    • Colors to be used to highlight "negative" and "positive" results (as described in the Report Column Legend section of this article.
    • Two options whose purpose is to keep the Comparison Report from getting too wide.
      1. Whether to allow mod filenames to wrap within their report table cell. If this is checked, then underscores in the mod filename will act like dashes, and become line-wrapping points.
      2. The format to be used to specify the author of the mod, e.g. first name only, first name plus initial, or full name.
  3. Defaults for "Advanced" Options in the Mod Comparison Report Kickoff Form, specifically,
    • Whether to show the advanced options when the Kickoff Form is first displayed (within a browser session)
    • The URL of a second TNG site to be compared to the first site and the Wiki
    • A mod author to search for. See the description of the Author column in the Report Column Legend section of this article.
  4. Advanced Options that cannot be adjusted on the Kickoff Form, specifically,
    • Whether to exclude private mods from comparisons between one TNG site and the Wiki.
    • Whether to highlight the file name of mods whose filename does not match the mod name or does not match the version number. This option is meaningful only if the the Basic option that says whether to highlight certain values is checked.
      1. Whether to hide the version number portion of the filename if it matches the version # inside the file.

Compatibility with Other Mods

No known conflicts. As I write this, my mods are the published mods that affect the Mod Manager/

Related Mods

The Field Buttons mod enables small "field buttons" that are attached to text fields on the kickoff form. (See the visualizations and the Field Buttons article.) Field buttons are small, configurable (and generally one-character) buttons that are attached to text fields on a form, and that reduce the number of mouse movements or typing needed to perform common data entry operations such as clearing a field or restoring that field's initial value. This mod is 'not depenendent on the Field Buttons mod. If Field Buttons is not installed, the field buttons simply do not appear.

This mod is also compatible with and coordinates with my other Mod Manager mods:

  1. Mod Manager Filenames, which
    • Looks for incompatibilities between the filename and the mod name,
    • Checks for discrepancies between the version number in the filename and the version number inside the .cfg file,
    • Abbreviates the filename (under control of a Mod Manager Option), and
    • Turns the filename into a hyperlink to the .cfg file.
  2. Mod Manager Latest, which duplicates the results table row for the most-recently-processed mods, under to assumption that those are the most you're most likely to act on next.
  3. Mod Manager List Locations, which
    • Adds some display features to the list of target locations in the detailed status,
    • Hides the detailed status for mods that are "Installed" and "Ok to Install", but
    • Adds a button that lets you see the detailed status listing if you want, and
  4. Mod Manager Note Tags, which adds some .cfg file tags for annotation.

Any or all of these mods can be installed independently, in any order.

Installation

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, and 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.

Visualizations

A Mod Comparison Report created with Basic option (and with Highlighting turned on (Click on the image to see a larger version)

Mod manager basicreport.jpg
The image above is a "Basic" report on mod names that include the string "Admin". The Mod Manager option that allows certain values to be highlighted has been turned on. In this screen shot, the results table (but not the information above and below the table) has been shrunk because of its width. Subsequent visualizations will focus on sections of the report table.

Note that

  1. The "Compare" tab has been added to all Mod Manager programs.
  2. Two links have been added to the Inner Menu. The "Report Legend" link goes to Report Column Legend secton of this Wiki article. That section lists all columns in the Mod Comparison Report, with notes about values that can be highlighted in the column.
  3. The selection criteria are listed above the results table. The two criteria available with a basic report are a mod name search string that includes mods (like most TNG searches) and a search string that excludes mods.
  4. The black vertical line separates information about the mod .cfg files from information about the corresponding Wiki article.
  5. Below the results table, the report displays a summary of the objects that the program examined.
    • There are 94 .cfg files in the site on which the program was run.
    • Of those 94 .cfg files, 13 matched the Mod Name search criterion, and were thus analyzed.
    • For 12 of those 13 mods, there was fresh data in the Wiki cache.
    • 1 Wiki article was read from the Wiki server (hens then "when cached" value of 0 minutes

1 mod of those mods matched the search criteria and were displayed in the results table.

    • The program at least attempted to download 5 Wiki articles.
    • There is a list of status values in the 13 .cfg files that were analyzed. (There is one status column for the .cfg files, and one for the Wiki articles.)
The Kickoff Form that Generated the Report Above

Mod manager compare-basicform.jpg

  1. A button reveals the Advanced options, or removes them when then are present.
  2. The current site (in this case, a test site on a PC) will be compared to the TNG Wiki server. An Advanced option lets you compare the current site to a second site (for instance, when I want to compare my test server to my WWW production server.) And you can omit the Wiki server from the comparison.
  3. In a Basic report, the only search criteria available are the two search strings shown here. One string determines which mods will be included, and another string excludes mods. In this case, I'm looking for mods with the substring "Admin". (The search is caseless.)
  4. Here you see "Field Buttons" which are described in the Field Buttons section of this article and in a visualization below.
  5. Each of the search strings can be a regular expression. The information button gives a regular expression hint, as shown in the inset at the bottom of the screenshot.
  6. Three caching methods are available:
    1. When you haven't run the comparison for a while, or when you are focusing on specific mods, you can ignore the cache, and make sure that you are reading the Wiki. Be careful about using this option, as suggeded by the note at the bottom of the page (#8).
    2. The "standard" use of the cache is option 2, where you specify a cache expiration time (in this case 10 days ago. In this case, the comparison report will read Wiki articles directly from the Wiki server
      • If the Wiki article's cach is less than 10 days old, or
      • If the Wiki article has not been read before, and thus is not in the cache.
    3. When you first start a browser session, the Cache Method is set to #2 when the page loads, but once you have run a Comparison, the initial value is always 3 (which doesn't read any Wiki articles unless it can't find them in the cache).
  7. Be aware of this important reminder.

Mod manager compare2-infotext.jpg

Local Site Details

Mod manager compare-wikicolumns.jpg
The visualization immediately above is not a detail of the specific Basic report shown above, but is a compilation of clips from another report, illustrating specific features of the report.

  1. A Mod Manager option lets you determine how the mod author name will be displayed. In this example, it has been set to "First name and intial". The purpose of a shortened name is to save horizontal space in the report, which can get quite wide. The author name comes (first) from a new 'author' tag in the .cfg file that is implemented by the Mod Manager Note Tags mod. When there is not author tag in the .cfg file, the author's name is pulled from the 'Author(s)' field in the Wiki article sidebar. In both cases, the author name can be associated with a hyperlink to information about the author.
  2. When highlighting has been turned on, the "Local v Wiki" column highlights mods where the Wiki has a newer version than the site the user is on.
  3. When highlighting has been turned on, Installation Status values other than "install" are highlighted.
  4. The version number suffix of 'rr' for this mod is my personal convention to indicate that I have edited someone else's mod locally. Among other things, I added an Author tag to the .cfg file that gives both of our first names (and that can't be "abbreviated" to a first name and last initial). The Author tag that I added does not have a hyperlink.
  5. The plus sign in the Author column indicates that there is no Author tag in the .cfg file, and that the 'Author(s)' field in the Wiki article sidebar has more information than just one person's name. The Author column just shows the person name that starts the Author data, and when a user hovers over the Author value, the entire 'Author(s)' value is shown.
  6. When highlighting has been turned on, The Mod Install value of 'ok2inst', like 'partinst' and 'cantinst' is highlighted.
  7. The value 'Missing' indicates that there is no Wiki article for this mod.
Wiki details

Mod manager compare-wikicolumns.jpg

  • Admin_Place_Geocode:
    • There is an "Under Construction" message in the Wiki article.
    • The Wiki article was last read into the cache on this TNG site more than 1 week ago.
  • Admin Places Search:
    • The Wiki article was last read on this TNG site, and put into the site's cache, 3 days ago.
  • Admin Reports Search:
    • The Wiki article is missing, so the Wiki article name is crossed out.
  • Admin Users-More:
    • There are two entries for Admin Users-More because two .cfg files refer to the same Wiki article. (The two files are the "main" Admin Users-More .cfg file, and a second .cfg file with language strings.)
    • The "Latest Mod" field in the Admin Users-More Wiki artical sidebar lists two mod versions, hence
      • The Wiki Status value is ">1 ver#",
      • The Wiki Version column has a plus sign, and when a user hovers over the version number, the additional detail is displayed in a popup.
  • Place Data Copy
    • As with the Admin Reports Search mod, there is no Wiki article for the Place Data Copy mod.
Kickoff Form with Advanced Options

Note that the advanced options are shown on the form in a reddish color to distinguish them from the Basic options.
Mod manager compare-advancedform.jpg

  1. The user can select another TNG site, and create a three-way comparison.
  2. The mod author is displayed when a Basic search is done, but with Advanced options, you can specify an author to search for. The author value can come from the .cfg file or from the Wiki article, and, of course, is not selected from a database; you can specify any value here, including part of an author name.
  3. When you do specify an author to search for, you have 3 choices of how to use that author value. If you do not specify an author, this line of Author options is removed from the screen.
  4. You can also search for any number of status values from the status columns in a full report. The status values are initially hidden behind a button, and are shown below.
  5. With Advanced options, you can also specify a sort order for the results table. Some of the report order values are shown or hidden as other options are selected. For instance, if there is no second TNG site URL, then the "Status of Site2 v Site1" and "Status of Site2 v Wiki" are not meaningful, and are hidden.
  6. The "Other Advanced Mod Manager options" are automatically disabled when the kickoff form has only Basic options.
Status Values on the kickoff form

Mod manager compare-statusvalues.jpg
The possible status values are described in the Status Values section below. Note that, as with the Sort options, the visibility of some of of the status columns depends on whether there is a site 2 value, and whether the TNG Wiki option is checked.

Second site details

Mod manager compare-site2columns.jpg
When a second TNG site (or "remote site") is selected, four columns with the term "Site 2" in the column headings are added to the report between the columns for the local site and the columsn for the Wiki site. The headings for the 3 "local" status columns are also changed to refer to "Site 1".

The "Site 2" columns are essentially identical in meaning to the three "Site 1" columns, except except that there is an additional column that compares the Site 2 version number to the Site 1 version number.

Mod Comparison Report Mod Manager Options

Mod manager compare-options.jpg
The options are described in the Mod Manager Options section above

Field Buttons

Mod manager compare-fieldbuttons1.jpg
In the screen clip above, the field buttons attached to four separate fields are highlighted.

  • The X button will clear the field value.
  • The R (for Reload or Reset) button will restore the field to the value it had when the page was loaded.
  • The D (for Default) button will set the field value to the default for that field, as defined in the Mod Options.

Field buttons that would not change the value are shaded out, as shown here:
Mod manager compare-fieldbuttons2.jpg
In this screenclip, we have loaded the page after generating a report, and changed the author search string, and set the default for the "exclude" name search screen. As a result:

  • For the field that defines a TNG site web address,
    • The X is visible because there is a value to clear,
    • The R is not visible because the current value is the initial value, and
    • The D is not visible because the current value happens to be the default value.
  • For the Author search string:
    • The X is visible because there is a value to clear,
    • The R is visible because the current value is not the initial value, and
    • The D is visible because the current value is not the default value.

TNG site web address shows only the X buu

  • For the Mod Name search "include" field:
    • The X is not visible because there is no value to clear,
    • The R is visible because the field value has been changed, and is no longer the initial value, and
    • The D is not visible because the current value 'is the default value.
  • For the Mod Name search "exclude" field:
    • The X is visible because there is a value to clear,
    • The R is visible because the field value has been changed, and is no longer the initial value, and
    • The D is not visible because the current value 'is the default value.

Field buttons are described further in the Field Buttons mod article. The Field Buttons mod is necessary to make the field buttons visible, but the forms where field buttons are used can work just fine without the field buttons.

Report Column Legend

Regaring the notes about highlighting below

  • Whether there is higlighting is dependent on a new Mod Manager option,
  • The higlighting consists of cell borders in one of two colors, "postive" and "negative", which default o green and reddish, and can be changed by Mod Manager options,
  • When I say "depending on a Mod Manager option", I don't mean the options described in the first two points; I am referring to an additional option that controls whether that specific condition is tested.

The full Mod Compare Report has four groups of columns:

  • Mod Identity
    1. Mod Name - The mod's name, as specified inside the local .cfg file (if there is one), or the remote .cfg file. Note that, if more than one version of the mod exists on either TNG site, only the latest version is shown. (As a result, if the local site has v2 and v3 of a mod, and the remote site has v2), the local v2 will be ignored, and the local v3 will be compare to the remote v2.)
    2. 'Mod Filename - The .cfg filename (possibly abbreviated).
      • The mod filename is a hyperlink to the . Depending on a Mod Manager option, the mod version number and file extension (always .cfg) are omitted (to save horizontal space in the table) if the version number portion of the filename matches the version number inside the .cfg file.
      • Depending on another Mod Manager option, if either the Mod Name portion or the Version number portion of the Mod Name differs from the values inside the .cfg file, the mod name is highlighted, and the program displayes the reason(s) for the higlighting when you mouse over the filename.
    3. Author - The report first looks for an Author in the "Author" field of the TNG Wiki article sidebar. If no Author is found there, then the report looks for an !@#Author tag in the .cfg file. (The Mod Manager Notes mod creates the ability for the Mod Manager to handle !@#Author tags.)
      • The kickoff form can specify that a mod author who matches a search value should be highlighted. If the mod Author matches the Author specified in the kickoff form, the name is highlighted in green.
      • Depending on a Mod Manager option, the Author name can be displayed as a full name, first name and last initial, or first name only. The format specified for the displayed author name does not affect the author name search string, nor the match between the author search string and the author in the Wiki page or the .cfg file.
      • If the author name in the Wiki article is hyperlinked, or an URL is specified in the !@#Author tag in the .cfg file, the author name is hyperlinked.
      • If the author name field in the Wiki article sidebar contains more information than just the filename, a plus sign is displayed in the field, and when you mouse over that plus sign, that additional information is displayed.
  • The mod on the local site. These columns are always present, but will be blank if there is a remote site ("Site 2"), and a mod that exists in the remote site but not in the local site. These columns are labeled as "Local" or "Site 1", depending on whether a second site has been specified.
    1. Local Install - The installation status of the local mod.
      • A status other than 'Installed' is highlighted with the negative color.
    2. Local Version - The version number from the %version tag inside the mod .cfg file.
    3. Local v Wiki - A comparison of the mod's version number to the Wiki version number, marked by values such as '>wiki', '<wiki', etc.
      • If the mod is marked as Private with the tag !@#Private%, then the report will make no attempt to look for a Wiki article, and this cell will have the value 'Private'.
      • If the mod's version # is less than the Wiki version number, then the comparison value will be highlighted with the negative color.
  • The mod on the remote site ("Site 2") - These columns are omitted completely if no remote site is specified.
    1. Remote Install - The installation status of the local mod.
      • Any value other than 'Installed' is highlighted with the negative color.
    2. Remote Version - The version number from the %version tag inside the mod .cfg file.
    3. Remote v Local - A comparison of the mod's version number with the version number of the local file, with values such as '>site1', '=site1', etc.
    4. Remote v Wiki - A comparison of the mod's version number to the Wiki version number, just like the Local v Wiki' column.
  • Wiki Article - These columns will be omitted if the user unchecked the "Read Wiki" checkbox in the kickoff form.
    1. Wiki Status - Indicates whether the Wiki article exists, whether the version number could be found, and whether the version number field in the Wiki sidebar contains more than one version number.
    2. Wiki Version' - The version number from the new Latest Mod field in the Wiki article sidebar.
      • If the field contains any text other than just a single version number, then a plus sign is displayed at the right end of the table cell, and the entire text of the field is saved in a pop-up that will appear if you hover over the plus sign.
      • If the field contains more than one version number, the version numbers are compared, and the highest one is displayed.
    3. Wiki Article Hyperlink - A hyperlink to the Wiki article, based on the %wikipage tag in the .cfg file. The hyperlink will open in a new page or tab.
      • If the Wiki article name does not match the Mod name, then the table cell is highlighted with the background color.
      • If the a Wiki article is specified in the mod .cfg file, then the columns showing the Local and/or Site 2 comparison to the Wiki article will have the value "Missing", and the Wiki article name will be shown, but crossed out.

Status Values

The Advanced Options in the kickoff form list all possible status value for the columns "Local vs Wiki", "Remote vs Local", "Remote vs Wiki", and "Wiki Status" as possible search criteria for the report. The status value are:

  • Local or Remote vs Wiki
    • n/a - The Wiki article was missing, so no comparison is possible.
    • ?? - The .cfg file and Wiki article were present, but one of the version numbers could not be found, so no comparison is possible.
    • Private - The mod .cfg file contained the tag !@#Private%
    • No link - There was no %wikilink tag in the .cfg file
    • Bad link - The %wikilink reference in the .cfg file was badly formed
    • Missing - The Wiki articles referenced by the %wikilink tag in the .cfg file was missing
    • ?wiki - (<, =, or >) Direct comparison of the .cfg file version number to the Wiki version number.
  • Remote vs Local
    • n/a - There is no corresponding local mod.
    • ?? - Both files are present, but one of the version numbers could not be found.
    • ?local - (<, =, or >) Direct comparison of the two version numbers
  • Wiki Status
    • Missing - The file was missing.
    • No Ver# - No version number could be found
    • >1 ver# - There was more than one version # in the 'Latest Mod sidebar field. This is not an error, and does not suggest a problem, it's just an FYI.
    • ok - The mod article exists, and appears to have one version number in the 'Latest Mod sidebar field.

Caching

The Mod Comparison report saves a cache of Wiki article data on your TNG server so that, when the report is run again, it doesn't have to undergo the slow process of reading each Wiki Article, and so that it does not drag down the TNG Wiki server performance. Unfortunately, there is no way to determine whether the relevant data in the Wiki article has been updated without reading the Wiki article, which would spoil the point of caching.

Consequently, the kickoff form specifies a cache age limit. If the cached data - for a specific Wiki article - is older than that age, the Wiki article will be re-read and its cache will be refreshed.

If you know (or think that) certain Wiki articles have been updated, you can refresh the cache for those specific articles if you:

  1. Search for those specific articles by name (or name substring), and
  2. Specify a small age limit (say, 20 minutes, 10 days, 6 weeks - whatever is appropriate).

Revision History

      • The latest version of the mod is at the top of this table ***
Mod Version TNG Version Date Note
12.0.0.5c 12.0+ 15 May 2018 No functional changes; made compatible with TNGv12.
11.0.0.4a 11.0.0 - 11.1.2+ 24 Dec 2017 First production version
11.0.0.2 11.0.0 and up 14 Jun 2017 Still Beta Status
  • Had to trim a string so that empty %wikipage tags would generate the status 'No Link' instead of 'Bad Link'
  • Adding Wiki caching, which speeds up the report tremendously.
  • Added filename substring searches to the kickoff form so that users can specify specific mods to include and/or exclude from the report
11.0.0.1b 11.0.0 and up 6 Jun 2017 Still Beta Status
  • Trimmed leading spaces from the Remote Site URL.
  • Fixed a variable reference that was causing some of the remote .cfg fields to be lost.
11.0.0.1a 11.0.0 and up 27 May 2017 New mod – Beta Status.

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 11.0.0.1a 11.1 English
Roots & Relatives Remembered Ron Krzmarzick Public & Private, modified 12.0.0.5c See Here EN,ES,CS,DE
Cole / Tanner Family Tree David Cole Public/Private see here see here English
Hooley Family Links Rick Hooley Public/Private See Here See Here EN