Difference between revisions of "Customized Logs"

From Genwiki

Jump to: navigation, search
Line 50: Line 50:
 
* '''IF you are not running TNG version 6.0.0, or you have modified either log.php or showlog.php, DO NOT proceed.  You will lose any modifications you have made to those files.'''  
 
* '''IF you are not running TNG version 6.0.0, 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.0.zip|Customized Logs Rev 1.0.zip]])
 
# download this zip ([[Media:Customized Logs Rev 1.0.zip|Customized Logs Rev 1.0.zip]])
 
# unzip it, examine the contents
 
# unzip it, examine the contents
#  
+
# The log.php file may need to be customized to identify your favourite crawlers
# copy the  file to the base TNG folder
+
#* it is preconfigured for  googlebot, msnbot, inktomi, and gigablast
 +
#* 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
 +
#* the two files identified above will replace existing TNG V6.0.0 files
 +
# ensure the new logfile "botgenlog.txt" is writeable
 
# check it out
 
# check it out
  
  
  
==Customizations==
+
==How do I see what it is doing?==
  
  

Revision as of 20:21, 30 September 2006

If you are not comfortable with html and php editing, this page may not be for you


Overview

This TNG modification will change the way site accesses are logged.

  • It will include additional information indicating where the access was linked from (the referrer info)
  • It will split the log into two files: one for browsers and one for crawlers
  • 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.


Rev 1.0 Sep 30, 2006 - initial release


Requirements

  1. A working TNG installation - see The Next Generation of Genealogy Sitebuilding
  2. A backup of your TNG files
    • showlog.php
    • log.php


Side Effects

  1. 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 Customized Logs Rev 1.0.zip contains:
    • 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
    • log.php a modified TNG 6.0.0 file
    • showlog.php - a modified TNG 6.0.0 file
    • botgenlog.txt - a blank crawler log file


Installation for TNG Version 6

  • IF you are not running TNG version 6.0.0, or you have modified either log.php or showlog.php, DO NOT proceed. You will lose any modifications you have made to those files.
  1. ensure you have a backup of the following files found in your base TNG folder
    • log.php
    • showlog.php
  2. download this zip (Customized Logs Rev 1.0.zip)
  3. unzip it, examine the contents
  4. The log.php file may need to be customized to identify your favourite crawlers
    • it is preconfigured for googlebot, msnbot, inktomi, and gigablast
    • 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
  5. copy all 5 files to your base TNG folder
    • the two files identified above will replace existing TNG V6.0.0 files
  6. ensure the new logfile "botgenlog.txt" is writeable
  7. check it out


How do I see what it is doing?

In the event of a problem with this modification

  1. copy your backup log.php and showlog.php files to your base TNG folder
    • all should be well now
  2. you may also delete the botlogxml.php, showbotlog.php, and botgenlog.txt files


Support

  1. 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. Mail me here
    • Please post suggestions, or your own flavour of this mod to the forum or list
Personal tools