Jump to content
TNG Community

Cemetery place link

Recommended Posts


I cannot figure out how to programmatically link a record in the tng_cemetery table to a corresponding record in the tng_places table.

At least, that is what I think I need to do.

I have written a very useful tool for myself and would share with anyone who wanted it once it is perfected.

I use rootsmagic 7 to create gedcoms to import my Ancestry data into TNG. One of the great about Rootsmagic is that I don't have to do too much cleanup to the .ged file before I import. Looking at the rootsmagic generated .ged file I noticed that there are _WEBTAGs for all the findagrave entries in the file , however upon import into TNG that information is lost. It was not too difficult to write a small php file that generated a list from that gedfile with the individual's ID and the urls on each line. Then from that info, another php file puts all the findagrave links into TNG as an external link into the individual's page. All done practically instantaneously. 

However, then I decided to carry it a step further. I would put these links into a person's burial section along with the correct cemetery name. So you'd have the findagrave link there and also if you clicked the little magnifying glass next to the burial place you'd get a map and below it everyone else who was buried there. To do this, I wrote a file which read all the lines in the list I generated of the person's ID, and findagrave link. The program loads the link (findagrave) page, finds the cemetery name and location from the memorial page, then loads the cemetery page and retrieves the gps coordinates from a meta tag on that page and generates a new list with all that info on it. I could get a couple of hundred before their server stops me, times out or something, and then I'd have to do it again with the remaining entries. It took a few minutes and three runs before I got the whole list of 517 burials in 217 cemeteries. Then I created another php file which reads that list and puts all that into the website programmatically and instantly..

The problem is that when you click the magnifying glass next to the burial location it shows the cemetery name and every person buried there, but no map!

I solved that on my website by going to admin >  cemeteries and going to the edit page of each of the 217 cemeteries and checking the box to 'Copy the geocode information below to this place' and now they all work correctly. Even though they are all now working correctly on my site, having to manually edit each entry kind of takes a little out of the whole idea. I want to do the whole thing without editing anything.

Now to be clear, even when this current problem is solved, the program still needs a lot of cleanup. I found a couple of places on findagrave.com where there was a memorial, but no cemetery, which would cause an error in my program. That's what error-handling is for, so I am sure that and a couple of other details can be cleaned up. 

I am hopeful that someone out there with more knowledge of how tng works, and also more programming expertise will tell how I can do this all without having to manually edit afterwords.



Share this post

Link to post
Share on other sites
Jean-Luc Lauzon

Hi Jim

The Find a Grave link is exactly what I want. I use Brother's Keeper for genealogy software and it has a place for Findagrave link


on the Gedcom file this is exported as

1 _FGRAVE 147857547

How can I implement this so that I have like you, a findagrave icon and a link to the memorial?



Share this post

Link to post
Share on other sites

Hi Jean-Luc,

If all you are looking to do is manually place that link then it is easily done. I notice the Brother's Keeper Gedcom record "1 _FGRAVE 147857547" is actually the memorial ID to the record. You can enter into any browser "https://findagrave.com/memorial/147857547/". The page will redirect to https://www.findagrave.com/memorial/147857547/gilles-lauzon. This is the link to the page. Save it somewhere. Then you can go to [find a grave dot com] and add /assets/images/logo-fff.png to the url and download the 'findagrave' icon. Save it in /photos. Now you can go to Administration>>Media >> Add New Media Collection Photos. Check the box that says: "This media comes from an external source (you must supply your own thumbnail)."  Place the url in the Media URL box. Then check 'Specify Image' and in File name on site** box use the SELECT button to find the logo-fff.png file that you put in /photos. Then scroll down and give it a title. Save and continue. Add a link to a person like you would any other media (photos) and choose the event, usually 'Burial'. This will place the link and the icon on the page just as I had shown in the picture.

Now, what I was talking about in the post was that I had automated the process to read a rootsmagic gedcom file and find all the references to the findagrave records and connect those to the subject individuals and install the links automatically as well as create the new cemetery entry if there wasn't one before and get the coordinates for the cemetery so you could show a map of the cemetery and get directions there by clicking the little magnifying glass next to the cemetery name in the burial section. The name of he cemetery is automatically placed in the burial section. This will also list everyone else in the tree who is buried at that cemetery. I made that as a tool for myself and it could not be used unless someone has a basic understanding of php. The script reads the url and gets the microdata from findagrave's website that lists the cemetery and then follows the link to the cemetery page and gets the coordinates there. There are still a few kinks in it but I loaded several hundred find a grave entries from a couple of hundred cemeteries saving me many many hours of data entry. 

The problem here is that the part of the script that reads the gedcom file would have to be written specifically for the 'Brother's Keeper' exported gedcom file. If you have some expertise in that I could probably be of some help for you to automate the process.

Please let me know if I can be of further assist.

James Brown 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now