FTM Gedcom Import

From TNG_Wiki
Jump to: navigation, search
FTM Gedcom Import
Summary Modifies the Gedcom import process to retain mediatype values for existing Media records.
Validation
Mod Updated {{{mod_last_update}}}
Download link For
TNG 10.1.2

ftm_gedcom_import_v10.1.2.2.zip
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod 10.1.2.2
Min TNG V 10.1,2
Max TNG V 10.1.2
Files modified
gedimport_misc.php
Related Mods
Notes


Purpose of the Mod

  • Undoes a change in the TNGv10.1.2 Gedcom import process that causes existing mediatype values to be ignored. (That is, with this mod in place, existing mediatype values are retained.)
  • Implements a mod parameter that lets you specify the default mediatype for new media items. This parameter can be used to specify a default mediatype that is not commonly used, so that you can easily identify new media items after the import is complete, and then use the Admininstration >> Media screen to specify their true mediatype.

On my site, I set the default mediatype to "videos" to make sure that new media items are not mixed in with old media items. FWIW, my Admin Media Predefined Search mod can be very useful for reassigning media types, whatever the default value.

Compatibility With Other Mods

No other mods affect get_import.php

The Mod Parameter

Identify a media type (e.g. photos, documents, videos, etc.) to be used as the default for new media items in an imported Gedcom file. The purpose of this parameter is to let you specify a default media type that is not commonly used, so that you can easily identify new media items after the import is complete, and then use the Admininstration >> Media screen to specify their true media type.

If you give it the value none, or make it blank, the media type value that is calculated from the Gedcom's FORM or FILE tags will be used.

If you specify a value (other than none), make sure that you specify an existing media type, without quotes, and note that, in most cases, the value should be all lower-case.

Defaults to (none)

Requirements

  • A working TNG installation; TNG v10.1.2 only.
  • An installed current version of the Mod Manager.

Automated Installation

  1. Remove and delete previous version of this mod.
  2. Backup the gedimport.misc.php, the only file updated by this mod.
  3. Download the .zip file, and 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.

In the event of a problem

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

Visualization of this Mod

There is no "visualization", as this mod does not affect the TNG screens; it only affects the one data item - the mediatype (i.e. the "collection") for media items in a Gedcom import.

How TNG Determines mediatypes

FWIW, here's how the Gedcom import process determines the mediatype of a media item. In TNGv10.1.2, it does this for every media item in the Gedcom file. With this mod, it does this only for new media items.

1. It uses the FILE attribute first. That is, if one of your collection values is found in the file path or filename, that value is saved as the mediatype. For example, a file stored in

 media/documents/Fred Jones Story.jpg

would be given a mediatype of "documents".

2. If the FILE attribute doesn't yield a mediatype, then the import process uses the TYPE attribute. TYPE is typically "photo" or "document"; sometimes "photo document" (which is interpreted as the "documents" mediatype. Some PC applications let the user specify other TYPE attributes, but my FTM Gedcom's don't have the TYPE attribute at all.

3. Last, if it hasn't come up with a mediatype yet, it uses the FORM attribute, or the FILE's filename extension. The include file tngmediatypes.php provides a mapping from file extensions to mediatypes. FWIW, I have changed my tngmediatypes.php file so the the ".DOC" extension is recognized as a history rather than as a documents.

Mod Change History

Mod Version TNG Versions Date Note
10.1.1.2 10.1.2 - 10.1.2 21 Sep 1015 Realized that this mod is only needed (and only works) for TNG v10.1.2. Changed where the mod parameter is implemented in the code.
10.1.0.1 10.1 - 10.1.2 18 Sep 1015 Initial release

Sites using this mod

If you download and install this mod, please add your site to the table below. (It's handy be able to notify users of a mod when there are problems or it is updated. So if you don't have edit rights to the Wiki, send me a support message saying that you are using the mod, and I'll add you.)

URL User Note Mod-Version/TNG-Version User-language
Robin Richmond's Genealogy Database Robin Richmond Admin page; not accessible 10.1.0.1/10.12 EN