FindAGrave Links: Unterschied zwischen den Versionen

Aus TNG_Wiki
Zur Navigation springen Zur Suche springen
Zeile 189: Zeile 189:
 
! Languages
 
! Languages
 
|-
 
|-
|
+
|[http://www.robinrichmond.com/family/getperson.php?personID=I889&tree=rr Robin Richmond's Genealogy Database]
 
|[[User:Robinrichm|Robin Richmond]]
 
|[[User:Robinrichm|Robin Richmond]]
 
|Technical; moved top-of-file comment
 
|Technical; moved top-of-file comment

Version vom 23. September 2023, 15:33 Uhr

This mod did not require a new version for TNGv14
TNG 14.0
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 23 Sep 2023
Download link v13.0.0.5a
TNG 13.0
Download stats
Author(s) Robin Richmond
Homepage This page
Mod Support My Mod Support form
Contact Developer My Mod Support form
Latest Mod v13.0.0.5a
Min TNG V 12.0
Max TNG V 14
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.e s"http" is followed by parsing problem that alloinBoth changes listed above are made to the system

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, the new function rrFindAGraveLinks is called ONLY by insertLinks, and genlib.php is Included only by end-user programs. Consequently:

  • 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


== Fields to use TNG users employ a variety of techniques to incorporate references to FindAGrave Memorials in their databases. Some users, for example, 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

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

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, though it accomplishes a different task, though with the same goal of making it simple to link to and view FindAGrave pages. Burial Website Media Import, on the other hand, 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 turns cryptic FindAGrave references that are already in TNG data fields into hyperlinks to the appropriate FindAGrave 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 isertLinks() 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.

Installation

This mod uses the standard installation process. [Show Installation Details]

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
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 Richmond's Genealogy Database Robin Richmond Technical; moved top-of-file comment 12.0.0.5a 14 EN
Roger's Online Genealogy Roger Moffat I've created a small Mod so that the CRid works on the showmedia page also 12.0.0.5 13.1.1 EN
Schmit Heemskerk genealogy Rudi Schmit Private 12.0.0.4 12.0 EN,NL,DE
[1] Robin Richmond Mod developer 10.0.1.3b 11.1.2 English
Roots & Relatives Remembered Ron Krzmarzick Public & Private See Here See Here EN,DE,CS