Difference between revisions of "TNG Mod Manager"

From Genwiki

Jump to: navigation, search
m
m
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Overview==
 
==Overview==
  
This TNG Mod Manager is intended to provide a more integrated way to install/remove and manage Modifications to the TNG software package.  Once installed, it may be connected into the TNG Administrative page for easy access.  The Mod Manager consists of a single script that is copied to the TNG admin folder.  A sub folder in the TNG admin folder must also be created and is used to contain the Mod configuration files and associated Mod support files.  
+
This TNG Mod Manager 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.  Once installed, it may be connected into the TNG Administrative page for easy access.  The Mod Manager consists of a single script that is copied to the TNG admin folder.  A sub folder in the TNG admin folder must also be created and is used to contain the Mod configuration files and associated Mod support files.  
 +
 
 +
'''The Mod Manager distribution has been moved to the main [http://tng.lythgoes.net/wiki/index.php?title=Mod_Manager TNG Wiki site].  Please follow the reference for more detail and the download.'''
 +
 
  
 
<font size="-1" color="green">
 
<font size="-1" color="green">
* ''Rev 1.0 Mar 28 2009'' - Beta Release to small user group
+
* ''Rev 2.0b May 26 2009'' - Correction included for the $$manage_mods_v1.3.cfg file.  It was giving an improper error message and would not install
 +
* ''Rev 2.0a May 18 2009'' - Update to the gendex form mod to include English only.
 +
* ''Rev 2.0 May 18 2009'' - Upgrades for stability and compatibility and several new keywords
 +
* ''Rev 1.0 Apr 26 2009'' - Initial public release
 +
* ''Rev 0.2 Apr 15 2009'' - Continued Testing with small user group, added a parameter editing directive allowing easier customization of mod variables
 +
* ''Rev 0.1 Mar 28 2009'' - Beta Release to small user group (contact me if you wish to assist with this testing)
 
* ''Rev 0.0 Mar 21 2009'' - Pre-Release Testing
 
* ''Rev 0.0 Mar 21 2009'' - Pre-Release Testing
 
* ''Rev A.0 Mar 20 2009'' - Dev Testing
 
* ''Rev A.0 Mar 20 2009'' - Dev Testing
Line 16: Line 24:
 
The Mod Manager checks the following:
 
The Mod Manager checks the following:
  
* ensure the user is logged in
+
* ensures the user is logged in
 
* examines each code location and change
 
* examines each code location and change
 
** ensures the location can be found
 
** ensures the location can be found
Line 23: Line 31:
 
* identifies new files to be created
 
* identifies new files to be created
 
** if the new file already exists, it examines the version level
 
** if the new file already exists, it examines the version level
* if the mod is not yet installed and the target locations can be indentified, then the option to install is presented
+
* if the mod is not yet installed and the target locations can be identified, then the option to install is presented
* if the mod is completely installed, the option to remove the Mod is presented
+
* if the mod is completely installed, the option to remove the Mod is presented and the option to edit parameters if any exist
 
* if the mod is partially installed, the option to clean the Mod is presented.  A Clean operation will attempt to remove any inserted code, restore and replaced code, and remove any created file.
 
* if the mod is partially installed, the option to clean the Mod is presented.  A Clean operation will attempt to remove any inserted code, restore and replaced code, and remove any created file.
  
==Installation==
 
 
* Download the current version of the Mod Manager from [[Media:Mod_Manager_V1.0.zip|Mod_Manager_V1.0.zip]]
 
* Unzip the archive and examine the contents.
 
* Extract the manage_mods.php script and copy it to your TNG admin folder
 
* Create a new sub folder in the TNG admin folder and name it  "mod_folder"
 
* Extract the Manage_Mods_Ver.cfg configuration file and copy it to the mod_folder
 
 
==Using the Manager==
 
 
* The Mod Manager may be called directly via your browser by adding /manage_mods.php to the end of your admin folder url.  For example, my site would be  "http://genealogy.mcfadyen.ca/admin/manage_mods.php"
 
* After running the script for the first time, you should install the Mod Manager mod, this will create a link to the Mod Manager in the left hand administrative menu.
 
 
 
==Creating Mod Configuration Files==
 
 
The following outlines a typical configuration file and the associated keywords.  Note that the % character is used to assist in delimiting the fields and keywords.
 
 
%name:Insert Mod Title Here%
 
%version:V1.0%
 
%description:Insert the description of your mod here.  Include any special notes or even links to your support page.%
 
 
%target:filename_to_change.php%
 
%location:%
 
This must be a unique section of code in the target source file.  If you have a choice, select snippits that are likely to be the same from TNG version to version.  It is all the code between the %location:% and the %end:%.  White space before and after this section will be trimmed before trying to locate it in the source file.
 
%end:%
 
%insert:before%
 
This is the new code that will be inserted immediately before the %location:% code.  The directive can be %insert:before%,  %insert:after%, or %replace:%
 
%end:% 
 
  
 +
==Additional Directives==
  
%newfile:placesearchform.php%
+
* %fileoptional:% - used after a %target:% keyword to indicate that if the file does not exist, no error should be generatedThis is useful when describing parameters in a file that will be created during the mod
%fileversion:2.0%
+
* %parameter - see cfg files for examples or contact the author
This would be the contents of a new file to be createdThe fileversion above is used to compare against a possible version number in the newfile if it already exists. The new file contents will be everything between the %fileversion:$ directive and the %fileend:% directive. The new file should have a %version:% directive as shown below.
+
* %desc - see cfg files for examples or contact the author
// New File Contents
+
// More Comments
+
// %version:2.0%
+
Code
+
Code
+
%fileend:%
+

Latest revision as of 22:12, 27 May 2009

Overview

This TNG Mod Manager 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. Once installed, it may be connected into the TNG Administrative page for easy access. The Mod Manager consists of a single script that is copied to the TNG admin folder. A sub folder in the TNG admin folder must also be created and is used to contain the Mod configuration files and associated Mod support files.

The Mod Manager distribution has been moved to the main TNG Wiki site. Please follow the reference for more detail and the download.


  • Rev 2.0b May 26 2009 - Correction included for the $$manage_mods_v1.3.cfg file. It was giving an improper error message and would not install
  • Rev 2.0a May 18 2009 - Update to the gendex form mod to include English only.
  • Rev 2.0 May 18 2009 - Upgrades for stability and compatibility and several new keywords
  • Rev 1.0 Apr 26 2009 - Initial public release
  • Rev 0.2 Apr 15 2009 - Continued Testing with small user group, added a parameter editing directive allowing easier customization of mod variables
  • Rev 0.1 Mar 28 2009 - Beta Release to small user group (contact me if you wish to assist with this testing)
  • Rev 0.0 Mar 21 2009 - Pre-Release Testing
  • Rev A.0 Mar 20 2009 - Dev Testing


Operation

The Mod Manager examines the mod_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
  • if the mod is not yet installed and the target locations can be identified, then the option to install is presented
  • if the mod is completely installed, the option to remove the Mod is presented and the option to edit parameters if any exist
  • if the mod is partially installed, the option to clean the Mod is presented. A Clean operation will attempt to remove any inserted code, restore and replaced code, and remove any created file.


Additional Directives

  •  %fileoptional:% - used after a %target:% keyword to indicate that if the file does not exist, no error should be generated. This is useful when describing parameters in a file that will be created during the mod
  •  %parameter - see cfg files for examples or contact the author
  •  %desc - see cfg files for examples or contact the author
Personal tools