Difference between revisions of "Burial Website Media Import"
Line 156: | Line 156: | ||
$BWMI_mod['web']['GTNL']['tagline'] = 'Graftombe.nl - Informatie over'; // Tag Line on Title, ie., extra stuff | $BWMI_mod['web']['GTNL']['tagline'] = 'Graftombe.nl - Informatie over'; // Tag Line on Title, ie., extra stuff | ||
$BWMI_mod['web']['GTNL']['match_url'] = "/names/info/"; // record prefix in URL | $BWMI_mod['web']['GTNL']['match_url'] = "/names/info/"; // record prefix in URL | ||
− | $BWMI_mod['web']['GTNL']['match_record'] = "Graf|Grafsteen | + | $BWMI_mod['web']['GTNL']['match_record'] = "Graf|Grafsteen"; // record references |
$BWMI_mod['web']['GTNL']['type_ID'] = 'graftombe'; | $BWMI_mod['web']['GTNL']['type_ID'] = 'graftombe'; | ||
Line 166: | Line 166: | ||
$BWMI_mod['web']['BGPNL']['title'] = 'Online Begraafplaatsen Graf'; // Default title if can't get real one | $BWMI_mod['web']['BGPNL']['title'] = 'Online Begraafplaatsen Graf'; // Default title if can't get real one | ||
$BWMI_mod['web']['BGPNL']['match_url'] = "[?&]g="; // record prefix in URL | $BWMI_mod['web']['BGPNL']['match_url'] = "[?&]g="; // record prefix in URL | ||
− | $BWMI_mod['web']['BGPNL']['match_record'] = "Graf|Grafsteen | + | $BWMI_mod['web']['BGPNL']['match_record'] = "Graf|Grafsteen"; // record references |
$BWMI_mod['web']['BGPNL']['type_ID'] = 'begraafplaatsen'; | $BWMI_mod['web']['BGPNL']['type_ID'] = 'begraafplaatsen'; | ||
Revision as of 11:59, 4 November 2014
Burial Website Media Import | |||
---|---|---|---|
Summary | Adds Find-A-Grave and BillionGraves external media links to burials with burial Source/Citations that reference a Find-A-Grave Memorial or BillionGraves record. | ||
Validation | Admin application not validated. | ||
Mod Updated | {{{mod_last_update}}} | ||
Download link | for
| ||
Download stats | |||
Author(s) | Wendel Voigt | ||
Homepage | Burial Website Media Import | ||
Mod Support | TNG Forums | ||
Contact Developer | My Mod Support | ||
Latest Mod | 9.0.0.4 for TNG V9 and up | ||
Min TNG V | 9.0.0 | ||
Max TNG V | 10.0.0+ | ||
Files modified | |||
Related Mods | none | ||
Notes | Based on Linking_To_Find_A_Grave |
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 the burial citations to automatically add the Find A Grave links. Since the introduction of this mod, it has been expanded to include BillionGraves records as well. This mod does the following:
- Adds a custom 'Find A Grave' media type if it does not already exist
- Adds a custom 'Billion Graves' media type if it does not already exist
- For each website ('findagrave.com' and 'billiongraves.com')
- Searches through all the burial events looking for Source/Citations that contain the webite address (i.e., 'findagrave.com' or 'billiongraves.com'). This can be in the Source or the Citation and is not case sensitive.
- For each of those found, look for a Memorial/Record number in the burial Citation. If found, go to the website, 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 'Burial Website Media Import' button.
Source / Citations Requirements
- The Source/Citation must be attached to a Burial.
- The Source or Citation must include the keywords 'findagrave.com' or 'billiongraves.com'. The following fields are examined:
- Source Long Title
- Source Short Title
- Source Publisher
- Source Actual Text
- Source Call Number
- plus the citation fields below
- The Citation must included a recognized Memorial or Record Number. The following fields are examined:
- Citation Page
- Citation Actual Text
- Citation Note
- Citation Description
Recognized Memorial or Record Numbers
The Memorial numbers recognized automatically in the Citation can take the following forms:
- GRid=<digits> // as found in a Find A Grave URLs
- /record/<chars>/<digits> // as found in a BillionGraves URLs
- Memorial <number> <digits> // all case insensitive with zero or more spaces between the parts
- Record <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 or the BillionGraves record number.
- <number> = #, number, nummber, nr, nr., nbr, nbr., no, no., or blank/nothing/empty. Case Insensitive.
- <chars> = one or more characters a to z and A to Z with no spaces
Examples of recognized Memorial Numbers:
www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=122620107 billiongraves.com/pages/record/number/122620107 Memorial #122620107 Memorial 122620107 Memorial No. 122620107 memorial no. 122620107 MeMoRiAl#122620107 record 122620107 Record Nbr 122620107 ReCoRd Number122620107
and remember, either in the Source or in the Citation the keyword 'findagrave.com' or 'billiongraves.com' (case insensitive) needs to be found. Examples include:
Findagrave.com FindAGrave.com www.BILLIONGRAVES.com www.billiongraves.com www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=122620107 billiongraves.com/pages/record/number/122620107
NOTE: Simply having the URL to a specific Find-A-Grave Memorial or BillionGraves Record in one of the Citation fields (e.g., Page or Note) will satisfy all the criteria for detection.
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.
Automated Installation
For TNG V9 and above
TNG version: | ≥ 9.0 |
- Download the appropriate zip file from the Mod Summary in the upper right hand corner
- After downloading the zip file, unzip it into your mods folder
- 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
- In the Mod Manager, uninstall the Mod
- 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.
The same burial field on a person's page after the Find A Grave media has been added.
The addition of the 'Find-A-Grave Import' button on the Import/Export >> Secondary Processes menu.
Example lists of the new media imported by the mod. Note the use of the Collection name to narrow down the list of media displayed.
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.
Note If you made customizations before v9.0.4, you will need to update. The base variable has changed from $text to $BWMI_mod to avoid collisions with other parts of TNG.
Burial Website Definition
// Find A Grave
$BWMI_mod['web']['FAG']['name'] = 'Find A Grave'; // Name of website
$BWMI_mod['web']['FAG']['search'] = 'FindAGrave.com'; // Primary search - case does not matter
$BWMI_mod['web']['FAG']['url'] = "http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=%s";
$BWMI_mod['web']['FAG']['title'] = 'Find A Grave Memorial'; // Default title if can't get real one
$BWMI_mod['web']['FAG']['tagline'] = '- Find A Grave Memorial'; // Tag Line on Title, ie., extra stuff
$BWMI_mod['web']['FAG']['thumb'] = 'findagrave_small.png'; // Displays on Media list
$BWMI_mod['web']['FAG']['type_thumb'] = 'findagrave.png';} // Displays on getperson
$BWMI_mod['web']['FAG']['match_url'] = "[?&]GRid="; // record prefix in URL
$BWMI_mod['web']['FAG']['type_ID'] = 'findagrave';
// Billion Graves
$BWMI_mod['web']['BG']['name'] = 'Billion Graves'; // Name of website
$BWMI_mod['web']['BG']['search'] = 'BillionGraves.com'; // Primary search - case does not matter
$BWMI_mod['web']['BG']['url'] = "http://billiongraves.com/pages/record/number/%s";
$BWMI_mod['web']['BG']['title'] = 'BillionGraves Record'; // Default title if can't get real one
$BWMI_mod['web']['BG']['tagline'] = '| Billion Graves Record'; // Tag Line on Title, ie., extra stuff
$BWMI_mod['web']['BG']['thumb'] = 'billiongraves_small.png'; // Displays on Media list
$BWMI_mod['web']['BG']['type_thumb'] = 'billiongraves.png'; // Displays on getperson
$BWMI_mod['web']['BG']['match_url'] = "/record/[a-zA-Z]+/"; // record prefix in URL
$BWMI_mod['web']['BG']['type_ID'] = 'billiongraves';
// graftombe.nl
$BWMI_mod['web']['GTNL']['enable'] = 0; // Disable by default
$BWMI_mod['web']['GTNL']['name'] = 'Graftombe'; // Name of website
$BWMI_mod['web']['GTNL']['search'] = 'graftombe.nl'; // Primary search - case does not matter
$BWMI_mod['web']['GTNL']['url'] = "http://graftombe.nl/names/info/%s";
$BWMI_mod['web']['GTNL']['title'] = 'Graftombe Graf'; // Default title if can't get real one
$BWMI_mod['web']['GTNL']['tagline'] = 'Graftombe.nl - Informatie over'; // Tag Line on Title, ie., extra stuff
$BWMI_mod['web']['GTNL']['match_url'] = "/names/info/"; // record prefix in URL
$BWMI_mod['web']['GTNL']['match_record'] = "Graf|Grafsteen"; // record references
$BWMI_mod['web']['GTNL']['type_ID'] = 'graftombe';
// www.online-begraafplaatsen.nl
$BWMI_mod['web']['BGPNL']['enable'] = 0; // Disable by default
$BWMI_mod['web']['BGPNL']['name'] = 'Online Begraafplaatsen'; // Name of website
$BWMI_mod['web']['BGPNL']['search'] = 'online-begraafplaatsen.nl' // Primary search - case does not matter
$BWMI_mod['web']['BGPNL']['url'] = "http://www.online-begraafplaatsen.nl/zerken.asp?g=%s";
$BWMI_mod['web']['BGPNL']['title'] = 'Online Begraafplaatsen Graf'; // Default title if can't get real one
$BWMI_mod['web']['BGPNL']['match_url'] = "[?&]g="; // record prefix in URL
$BWMI_mod['web']['BGPNL']['match_record'] = "Graf|Grafsteen"; // record references
$BWMI_mod['web']['BGPNL']['type_ID'] = 'begraafplaatsen';
// Default setting for all websites. Only need to add to definition if different.
$BWMI_mod['web']['x']['enable'] = 1;
$BWMI_mod['web']['x']['event'] = 'BURI'; // Event Type: Burial = 'BURI' or 'Burial'; Death = 'DEAT' or 'Death'
$BWMI_mod['web']['x']['match_url'] = "[?&]GRid=|/record/[a-zA-Z]+/";
$BWMI_mod['web']['x']['match_record'] = "Memorial|Record|Item";
$BWMI_mod['web']['x']['match_number'] = "number|nummer";
$BWMI_mod['web']['x']['match_numabbr'] = "nr|nbr|no|n";
$BWMI_mod['web']['x']['tagline'] = ''; // '' = No tag line. The "extra stuff" in website title
$BWMI_mod['web']['x']['title_no_year'] = 0 ; // 1= removed (yyyy - yyyy) or [yyyy - yyyy] from Title
$BWMI_mod['web']['x']['title_template']= $BWMI_mod['txt_sym_WEBfull']; // template for displayed title
$BWMI_mod['web']['x']['type_ordernum'] = 0 ;
$BWMI_mod['web']['x']['type_path'] = 'img';
$BWMI_mod['web']['x']['type_liketype'] = 'headstones';
$BWMI_mod['web']['x']['type_form'] = 'html';
$BWMI_mod['web']['x']['type_display'] = $BWMI_mod['web']['x']['name']; // Default to the same as name
$BWMI_mod['web']['x']['type_icon'] = 'img/tng_hs.gif'; // Displays on menu pulldown
$BWMI_mod['web']['x']['type_thumb'] = 'tombstone_color_small.png'; // Displays on getperson
$BWMI_mod['web']['x']['thumb'] = 'tombstone_color_small.png'; // Displays on Media list
$BWMI_mod['web']['x']['exportas'] = $text['BWMI_web']['x']['type_ID']; // Default to the same as type_ID
$BWMI_mod['web']['x']['type_disabled'] = 0 ;
// Required settings for each website
$BWMI_mod['web']['x']['name'] = 'Web Site Name'; // Name of website
$BWMI_mod['web']['x']['search'] = 'website.com'; // Primary search - case does not matter
$BWMI_mod['web']['x']['url'] = "http://website.com/pages/record/number/%s"; // %s is for record number
$BWMI_mod['web']['x']['title'] = 'Website Record'; // Default title if can't get real one
$BWMI_mod['web']['x']['type_ID'] = 'website'; // Unique name (no spaces)
Various Constants
$BWMI_mod['NewWindow'] = 1; // 1 = open link in new window, 0 = use same window
$BWMI_mod['log'] = 1; // 1 = log to {mods directory}/burial_website_media_import/log.txt, 0 = do not log
// Only change these if you are having trouble getting to websites.
$BWMI_mod['connecttimeout'] = 5; // Connection timeout in seconds to the website.
$BWMI_mod['timeout'] = 4; // Page timeout in seconds to load a web page.
Text
$BWMI_mod['txt_eol'] = "\r\n";
$BWMI_mod['txt_exists'] = "Media type '%s' already exists. No need to add.";
$BWMI_mod['txt_insert'] = "Media type addition of '%s' %s.";
$BWMI_mod['txt_look'] = "Examine all %s ('%s') citations...";
$BWMI_mod['txt_noID'] = "No Memorial or Record found in the citation.";
$BWMI_mod['txt_record'] = "Person:%s/%s, Citation:%s, ";
$BWMI_mod['txt_data'] = "Web:(%s) '%s'";
$BWMI_mod['txt_timeout'] = "Web:(%s) WEBSITE ERROR %s: %s";
$BWMI_mod['txt_media'] = "mediaID:%s %s, medialinkID:%s %s, ";
$BWMI_mod['txt_results'] = "%s: %s";
$BWMI_mod['txt_succeeded'] = 'SUCCESS';
$BWMI_mod['txt_failed'] = 'FAILED';
$BWMI_mod['txt_warning'] = 'WARNING';
$BWMI_mod['txt_updated'] = 'updated';
$BWMI_mod['txt_update_error'] = 'update Error';
$BWMI_mod['txt_added'] = 'added';
$BWMI_mod['txt_add_error'] = 'add Error';
$BWMI_mod['txt_nochange'] = 'no change';
$BWMI_mod['txt_unknown'] = 'unknown';
$BWMI_mod['txt_errors0'] = "had no errors";
$BWMI_mod['txt_errors1'] = "had trouble with getting website information";
$BWMI_mod['txt_errors2'] = "had trouble with the TNG database";
$BWMI_mod['txt_errors3'] = $BWMI_mod['txt_errors1']." and ".$BWMI_mod['txt_errors2'];
$BWMI_mod['txt_errsummary'] = "SUMMARY: Citations:%s, Media Adds:%s, Media Updates:%s, Media Errors: %s, MediaLink Adds:%s, MediaLink Updates:%s, MediaLink Unchanged:%s, MediaLink Errors:%s, Website Errors:%s";
$BWMI_mod['txt_sym_TNGname'] = '%N%'; // Title template symbols for Name of person in TNG
$BWMI_mod['txt_sym_TNGyear'] = '%Y%'; // Title template symbols for birth and death years of person in TNG
$BWMI_mod['txt_sym_TNGtitle'] = '%T%'; // Title template symbols for the generic website title $BWMI_mod['web'][x]['title']
$BWMI_mod['txt_sym_WEBname'] = '%n%'; // Title template symbols for Name of the person on the website
$BWMI_mod['txt_sym_WEByear'] = '%y%'; // Title template symbols for birth and death year of person on website
$BWMI_mod['txt_sym_WEBtitle'] = '%t%'; // Title template symbols for Tagline for website
$BWMI_mod['txt_sym_WEBfull'] = '%f%'; // Full web title
Customization Examples
To make these changes, just add the statements to your customconfig.php file:
Small Icons
This will change the mod to only use the small icons for Find A Grave and Billion Graves.
If you have already run the mod in the past, you will need to delete both media types first so the mod will add them back in with the correct image file.
// Mod: Burial Website Media Import
$BWMI_mod['web']['FAG']['type_thumb'] = 'findagrave_small.png';
$BWMI_mod['web']['BG' ]['type_thumb'] = 'billiongraves_small.png';
Changing the Media Title
By default the media title is set to the title of the webpage referenced. To change this, use the $BWMI_mod['web']['x' ]['title_template'] and $BWMI_mod['web']['x' ]['title_no_year'] settings.
Setting $BWMI_mod['web']['x' ]['title_no_year'] = 1 will remove the '(yyyy - yyyy)' from the title. It also works for '[yyyy - yyyy]'.
For $BWMI_mod['web']['x' ]['title_template'], the following symbols are used:
- %T% - the generic title for the website as set in $BWMI_mod['web'][x]['title']
- %n% - for the Name of the person extracted from the website title (not always perfect, works for Findagrave)
- %y% - for birth and death year extracted from the website title (not always perfect, works for Findagrave)
- %t% - for displaying the Tagline for website
- %f% - for the full title from the website
- %N% - for Name of person in TNG
- %Y% - birth and death years of person in TNG
Any other words or characters in $BWMI_mod['web']['x' ]['title_template'] remain.
// Mod: Burial Website Media Import
$BWMI_mod['web']['FAG']['title_no_year'] = 1;
$BWMI_mod['web']['FAG']['title_template'] = "%T% - %n% (%Y%)";
The above will set the media title to show the generic website Title, a '-', the name from the website, and the years from TNG in ().
WARNING: Using %N% and %Y% makes the ASSUMPTION that the person being referenced on the website is the same person on which the citation is located.
If you have citations that reference other individuals, then you will get strange results. So use with caution.
Using Dutch Sites instead of Find A Grave and Billion Graves
This will enable the 'graftombe.nl' and 'online-begraafplaatsen.nl' websites (both of which are already defined in the mod).
For both of these websites, it will change the event to be searched to the Death field (instead of the Burial field).
Finally, the Find A Grave and Billion Graves websites are disabled.
// Mod: Burial Website Media Import
$BWMI_mod['web']['GTNL']['enable'] = 1; // Enable 'graftombe.nl'
$BWMI_mod['web']['GTNL']['event'] = 'death'; // Look in Death field for citations for this website
$BWMI_mod['web']['BGPNL']['enable'] = 1; // Enable 'online-begraafplaatsen.nl'
$BWMI_mod['web']['BGPNL']['event'] = 'death'; // Look in Death field for citations for this website
$BWMI_mod['web']['FAG']['enable'] = 0; // Disable 'Find A Grave'
$BWMI_mod['web']['BG']['enable'] = 0; // Diable 'Billion Graves'
In the event of a problem with your TNG site
- Try using the Mod Manager to remove the mod
- 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. For example, to remove the 'Find A Grave' media:
- In administration, go to Media
- Set the Collection to 'Find A Grave'
- You can now click 'Select All' followed by 'Delete Selected' to remove the new media. Repeat for each page of 'Find A Grave' media.
- To remove the 'Find A Grave' media type, simply click on 'Delete' once you set the Collection to 'Find A Grave'
Revision History
Version | Date | Contents |
---|---|---|
V9.0.0.4 | 02 November 2014 |
%f% = full title from web (default), %t% = title from website without the tagline set by $BWMI_mod['web']['x']['tagline'], %T% = generic title set by $BWMI_mod['web']['x']['title'], %n% = name from website title after the tagline and years removed %y% = birth - death years from website title, %N% = name from TNG (women's married names appended to surname in order of marriage), %Y% = birth - death years from TNG The default is $BWMI_mod['web']['x']['title_template'] = "%f%", the full title from the website. EXAMPLE: $BWMI_mod['web']['FAG']['title_template'] = "%T% - %n% (%Y%)" will show the generic Title, the name from the website, and the years from TNG WARNING: Using %N% and %Y% makes the ASSUMPTION that the person being referenced on the website is the same person on which the citation is located. If you have citations that reference other individuals, then you will get strange results. So use with caution. |
V9.0.0.3 | 11 October 2014 |
|
V9.0.0.2 | 10 September 2014 |
|
V9.0.0.1 | 08 September 2014 |
|
V9.0.0.0 | 06 September 2014 |
|
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 Burial Website Media Import Mod | 9.0.0.2 | 9.2.2 | English |
BradyFamilyTree.org | ... | Western Australia | 9.0.0.2 | 10.0.0.3 | English |
Sorenson-Robey.org | ... | United States of America | 9.0.0.2 | 9.1.1 | English |
Mitchell Families Online | Roger Mitchell | A great mod, very well though out! | 9.0.0.4 | 10.0.3 & 10.1.0alpha2 | English |
De veenkoloniale genealogieen | Henny Savenije | Wendel did some efforts for me to add the Dutch graveyard sites. Great mod | 9.0.0.2 | 10.0.3 | English, Dutch, French etc |
Kemp(e) Family History | User:Kempons | Victoria, Australia | see User:Kempons | see User:Kempons | English |
Related Links
- See also Linking_To_Find_A_Grave
TNG Modules Involved
In TNG V9 and above, this mod modifies the following files:
- admin_secondmenu.php
- admin_secondary.php files