Difference between revisions of "FindAGrave Links"

From TNG_Wiki
Jump to navigation Jump to search
(Display change)
(Display change)
Line 100: Line 100:
 
Notably, this mod does not use any features of [[Mod Setting Blocks]] and thus does not depend on it.
 
Notably, this mod does not use any features of [[Mod Setting Blocks]] and thus does not depend on it.
  
=== Files Modified ===
+
== Files Modified ==
 
# personlib.php - PHP function library that handles
 
# personlib.php - PHP function library that handles
 
#* Citations and media items (and their descriptive fields) in the Person Profile, Family Chart, and Family Group Sheet, and Group Sheet and,
 
#* Citations and media items (and their descriptive fields) in the Person Profile, Family Chart, and Family Group Sheet, and Group Sheet and,

Revision as of 08:35, 20 April 2024

FindAGrave Links
Summary Causes various TNG programs to display hyperlinks to FindAGrave.com pages when they encounter notes containing the strings GRid=nnnn (for graves), or CRid=nnnn (for cemeteries).
Validation
Mod Updated 03 Apr 2024
Download link For
TNG 14.0
14.0.0.6
For
TNG 13.0
13.0.0.5a
Download stats
Author(s) Robin Richmond
Homepage FindAGrave Links (This page)
Mod Support My Mod Support form
Contact Developer My Mod Support form
Latest Mod v14.0.0.6
Min TNG V 12.0
Max TNG V 14.0.4
Files modified
genlib.php (the insertLinks function), globallib.php, admin_genconfig.php, admin_updateconfig.php, cust_text.php English
Related Mods
Notes


Purpose of the Mod

  1. To support a shorthand notation that generates hyperlinks to FindAGrave memorials in the display of TNG note fields, and some fixed-length text (i.e. varchar) fields.
    • Links to FindAGrave Memorials can be expressed as G'Rid=memorial #. For example, GRid=12651680 will generate FindAGrave Memorial 12651680]
    • Links to FindAGrave cemetery pages can expressed as CRid=nnnn. For example, For example, CRid=639018 will generate FindAGrave Cemetery 639018
  2. Secondarily, to fix an error in the native PHP code that tries to convert URLS into hyperlinks when displaying certain note and varchar fields. That is, the native TNG code identifies URLs in these fields by the presence of "http" following a whitespace character or the beginning of the field. But it can generate invalid hyperlinks because it does not make sure that "http" is followed by an optional "s" and the string "://".

Files changed by this mod:

  1. In globallib.php, a new function named rrFindAGraveLinks expands the FindAGrave shorthand notation into hyperlinks.
  2. In genlib.php, the system function insertLinks() has been changed to
    • Change the search for "http" into a regex search for "https?://" and
    • Add a call to the new function rrFindAGraveLinks().

TNG pages where these changes take effect:

    • Person, Family, and Event notes in the Person Profile (getperson.php) and Family Group Sheets (familygroup.php)
    • Most Citation fields in the Sources section of the Person Profile and Family Group Sheets, and
    • Cemetery Notes in showmap.php, Source notes in showsource.php, Repository notes in showrepo.php, and Place notes in placesearch.php.
    • The media item's Bodytext field in showmedia.php

