Difference between revisions of "TNG GoogleMap"

From Genwiki

Jump to: navigation, search
Line 18: Line 18:
  
  
==TNG Modifications V6.0.0==
+
==TNG Modifications V6.0.0/6.0.1==
  
 
The following zip file contains the necessary information to allow the addition of this feature.
 
The following zip file contains the necessary information to allow the addition of this feature.
Line 25: Line 25:
 
** my_tng_map_small.gif - a green magnifier glass for the goole map icon
 
** my_tng_map_small.gif - a green magnifier glass for the goole map icon
 
** get_google.php - the google map link function
 
** get_google.php - the google map link function
** personlib.php - <font color=red><b>a modified TNG V6.0.0 file</b></font>
+
** personlib.php - <font color=red><b>a modified TNG V6.0.0/V6.0.1 file</b></font>
  
  

Revision as of 11:39, 11 October 2006

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


Overview

This TNG modification provides a simple connection to the Google Map facility from within the TNG software for each of the "Place" notations on the "getperson" page.

Resulting TNG features

  1. Within the person pages, an icon ( My tng map small.gif ) to the right of places (and left of the existing magnifier Tng search small.gif) will be displayed to link to the Google Map site. For example: John McFadyen on my TNG page.

Requirements

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


TNG Modifications V6.0.0/6.0.1

The following zip file contains the necessary information to allow the addition of this feature.

  • The zip file TNG_google.place_mod_1.1.zip contains 3 files:
    • my_tng_map_small.gif - a green magnifier glass for the goole map icon
    • get_google.php - the google map link function
    • personlib.php - a modified TNG V6.0.0/V6.0.1 file


  1. backup your existing TNG v6.0.0 personlib.php file
  2. download this zip (TNG_google.place_mod_1.1.zip)
  3. unzip it, examine the contents
  4. if you have NOT made any other modifications to your personlib.php file, then use this version of the file
  5. if you have made modifications to your personlib.php file, then you will need to manually add the feature by editing your own version of personlib.php
    • there are 4 short modifications to make: line 2-3, 12-15, 20-23, 420-423 of the supplied personlib.php file may be used as the example code, you can cut and paste from this file
  6. examine the get_google.php function
    • you may use it as is, but you may wish to modify some of the substitution strategy
    • read the section below regarding the get_google function modification
  7. copy the gif, get_google.php, and your modified or supplied personlib.php to your base TNG directory
  8. check it out



TNG Modifications V5.1.4 or earlier

The following zip file contains the necessary information to allow the addition of this feature.

  • The zip file TNG_google.place_mod.zip contains 3 files:
    • my_tng_map_small.gif - a green magnifier glass for the goole map icon
    • get_google.php - the google map link function
    • personlib.mods.txt - a description of the 4 mods to be performed in personlib.php


  • IF you are running v 5.1.4 then


  1. backup your existing TNG v5.1.4 personlib.php file
  2. download this zip (TNG_google.place_mod.zip)
  3. unzip it, examine the contents
  4. modify your personlib.php file with the 4 mods listed in the personlib.mods.txt
    • you can cut and paste from this text file
  5. examine the get_google.php function
    • you may use it as is, but you may wish to modify some of the substitution strategy
    • read the section below regarding the get_google function modification
  6. copy the gif, get_google.php, and your modified personlib.php to your base TNG directory
  7. check it out


  • IF you are NOT running v5.1.4 or you HAVE made changes to personlib.php then, you are on your own, however, the modifications are reasonably straight forward. If you are not completely comfortable doing this sort of update, then try upgrading to TNG v5.1.4 first. If you are still intent on trying it, the procedure above will likely be very close.


  • In the event of a problem with your TNG site
  1. copy your backup personlib.php to your base TNG directory
    • all should be well now
  2. you may also delete the get_google.php and my_tng_small_map.gif files


get_google function String Replacement

The simple function included in the get_google.php file scans the "place" string and performs a number of substitutions. These will be somewhat dependent on the structure you have used for place descriptions in your database.

In my case, many of my places refer to counties, townships, and other identifiers that do not exist today. For example, the place "Kincardine Township, Bruce County, Ontario, Canada" is not a location that Google is going to understand. However, "Kincardine, Ontario, Canada" would work for Google.

I often include other information that doesn't fit on a map. For example, the tag "DIED" may include info such as "at home" or "near Main Street" or "5 miles from the boundary". In these cases, I decided that I would include all such information in brackets. So I have locations like:

DIED: "(at home) Kincardine Township, Bruce County, Ontario, Canada" which turn into "Kincardine, Ontario, Canada"


With the previous examples in mind, I use the following rules to create google locations:

  • remove all text in brackets such that something like "(at home)" becomes ""
  • remove comma sections that contain "Township of...,"
  • remove comma sections that contain ",...Township"
  • remove any remaining strings "Township"
  • remove comma sections that contain "County of...,"
  • remove comma sections that contain ",...County"
  • remove any remaining strings "County"
  • remove comma sections that contain "Parish of...,"
  • remove comma sections that contain ",...Parish"
  • remove any remaining strings "Parish"

I am sure others will find rules that are more appropriate, or work better for their data set.

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