Help: Mod Manager

Overview

The TNG 10.1 version of the Mod Manager is based on the Mod Manager originally developed by Brian McFadyen and updated by Sean Schwoere to work with the Joomla TNG Component. The Mod Manager combines the Mod List and Batch Updates provided in TNG 10.0.3 and is intended to provide a more integrated way to install, remove and manage modifications to the TNG software package that have been coded to work with this manager.

The new Mod Manager provides a single line summary of the mod status which can be expanded to view the complete Description and errors when applicable. The Affected Files List can be displayed by hovering over the + plus sign in the Files column. You can also use the Expand All inner menu to expand all entries to show the status like the old Mod Manager used to do. The Expand All option is helpful when filtering the list by Partially Installed or Cannot Install so you can see what the errors are.

The Mod Manager is connected into the TNG Administrative page for easy access. The Mod Manager adds the following folders to TNG:

  • mods to contain the Mod configuration files and associated Mod support files
  • extensions to contain some of the mod extensions that are installed by other Mod Manager config files
  • classes which contain the Object Orient Progamming classes that were split and enhanced from the previous managemods.class.php created by Sean Schwoere from Brian's original Mod Manager code.

The Mod List tab now combines the previous Mod List and Batch Updates that was added by Rick Bisbee in TNG 10.0.3 to provide the capability to execute the same action against multiple mods. The Description and extended status can be displayed by clicking the right arrow in the Status column or anywhere on the line. Hovering over the line will high light the line to make it easier to select the status to expand. Hovering over the + plus sign in the Files column will display the Affected Files list, that is the files modified, created, and copied by this mod.

The View Log tab was added by Ken Roy in TNG 10.0.3 to display the Mod Manager Log which is now split from the Admin Log. The Mod Manager log is the reformated log from the Mod Manager created by Rick Bisbee in TNG 10.03 for easier readability of the actions. The messages were also greatly simplified.

The Options tab is a modification of the one added by Ken Roy in TNG 10.0.3 to allow changing some of the execution behavior of the Mod Manager.

The Analyzer tab is an optional tab that can be enabled in the Options screen that allows you to view which mods change a specific TNG php script.

Additional information can be found in the Mod Manager article and in the TNG Mod Manager category of articles on the TNG Wiki.

Top

Operation

The Mod Manager examines the mods folder and reads each cfg file that it finds. The cfg files are directive files that describe the mod, the files and locations to be modified, and the code that is used in the modification.

The Mod Manager checks the following:

  • ensures the user is logged in
  • examines each code location and change
    • ensures the location can be found
    • ensures the target location is unique
    • identifies whether the target location has already been installed
  • identifies new files to be created. If the new file already exists, it examines the version level

Top

Status

The Mod Manager returns the following status:

  • Ok to Install if the mod is not yet installed and the target locations can be identified, then the Install button is displayed
  • Installed if the mod is completely installed, the option to Uninstall the Mod is presented and the option to Edit parameters if any exist. Mods with edit parameters are identified by[Option] after the Installed status.
  • Partially installed if the mod is partially installed, the Cleanup button is provided. A Clean up operation will attempt to remove any inserted code, restore and replaced code, and remove any created or copied files.
  • Cannot Install if the mod cannot be installed. You will need to expand the Status to get more detailed messages as to why the mod cannot be installed.

For examples of the Mod Manager Status screens and how to interpret the various statuses, see Mod Manager - Interpreting Status

Top

Mod Syntax

The Mod Manager syntax basically includes:

Header section that includes

  • Name - the name of the mod, wiki article and file name
  • Version - the version of the mod, where the first 3 period places represents the lowest TNG version to which the mod applies
  • Description - provides a brief description of the mod, the Mod Developer's name, and a URL link to the TNG Wiki article for the mod.

Target sections that specify the file that is the target of the change and includes the following directives

  • Location - that specifies the code location to be changed
  • Action keyword - that specifies whether to replace or insert code before or after the location

New File directives that create the file when the mod is installed

Copy File directives that copy the specified file to the TNG root (%copyfile) or to a subfolder (%copyfile2)

For detailed information on the Mod Manager Syntax, see Mod Manager Syntax

Top

Config Files

Installing Mods

The TNG Wiki provides information on Installing Config Files to install the TNG mods.

Interpreting Status

The TNG Wiki provides information on Interpreting Status.

Config File Syntax

The TNG Wiki provides information on the Mod Manager Syntax.

Creating Config Files

The TNG Wiki provides information for the mod developers on the Creating Config Files.

Top

Batch Operations

The Batch Operations function introduced in TNG 10.0.3 as a Batch Updates tab is now combined in the Mod List and allows specific actions on multiple mods using the Select Filter. You must choose from the status filter list and click Go to display the available controls for the specific status selected. Delete is only available for the Clean Up status if you enable the Option, which we recommend that you leave as No, except for when you need to delete multiple mods in the Partially Installed status, such as a prior version of the same mod. Likewise there is a Delete Installed mods option that will allow deleting installed mods without removing them. This ootion was added to allow deleting previous versions of the same mod, if you forgot to delete them before installing the new version. Here again it is recommend that you leave the option as No and just enable it when needed.

