Findagrave Media Link Import

From TNG_Wiki
Jump to navigation Jump to search
Findagrave Media Link Import
Summary Adds Find A Grave external media links to burials with Source/Citations that reference a Find A Grave Memorial.
Validation Admin application not validated.
Mod Updated {{{mod_last_update}}}
Download link for
TNG 10.0
TNG 9.0
findagrave_import_v9.0.0.0.zip
Download stats
Author(s) Wendel Voigt
Homepage Findagrave Media Link Import
Mod Support TNG Forums
Contact Developer TNG Forums
Latest Mod 9.0.0.0 for TNG V9 and up
Min TNG V 9.0.0
Max TNG V 10.0.0+
Files modified
Related Mods
Notes


Introduction

Inspired by Linking_To_Find_A_Grave but not inspired enough to individually add all the links by hand, I wanted an easier way to add Find A Grave external media links to burial events. Since I was already adding Find A Grave Source/Citations to individuals, I focused on using those citations to automatically add the Find A Grave links. This mod does the following:

  • Adds a custom 'Find A Grave' media type if it does not already exist
  • Searches through all the burial events looking for Source/Citations that contain the text 'findagrave.com' (This can be in the Source or the Citation and is not case sensitive.)
  • For each of those found, look for a Memorial number in the Citation. If found, go to findagrave.com, get the page, and extract the title. Then either add or update the media with the information and make sure it is linked to the person's burial event.

To use this mod, go to 'Administration', then 'Import/Export', then 'Secondary Processes' tab and finally click the 'Find-A-Grave Import' button.

Memorial Numbers

The Memorial numbers recognized automatically in the Citation can take the following forms:

  1. GRid=<digits> // as found in a Find A Grave URLs
  2. Memorial <number> <digits> // all case insensitive with zero or more spaces between the parts

where:

  • <digits> = one or more numbers 0 to 9. This is assumed to be the Find A Grave memorial number.
  • <number> = #, number, nummber, nr, nr., nbr, nbr., no, no., or blank/nothing/empty. Case Insensitive.

Examples of recognized Memorial Numbers:

and remember, either in the Source or in the Citation the keyword 'findagrave.com' (case insensitive) needs to be found. Examples include:

Requirements

  • A working TNG installation. This mod was initially tested on TNG Versions 9.2.2 and 10.0.3.
  • An installed current version of the Mod Manager.

Revision History

Version Date Contents
V9.0.0.0 xx September 2014 Original version findagrave_import_v9.0.0.0.zip

Automated Installation

For TNG V9 and above

TNG version: 9.0
  1. Download the appropriate zip file from the Mod Summary in the upper right hand corner
  2. After downloading the zip file, unzip it into your mods folder
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the living_flag_backup.cfg.

Upgrade to new version

  1. In the Mod Manager, uninstall the Mod
  2. Install the new version of the mod using the Automated Install procedure

Visual of mod

A typical burial field on a person's page before the mod. Findagrave Media Link Import

The same burial field on a person's page after the Find A Grave media has been added. Findagrave Media Link Import

The addition of the 'Find-A-Grave Import' button on the Import/Export >> Secondary Processes menu. Findagrave Media Link Import

An example list of the new Find A Grave media imported by the mod. Note the use of the Collection name to narrow down the list of media displayed. Findagrave Media Link Import

Custimization

Note the items below already have the default values shown included in the mod. No changes are automatically made to English/cust_text.php or English-UTF8/cust_text.php. But if you want to make changes to the behavior of the mod or to the language, you can manually add these to your customconfig.php file or if you prefer, your language/<language>/cust_text.php file. You only need to add entries that you want to change.

MediaType Definition

$text['FAG_type_ID']         = 'findagrave';
$text['FAG_type_display']    = 'Find A Grave';
$text['FAG_type_path']       = 'findagrave';
$text['FAG_type_liketype']   = 'photos';
$text['FAG_type_form']       = 'html';
$text['FAG_type_icon']       = 'findagrave.png';
$text['FAG_type_thumb']      = 'findagrave.png';
$text['FAG_type_exportas']   = 'findagrave';
$text['FAG_type_disabled']   = 0;

Various Constants

$text['FAG_search']          = 'FindAGrave.com'; // Primary search value for Source/Citations in burial events - case does not matter
// Only change the following line if findagrave.com changes the individual page url. %s is the Memorial number placeholder.
$text['FAG_url']             = "http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=%s";
$text['FAG_connecttimeout']  = 5;} // Connection timeout in seconds.  Only change if you need longer connection time to findagrave.com.
$text['FAG_timeout']         = 4;} // page timeout in seconds. Only change if you see a lot of timeouts retrieving the Find A Grave information.

Text

$text['FAG_txt_title']       = 'Find A Grave'; // Default title if it can't get the real one from findagrave.com
$text['FAG_txt_look']        = "Examine all burial citations...<br />\n";
$text['FAG_txt_noGRid']      = "<strong>No Find A Grave memorial found in the citation.</strong>";
$text['FAG_txt_exists']      = "Media type '%s'already exists.  No need to add.<br />\n";
$text['FAG_txt_insert']      = "Media type addition of '%s' <strong>%s</strong>.<br />\n";
$text['FAG_txt_record']      = "Tree:'%10s' ID:%7s Citation:%7s ";
$text['FAG_txt_FAGdata']     = "GRid:%10s Title:<i>%s</i> ";
$text['FAG_txt_FAGtimeout']  = "GRid:%10s <strong>Website Error %s: %s</strong> ";
$text['FAG_txt_media']       = "mediaID:%s medialinkID:%s ";
$text['FAG_txt_results']     = "%s <strong>%s</strong> ";
$text['FAG_txt_succeeded']   = 'succeeded';
$text['FAG_txt_failed']      = 'failed';
$text['FAG_txt_update_full'] = 'Full update';
$text['FAG_txt_update_part'] = 'Update without title';
$text['FAG_txt_add_full']    = 'Full addition';
$text['FAG_txt_add_part']    = 'Addition without title';
$text['FAG_txt_errors0']     = "had no errors";
$text['FAG_txt_errors1']     = "had trouble with getting website information";
$text['FAG_txt_errors2']     = "had update problems with database";
$text['FAG_txt_errors3']     = $text['FAG_txt_errors1']." and ".$text['FAG_txt_errors2'];
$text['FAG_txt_errsummary']  = "<strong>Summary</strong> Adds:%10s, Updates:%10s, Parital Updates:%10s, Find-A-Grave Errors:%10s, TNG Errors: %10s<br />";

In the event of a problem with your TNG site

  1. Try using the Mod Manager to remove the mod
  2. copy your backup admin_secondmenu.php and admin_secondary.php files

Removal of the media is a manual process. But it is not too difficult. To remove the 'Find A Grave' media:

  1. In administration, go to Media
  2. Set the Collection to 'Find A Grave'
  3. You can now click 'Select All' followed by 'Delete Selected' to remove the new media. Repeat for each page of 'Find A Grave' media.
  4. To remove the 'Find A Grave' media type, simply click on 'Delete' once you set the Collection to 'Find A Grave'

Developer

This mod was developed by Wendel Voigt

Sites using this mod

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

URL User Note Mod-Version TNG-Version User-language
VoigtWorld.com ... Wendel is the developer of the Findagrave Media Link Import Mod 9.0.0.0 9.2.2 English

Related Links

TNG Modules Involved

In TNG V9 and above, this mod modifies the following files:

  • admin_secondmenu.php
  • admin_secondary.php files