Notably,

  • In pristine TNG (i.e. as distributed) insertLinks can only affect end-user programs (as suggested by the fact that all of the TNG pages where these changes take effect (as listed above) are end-user programs.
  • For admin programs to add hyperlinks to varchar or notes fields, they must be modified by other mods to call # Most of the citation fields in the Sources section of the e=both changes described above are implemented in the system function insertLinks() which converts URLS (substrings that begin with "http") into hyperlinks.
    • This mod fixes an error that can cause insertLinks() to create invalid hyperlinks by ignoring the possibility that "http" is not followed by an optional "s" and "://"s.
    • This mod adds code to create hyperlinks from the FindAGrave shorthand notation described above. In native TNG, the function insertLinks is used to display
(But notably, insertLinks mistakenly creates hyperlinks from almost any substring that begins with "http", even in the absence of "://".)
  1. In globallib.pho (which is Included in many end-user and admin pages), this mod adds the function rrFindAGrave links, which is essentially a duplicate of the modified function insertLinks.
    • The idea here is to allow admin pages to turn URLs and FindAGrave codes into hyperlinks.
    • (??) However, this mod does not modify any admin pages so that they call function rrFindAGrave links. (??)

Other mods (listed below) add calls to insertLinks or rrFindAGrave links in various pages so that hyperlinks are generated from URLs and FindAGrave shorthand references in some fields generated by those pages. This mod:

  1. Changes insertLinks so that it also converts the FindAGrave codes described above into hyperlinks and

Usage of notation fields

TNG users employ a variety of techniques to incorporate references to FindAGrave Memorials in their databases. For example, some users prefer to create specific FindAGrave events, or to associate FindAGrave media items with Burial events. This mod will not help with those tasks.

However, this mod is quite helpful for users (like me) who

  • Define FindAGrave pages as Sources, and link to FindAGrave from Source Citations, and/or
  • Link to FindAGrave pages from Event notes.

Here's a summary of how I use FindAGrave data in personal events and sources, and where I insert FindAGrave references.

[Show Details]

First, I add a citation to events that are supported by the FindAGrave memorial page, e.g.

  • From the fundamental FindAGrave memorial data: Name and, usually, Birth, Death, and Burial
  • If the biography contains the names or dates of spouses and/or children, I may add citations for those names and events. However, if the page includes links to parents and children, I'll use citation from those relatives' own memorial pages.
  • If the biography mentions other life events, I'll usually add citations for those events, and may even create those events.

Realizing that that FindAGrave pages are usually not primary sources, I sometimes ignore events or event data mentioned in the page. However, I may consider the page (or at least some of its data) to be authoritative if the page includes document images or I decide that the author of the page probably has first-hand knowledge of events.

In the "page detail" field of the citation,

  • I always add the FindAGrave memorial page reference in the form GRID={memorial number}
  • I usually include the name that is listed at the at the top of the memorial page, especially if it is different from the name I already have. (Well, I don't worry about missing middle names or nickname.

In the citation text field of the citation, I may list some of the page's data. However, since the page is just one click away, I often just mention which items are included without quoting the data itself.

If the burial place is defined, I'll add a note to the person's burial event. Or if the burial place is omitted, I'll add that note to the death event (or if there no death data, the birth, or ... the name). In that note,

  • I always include the memorial page reference in the form GRID={memorial number}
  • I usually include the name that is listed at the top of the page (even it it matches the name I already have), and if the name on the gravestone is different, I'll sometimes include that name.
  • I often include an overview of the images on the citation page, parent/child links and of the information in the biography. But, again, since the memorial page is just one click away, I keep that information short. However, I usually mention the omission of a headstone photo. I also mention the presence of a biography if there is any meaningful substance to the biography.

FWIW, I usually don't add Individual records for the parents of my relatives' spouses. (After all, I have to stop somewhere.) However, if those names are listed in the memorial page (or in other data sources), I'll often put the the parents' names in a note attached to the person's birth event.

[Hide Details]

Compatibility

Numerous mods edit functions in genlib.php, but the only mods that I know of that edit the insertLinks functions are:

The remarkable Burial Website Media Import mod is much more powerful, flexible, and complex than FindAGrave Links, and though it accomplishes the same purpose (making it simple to link to and view FindAGrave pages), it does so in very different ways. Burial Website Media Import creates a batch-like Secondary Gedcom Import process that scans the TNG database for references (with varying syntax) to FindAGrave and to BillionGraves.com (and perhaps other sites), and creates media items that link directly to the appropriate external web pages.

On the other hand, this mod, (FindAGrave Links) does not change any data or create any objects; it simply finds textual FindAGrave shorthand references in descriptive fields and displays them as FindAGrave links in various TNG pages.

Related Mods

The Notes-Expand WWW Refs mod, like FindAGrave Links modifies the TNG insertLinks function to convert specific strings in text fields into hyperlinks. The native insertLinks function converts full URLs (beginning with http) into hyperlinks, and Notes-Expand WWW Refs does the same with web addresses that start with www.

As noted above, Placesearch-More Info, Admin Places Search, and Admin Cemeteries List modify placesearch.php)

  • Admin Places Search adds insertLinks() to Place notes, as displayed by Admin >> Places (admin_places.php), and
  • Admin Cemeteries List adds insertLinks() to the display of Cemetery notes, as displayed by Admin >> Cemeteries (admin_cemeteries.php) does the same thing for the Admin>>Cemeteries program that Admin Places Search does for Admin>>Places.

Notably, this mod does not use any features of Mod Setting Blocks and thus does not depend on it.

Files Modified

  1. personlib.php - PHP function library that handles
    • Citations and media items (and their descriptive fields) in the Person Profile, Family Chart, and Family Group Sheet, and Group Sheet and,
    • Notes and descriptive fields for People, Families, Places, Media Items, and DNA Tests in the various programs that display them.
  2. genlib.php - PHP function library for end-user programs that contains the function insertLinks($note), which now calls the new rrFindAGraveLinks() function in globallib.php
  3. globallib.php - A PHP function library that is used by both admin and end-user TNG pages. The new function rrFindAGraveLinks($notes) is placed in this file.

[Show Standard Installation Process]

Requirements

  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • You should backup files listed in the panel on the right.

Procedure

  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, Extract its .cfg file to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.

Problems?

  1. Try using the Mod Manager Remove capability
  2. Contact me through My Mod Support form.
[Hide Details]

Visualizations

Person Profile Burial Event BEFORE: FindAGrave links-before1.png
Person Profile Burial Event AFTER: FindAGrave links-after1.png
Person Profile Citation BEFORE: FindAGrave links-before2-citation.png
Person Profile Citation AFTER: FindAGrave links-after2-citation.png
showmap.php (i.e. Cemetery Detail) BEFORE: FindAGrave links-before3-cemetery.png
showmap.php (i.e. Cemetery Detail) AFTER: FindAGrave links-after3-cemetery.png
The pristine showmap.php does not call the insertLinks function. To enable it to expand FindAGrave links (or any URLs), you must install Admin Cemeteries List v11.0.0.8 or above.
placesearch.php (i.e. Place Detail) BEFORE: placesearch.php (i.e. Place Detail) AFTER:
FindAGrave links-before4-place.png
The pristine placesearch.php treats the Place note as though it were being displayed in a results table. That is, it truncates the Place note to the length specified by a TNG configuration parameter, and does not convert any URLs (much less FindAGrave references) to hyperlinks.
FindAGrave links-after4-place.png
The pristine placesearch.php does not call the insertLinks function. To enable placesearch.php to expand FindAGrave links (or any URLs), you must install Placesearch-More Info v11.1.1.2 or above (or Placesearch Entire Note, when it becomes available).

Revision History

Mod Version TNG Version Date Note
b14.0.0.6 14.0-14.0.3 3Apr2024 Now handles URLs and FindAGrave shortcut references in Media descriptions for event and citation Medialinks. That is, earlier versions of FindaGraveLinks
  • Did find and convert links in Media records that are attached directly to People and Families and thus that appear in the Mediatype data blocks (for Photos, Documents, Histories, etc.) but
  • Did not even look atMedia records that are attached to Events or Citations. But now it does.
v13.0.0.5a 14 23Sep2023 Technical; moved top-of-file comment
12.0.0.5 12.0+ 22Nov2018
  • Removed the admin options, since the old version of FindAGrave that uses GRid and CRid is gone.
  • No longer installs the FindAGrave widget, since the widget depended on the old version of FindAGrave.
  • Includes the correct filename from Show Mod Names
  • Removed case sensitivity of GRid and CRid.
12.0.0.4 12.0+ 15May2018 No functional changes; made compatible with TNGv12.
10.0.1.3b 10.0.1-11.1.2+ 11Dec2017 Now that FindAGrave has moved its new page design to www.FindAGrave.com, and its old design to old.FindAGrave.com, the options to select a FindAGrave URL have changed.
10.0.1.3a 10.0.1-11.1.1+ 29Aug2017 Changes:
  • Handles FindAGrave Cemeteries (as CRid=nnnn) as well as Graves (as Grid=nnnn)
  • Because there are now two FindAGrave sites, the TNG site's preferred FindAGrave Grave and Cemetery URLs are defined by a new TNG system variable that is defined at Admin>>Setup>>Configuration>>General Settings>>Miscellaneous. That option defaults to the original FindAGrave URL formation if no preference has been defined.
  • The code to convert FindAGrave references to hyperlinks is now in a new function in globallib.php where it can be found by mods that affect Admin programs.
10.0.1.1 10.0.1-11.0.2 27Dec2014 Initial Mod Release

Sites using this mod

If you download and install this mod, please add your site to the table below.

Site User Note Mod version TNG version Languages
Robin's Roots Robin Richmond Mod Developer 14.0.0.6 14.0.4 EN
Roger's Online Genealogy Roger Moffat Also using a small add-on that enables FindAGrave links in a few other places not covered by this Mod. 14.0.0.6 14.0.4 EN
Schmit Heemskerk genealogy Rudi Schmit Private 12.0.0.4 12.0 EN,NL,DE
Roots & Relatives Remembered Ron Krzmarzick Public & Private See Here See Here EN,DE,CS
Auf den Spuren meiner Ahnen Michael Klein Public & Private 12.0.0.5 14.0.4 EN,DE,NL
Family HIstories Steven Davis Public & Private 14.0.0.6 14.0.4 EN