Caution:You should only use Batch Operations if you have a good backup of your website and can quickly restore it if the batch operations renders your site inoperable, which can easily happen if you do not delete previous versions of the mods.

The Select Filter options are:

  • All - displays all a list of all the .cfg files in the mods folder. When you select a specific status then Action buttons will become available
  • Ok to Install - displays a list of all the mods that can be
    • Installed based on your selections and clicking the Install button
    • Deleted from your mods folder based on your selections and clicking the Delete button
  • Installed - displays a list of all the mods that are currently installed that can be
    • Removed based on your selections and clicking the Remove button
  • Partially Installed - displays a list of all the mods that are partially installed and must be
    • Cleaned up based on your selections and clicking the Clean Up Selected button
  • Cannot Install - displays a list of all the mods that cannot be installed, either due to Bad Targets or Missing files, that can be
    • Deleted from your mods folder based on your selections and clicking the Delete Selected button

Top

Options

The Options allows you to specify some of the Mod Manager behavior for the

Mod Manager Log Options

  • Log File Name - allows you to specify the file name to be used for the Mod Manager log. The default is modmgrlog.txt.
  • Max number of Transactions - allows you to specify how many log transactions to keep in the log. The default is 200 transactions.
  • Collapse Log display - allows you to specify if you want the View Log displayed in a collapsed or expanded format initially. The default is Yes but can be changed to No to display the log expanded normally.
  • Redirect to Log For - allows you to specify if you want go to the Mod List to be redirected to the View Log on Errors Only or for All Transactions. The default is to redirect on Errors Only which displays the View Log only if errors are encountered in the install, uninstall, clean up, or delete transaction.
  • Log full path for file actions - allows you to select No to only display the relative path for files in the log. The default is Yes to display the full absolute path.

Display Settings Options

  • Sort Lists by - allows you to specify on which column to sort the Mod List. Options are Mod Name or Config File Name. The default is Mod Name.
  • Use Fixed Headers - allows you to change the option so that fixed headers are not displayed. This option is not noticable if you have a large monitor and few mods. The default is Yes to display the fixed headers. Note that regardless of this option setting, fixed headers will not be displayed for smart phones (mobile mode).
  • Adjust Fixed Headers - allows you to enable the adjust fixed headers jQuery when the fixed headers are not displayed correctly. This option is only needed on certain monitors. The default is No to not use the jQuery javascript to adjust the fixed headers.
  • Use Stripes - allows you to change the option not to use stripes when displaying the Mod List. The default is Yes which uses the databackalt class to provide alternate color striping after N number of rows.
  • Stripe after number of rows - allows you to set the number of rows to display before the alternate color stripe is displayed. The default is 3 rows of databack and then 3 rows of databackalt.
  • Show Mod Warnngs in Status - allows you to turn off the syntax warning errors. The default is Yes to display the warnings. It is recommended that you do not change the default.
  • Compress Mod Names in Mod List - allows you the remove the blanks from the Mod Names before displaying them in the Mod Name list. The default is No which will display the embedded blanks in the Mod Name which should match the TNG Wiki article name.
  • Show Analyzer tab - allows you to specify if you want the Mod Conflict Analyzer tab to be displayed. The default is No which is to suppress the display of the Analyzer tab.

Other Options

  • Allow Delete Selected on Partially Installed Page - enables the Delete Selected button on the Partially Installed mods screen that allows deleting more than one mod at a time, such as deleting the prior versions of mods that were not deleted prior to installing the newer versions. The default is No. We recommend that you only enable this option when you need it to delete multiple mods without having to uninstall the current versions to delete the prior versions and that you normally leave the option set to No.
  • Allow Delete of individually Installed Mods - allows you to turn on the option to display a Delete button next to the Uninstall button for individually installed mods, such as deleting the prior version of a mod that was not deleted prior to installing the newer version. The default is No. We recommend that you only enable this option when you need it to delete a previous version of a mod without having to uninstall the current version in order to delete the prior version and that you normally leave the option set to No.

Top

Mod Conflict Analyzer

Created by Rick Bisbee this tool located under the Analyzer tab was previously provided as a mod. The Mod Conflict Analyzer lets developers examine mods to see precisely how they interact with each other. Two mods changing the same block of code almost always results in Mod Manager errors. You must enable the Show Analyzer tab by setting the Options to Yes if want the Analyzer tab to be displayed.

The analyzer works by examining every mod in the mods folder and cataloging which target files and which blocks of code each one modifies. It then lists the affected file names in the left hand column. Selecting one of those target files displays a list on the right showing all the mods that change it. Each mod shown on the right has a link to open a section of the page displaying the actual modifications made by the Mod Manager Config file. A user can compare changes to the target file to see where potential conflicts might be.

This is helpful not only to find conflicts between two mods but also to know which mods need to be cleaned up and re-installed after replacing the given target file.

The TNG Wiki provides additional information for the mod developers on Using the Mod Analyzer.