This is a TNG mod directive file
%name:Mod Manager Compare%
%version:13.0.0.6e4%
%description: Installs programs that generate a Mod Comparison Report, which compares a site's mods to the mods' Wiki articles. This mod adds options to the Mod Manager Options and adds a "Compare" tab to the Mod Manager tab menu in all Mod Manager Programs.
Also tweaks the Mod List program so it can generate a mod list that the Mod Comparison Report can screen-scrape to extract information about each mod. It installs several files, all of which have the filename prefix "rrmodcompare":
The Mod Comparison Report can also compare the local mods to those on a second TNG site, but this mod (version 6c or higher) must be installed on that site.
%
%wikipage:Mod_Manager_Compare%
%author:Robin Richmond:https://tng.lythgoes.net/wiki/index.php?title=User:Robinrichm%
**********************************
*** Revision History ***
Issues
- External and internal reports may give different version #s!?!?
v6e4 17 Nov 2021
* Bypass the new admin-only restriction introduced by TNGv13.1. Still works for TNGv13*
* Fixed several undefined subscript and variable errors.
v6e3 21 Dec 2020
* Fixed a PHP error that only sometimes occurs?!?
v6e2 8 Dec 2020
* Adjusted a target location search string, and used %textexists to define alternate target locations
to accommodate changes made in a post-TNG.0.1 patch.
v13.0.0.6e1 4 Aug 2020
* Changed one target location in each of four files that have "require 'begin.php'" instead of 'include("begin.php")'
* Changed the target location for showmodnames in admin_modhandler.php since the footer has now changed.
* Changed the target location search string for the javascript block in admin_modoptions.php to find another
";
###Mod Manager Compare Location 4: End of insertion
%end:%
*************** admin_modoptions.php Location 5 - Show mod names
%location:%
";
%end:%
%insert:after%
###Mod Manager Compare Location 5: Show mod names
if (file_exists('rrshowmodnames_include.php')) include_once ('rrshowmodnames_include.php');
%end:%
*************** admin_modoptions.php Location 6 - Add the Compare tab
%location:%
$modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates');
%end:%
%insert:after%
###Mod Manager Compare Location 6: Add Compare Report tab, with the new tab flag
if (file_exists("rrinnermodmenu_newtab.php"))
include_once('rrinnermodmenu_newtab.php');
if (!function_exists('rrimmNewTab')) {function rrimmNewTab($modname){}}
$modtabs['rrmmc1'] = array(1,"rrmodcompare_form.php",$admtext['mmcompare'].rrimmNewTab('Mod Manager Compare'), 'compare');
###Mod Manager Compare Location 6: End of Insertion
%end:%
************************************************************
%target:admin_updatemodoptions.php%
*** The action script that saves the mod options
*************** admin_updatemodoptions.php Location 1 - Remove header function call.
%location:%
$_SESSION['err_msg'] = "{$admtext['checkwrite']} {$admtext['cantwrite']} $optionsfile !";
header( "Location: admin_modhandler.php" ); // restored to new Mod Manager screen KCR 140504
%end:%
%replace:%
###Mod Manager Compare Location 1: Removed redirection; we'll fall through to another one below.
$_SESSION['err_msg'] = "{$admtext['checkwrite']} {$admtext['cantwrite']} $optionsfile !";
%end:%
*************** admin_updatemodoptions.php Location 2 - Add option to redirect to the Mod Compare kickoff form
%location:%
header( "Location: admin_modhandler.php" ); // restored to new Mod Manager screen KCR 140504
}
%end:%
%replace:%
###Mod Manager Compare Location 2: Close If Else block before the redirection and redirect to the mod
###comparison form if the link to Mod Options came from the Mod Comparison report or kickoff form.
}
if (isset($_POST['redirectto']) && $_POST['redirectto'])
header( "Location: {$_POST['redirectto']}" );
else
header( "Location: admin_modhandler.php" ); // restored to new Mod Manager screen KCR 140504
###Mod Manager Compare Location 2: End of insertion
%end:%
************************************************************
%target:admin_showmodslog.php%
%location:%
require 'begin.php';
%end:%
%insert:before%
#####admin_showmodslog.php, modified by ###Mod Manager Compare, by Robin Richmond
# Just adds the Compare tab
$tngModNames['Mod Manager Compare']['admin_showmodslog.php'] = '6e4'; #"Register" the mod
################################################################
%end:%
*************** admin_showmodslog.php Location 2 - Add the Compare tab
%location:%
$modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates');
%end:%
%insert:after%
###Mod Manager Compare Location 2: Add Compare Report tab, with the new tab flag
if (file_exists("rrinnermodmenu_newtab.php"))
include_once('rrinnermodmenu_newtab.php');
if (!function_exists('rrimmNewTab')) {function rrimmNewTab($modname){}}
$modtabs['rrmmc1'] = array(1,"rrmodcompare_form.php",$admtext['mmcompare'].rrimmNewTab('Mod Manager Compare'), 'compare');
###Mod Manager Compare Location 2: End of Insertion
%end:%
************************************************************
%target:admin_analyzemods.php%
%location:%
require 'begin.php';
%end:%
%insert:before%
#####admin_analyzemods.php, modified by ###Mod Manager Compare, by Robin Richmond
# Just adds the Compare tab
$tngModNames['Mod Manager Compare']['admin_analyzemods.php'] = '6e4'; #"Register" the mod
################################################################
%end:%
*************** admin_analyzemods.php Location 2 - Add the Compare tab
%location:%
$modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates');
%end:%
%insert:after%
###Mod Manager Compare Location 2: Add Compare Report tab, with the new tab flag
if (file_exists("rrinnermodmenu_newtab.php"))
include_once('rrinnermodmenu_newtab.php');
if (!function_exists('rrimmNewTab')) {function rrimmNewTab($modname){}}
$modtabs['rrmmc1'] = array(1,"rrmodcompare_form.php",$admtext['mmcompare'].rrimmNewTab('Mod Manager Compare'), 'compare');
###Mod Manager Compare Location 2: End of Insertion
%end:%
************************************************************
%target:admin_modeditor.php%
%location:%
require 'begin.php';
%end:%
%insert:before%
#####admin_modeditor.php, modified by ###Mod Manager Compare, by Robin Richmond
# Just adds the Compare tab
$tngModNames['Mod Manager Compare']['admin_modeditor.php'] = '6e4'; #"Register" the mod
################################################################
%end:%
*************** admin_modeditor.php Location 2 - Add the Compare tab
%location:%
$modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates');
%end:%
%insert:after%
###Mod Manager Compare Location 2: Add Compare Report tab, with the new tab flag
if (file_exists("rrinnermodmenu_newtab.php"))
include_once('rrinnermodmenu_newtab.php');
if (!function_exists('rrimmNewTab')) {function rrimmNewTab($modname){}}
$modtabs['rrmmc1'] = array(1,"rrmodcompare_form.php",$admtext['mmcompare'].rrimmNewTab('Mod Manager Compare'), 'compare');
###Mod Manager Compare Location 2: End of Insertion
%end:%
************************************************************
%target:admin_modtables.php%
%location:%
include 'begin.php';
%end:%
%insert:before%
#####admin_modtables.php, modified by ###Mod Manager Compare, by Robin Richmond
# Just adds the Compare tab
$tngModNames['Mod Manager Compare']['admin_modtables.php'] = '6e4'; #"Register" the mod
################################################################
%end:%
*************** admin_modtables.php Location 2 - Add the Compare tab
%location:%
$modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates');
%end:%
%insert:after%
###Mod Manager Compare Location 2: Add the Compare tab
if (file_exists("rrinnermodmenu_newtab.php"))
include_once('rrinnermodmenu_newtab.php');
if (!function_exists('rrimmNewTab')) {function rrimmNewTab($modname){}}
$modtabs['rrmmc1'] = array(1,"rrmodcompare_form.php",$admtext['mmcompare'].rrimmNewTab('Mod Manager Compare'), 'compare');
###Mod Manager Compare Location 2: End of Insertion
%end:%
************************************************************
%target:admin_modupdates.php%
%location:%
include("begin.php");
%end:%
%insert:before%
#####admin_modupdates.php, modified by ###Mod Manager Compare, by Robin Richmond
# Just adds the Compare tab
$tngModNames['Mod Manager Compare']['admin_modupdates.php'] = '6e4'; #"Register" the mod
################################################################
%end:%
*************** admin_modupdates.php Location 2 - Add the Compare tab
%location:%
$modtabs[5] = array(1,"admin_modupdates.php",$admtext['recommendedfixes'],'updates');
%end:%
%insert:after%
###Mod Manager Compare Location 2: Add Compare Report tab, with the new tab flag
if (file_exists("rrinnermodmenu_newtab.php"))
include_once('rrinnermodmenu_newtab.php');
if (!function_exists('rrimmNewTab')) {function rrimmNewTab($modname){}}
$modtabs['rrmmc1'] = array(1,"rrmodcompare_form.php",$admtext['mmcompare'].rrimmNewTab('Mod Manager Compare'), 'compare');
###Mod Manager Compare Location 2: End of Insertion
%end:%
***********************************************************************
%target:siteversion.php%
*** The Mod Comparison Report will fail when asking for $_SERVER['HTTP_USER_AGENT']
*** because that value is not defined when the program was invoked via fopen().
%location:%
function getSiteVersion($nomobile = false) {
%end:%
%insert:after%
####Mod Manager Compare: Avoid a PHP notice (one-line insertion)
if (empty($_SERVER['HTTP_USER_AGENT'])) return 'standard';
%end:%
***********************************************************************
%target:languages/English/cust_text.php%
%location:%
//Mods should put their changes before this line, local changes should come after it.
%end:%
%insert:before%
####################Mod Manager Compare: Language strings
$admtext['mmmodfolder'] = "mod_manager_compare_v13.0.0.6e4";
$admtext['mmcompare'] = 'Compare'; #Tab for the TNG Tab menu in all Mod Manager Programs
##########Mod Manager Compare - End of new language strings
%end:%
***********************************************************************
%target:languages/English-UTF8/cust_text.php%
%location:%
//Mods should put their changes before this line, local changes should come after it.
%end:%
%insert:before%
####################Mod Manager Compare: Language strings
$admtext['mmmodfolder'] = "mod_manager_compare_v13.0.0.6e4";
$admtext['mmcompare'] = 'Compare'; #Tab for the TNG Tab menu in all Mod Manager Programs
##########Mod Manager Compare - End of new language strings
%end:%
*************** FILES ************************************************
%target:files%
*** The kickoff form and the report
%copyfile:mod_manager_compare_v13.0.0.6e4/rrmodcompare_form.php%
%copyfile:mod_manager_compare_v13.0.0.6e4/rrmodcompare_report.php%
*** The AJAX program that extracts information from cfg files and a regular mod list.
%copyfile:mod_manager_compare_v13.0.0.6e4/rrmodcompare_modlist.php%
*** A Style sheet and a help file
%copyfile:mod_manager_compare_v13.0.0.6e4/css/rrmodcompare.css:css/rrmodcompare.css%
%copyfile:mod_manager_compare_v13.0.0.6e4/rrmodcompare_help.php:languages/English/rrmodcompare_help.php%
|