Difference between revisions of "TNG Mod Manager"

From Genwiki

Jump to: navigation, search
m
 
m
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.  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.  
 +
 +
<font size="-1" color="green">
 +
* ''Rev 1.0 Mar 28 2009'' - Beta Release to small user group
 +
* ''Rev 0.0 Mar 21 2009'' - Pre-Release Testing
 +
* ''Rev A.0 Mar 20 2009'' - Dev Testing
 +
</font>
  
  
Line 9: Line 14:
 
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 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 folllowing:
+
The Mod Manager checks the following:
  
 +
* ensure 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 25: Line 31:
 
* Download the current version of the Mod Manager from [[Media:Mod_Manager_V1.0.zip|Mod_Manager_V1.0.zip]]
 
* 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.
 
* Unzip the archive and examine the contents.
* Extract the mod_manager.php script and copy it to your TNG admin folder
+
* 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"
 
* 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
awlers
+
* It will enhance the filter options available through the ADMIN->SETUP->Log Settings. Filtering based upon Host IP Address and logged in User Descriptions will be added to the existing filter on Host Name.
+
 
+
For an example of how your log will appear, [http://genealogy.mcfadyen.ca/showlog.php check here].  (This log has the referrer information turned on and will not look exactly the same as the original.  The default install option will appear the same as the original log)
+
 
+
 
+
<font size="-1" color="green">
+
* ''Rev 1.10 Jan 16, 2009'' - validated for V7.0.3
+
* ''Rev 1.9a Nov 20, 2008'' - correction to botlogxml.php  (a missing ;) and validated on V7.0.2
+
* ''Rev 1.9 Jul 1, 2008'' - updated files for V7.0.0
+
* ''Rev 1.8 Feb 9, 2008'' - updated files for V6.2.0 (only the log.php changed from rev 1.7)
+
* ''Rev 1.7 May 15, 2007'' - updated IP address retrieval and display in the log: Thanks go out to [[http://www.lourens-vanbochove.nl Kees Lourens]] for this update (only the log.php changed from rev 1.6)
+
* ''Rev 1.6 May 13, 2007'' - updated for TNG V6.1,  Thanks go out to [[http://www.royandboucher.com Ken Roy]] for this update
+
* ''Rev 1.5 Jan 24, 2007'' - potential logging of login referrer information has been eliminated (potential for encrypted passwords to have been logged if your page accesses came directly from the login screen) (only the log.php file was changed)
+
* ''Rev 1.4 Jan 15, 2007'' - minor updated for V6.0.4
+
* ''Rev 1.3 Jan 3, 2007'' - Referrer information in the showlog is now an option, defaulted off
+
* ''Rev 1.2 Nov 19, 2006'' - Package names updated, NO file changes required for V6.0.3
+
 
+
</font>
+
 
+
 
+
 
+
==Requirements==
+
 
+
# A working [http://lythgoes.net/genealogy/software.php TNG] installation - see ''[http://lythgoes.net/genealogy/software.php The Next Generation of Genealogy Sitebuilding]''
+
# A backup of your TNG files
+
#* showlog.php
+
#* log.php
+
 
+
 
+
 
+
==Side Effects==
+
 
+
# As with any modification to a TNG file, this modification will get lost during your next TNG version update and you will need to re-implement the mod.
+
 
+
 
+
 
+
==TNG Installation Contents==
+
 
+
The following zip file contains the necessary files to allow the addition of this feature.
+
 
+
* The zip file [[Media:Customized Logs Rev 1.10.zip|Customized Logs Rev 1.10.zip]] contains:
+
** version 6.0-6.0.4
+
** version 6.1 (6.1.0-6.1.1)
+
** version 6.2.0
+
** version 7.0.x  (validated up to V7.0.3)
+
***log.php <font color="red">a modified TNG file</font>
+
***showlog.php <font color="red">a modified TNG file</font>
+
*** showbotlog.php - this will frame the crawler log file (fashioned after showlog.php)
+
*** botlogxml.php - this file extracts and prints the crawler log file, called from showbotlog.php, fashioned after logxml.php
+
*** botgenlog.txt - a blank crawler log file
+
 
+
 
+
 
+
==Installation for TNG Version 6-7==
+
 
+
* '''IF you are not running TNG version 6.0.1-6.1.1,6.2.0,7.0.0-7.0.3 or you have modified either log.php or showlog.php, DO NOT proceed.  You will lose any modifications you have made to those files. '''
+
 
+
# ensure you have a backup of the following files found in your base TNG folder
+
#* log.php
+
#* showlog.php
+
# download this zip ([[Media:Customized Logs Rev 1.10.zip|Customized Logs Rev 1.10.zip]])
+
# unzip it, examine the contents
+
# select the 5 files - log.php,showlog.php,showbotlog.php,botlogxml.php, and botgenlog.txt from the appropriate version folder
+
# The log.php file may need to be customized to identify your favourite crawlers
+
#* it is preconfigured for  googlebot, msnbot, inktomi, werelate, Panscient, gigablast, and [IP 74.6x.x.x] which is inktomi where there were no dns entries.
+
#* if you wish to add others then
+
#** locate, open, and edit the new log.php file.  You can use notepad, wordpad, or another text editor
+
#** find the section that checks for the crawlers and add another line following the same syntax
+
#** save and close the file
+
# copy all 5 files to your base TNG folder
+
#* two of the files identified in step 1 will replace existing TNG files
+
# ensure the new logfile "botgenlog.txt" is writeable
+
# check it out
+
 
+
 
+
 
+
==How do I see what it is doing?==
+
 
+
* Regular browser accesses will continue to be added to the normal log file.  This will continue to be viewed as always, through accessing the showlog.php script.
+
* Crawler accesses (those listed in the log.php file) will be diverted to the botgenlog.txt file.  This may be viewed directly via the showbotlog.php script, or by clicking on the link on the Regular access display page just above the log listing.
+
* Remember that you can exclude log entries to the regular Browser log by listing them on the Admin->Setup->Log_Settings page.  Use the field labeled "Exclude Host Name".  You can insert multiple exclusions separated by commas.
+
** exclude by specific IP address: 192.168.1.1
+
** exclude by IP address range: 192.168.1.
+
** exclude by Host Name
+
** exclude by any part match of the User Description: If your admin user description was <font color="green">Site Administrator</font>, then entering <font color="green">Admin</font> would exclude that user's entries when logged in
+
 
+
  
==Optional Referrer Information==
+
==Using the Manager==
  
If you wish to add the referrer information to your showlog to see where people are browsing from before getting to your page, you can turn on the option in the log.php file.  A few lines from the top contains an option to enable this featureBEWARE: the referrer information is often long and messy. Although I used a few rules to shorten some of the information, it can still be a little ugly compared to the original log.
+
* The Mod Manager may be called directly via your browser by adding /manage_mods.php to the end of your admin folder urlFor 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.
  
  
=='''In the event of a problem with this modification'''==
+
==Creating Mod Configuration Files==
  
# copy your backup log.php and showlog.php files to your base TNG folder
+
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.
#* all should be well now
+
# you may also delete the botlogxml.php, showbotlog.php, and botgenlog.txt files
+
  
 +
%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:% 
  
==Support==
 
  
# You're sort of on your own...  If you have a specific question, or feel some additional info in the above would help others,  feel free to contact me directly. [mailto:genealogy@mcfadyen.ca Mail me here]
+
%newfile:placesearchform.php%
#* Please post suggestions, or your own flavour of this mod to the forum or list
+
%fileversion:2.0%
 +
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.
 +
// New File Contents
 +
// More Comments
 +
// %version:2.0%
 +
Code
 +
Code
 +
%fileend:%

Revision as of 21:49, 22 March 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. 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.

  • Rev 1.0 Mar 28 2009 - Beta Release to small user group
  • 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:

  • ensure 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 indentified, 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 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 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:%


%newfile:placesearchform.php% %fileversion:2.0% This would be the contents of a new file to be created. The 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. // New File Contents // More Comments // %version:2.0% Code Code %fileend:%

Personal tools