Gedcom Import Mediatype

From TNG_Wiki
Jump to navigation Jump to search
Gedcom Import Mediatype
Summary Provides a value for the mediatype value (i.e. collection) for all new Media records created by the a Gedcom Import, so that new media files don't get mixed into the existing collections, and you can more easily assign the correct mediatype for them.
Mod Updated 20 Dec 2019
Download link
TNG 12.0
See the Revision History for older versions
Download stats
Author(s) Robin Richmond
Homepage this page
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod v12.0.0.5
Min TNG V 10.0
Max TNG V 12.2
Files modified
admin_dataimport.php, admin_gedimport.php, gedimport_misc.php, admin_importconfig.php, admin_updateimportconfig.php, English/data_help.php, English cust_text.php
May Install rrshared_innermodmenu3.php, rrshared_modsettingsblocks3.php, rrshared_wikilogo.gif
Related Mods

Purpose of the Mod

This mod helps to assign new MediaTypes to several (or many) Media Items with the wrong MediaType. It is primarily useful after a Gedcom Import on sites that have a single Media folder and cannot depend on the folder name to distinguish among the Mediatypes (aka 'Collections').

With a single Media Folder, the Gedcom Import process can only use the media item "FORM" tag (i.e. the file extension) to distribute media items among Mediatypes. That often can work for, say, HTM and PDF file extensions, but .jpg file extensions are used in several Mediatypes.

This mod doesn't really help figure out which collection a new media item belongs to, but it can isolate the new media files into an otherwise rarely-used collection so that it is easier for the site administrator to find the new files and assign them to the right collection.

Mod Options

Both Mod Options supply default values to new run-time options on the Gedcom Import kickoff form.

  1. A comma-delimited list of file extensions that can belong to files in more than one Collection (aka MediaType).
    • For instance, JPG files could belong in Photos, Documents, Histories, etc., but if the Gedcom Import Process cannot assign a mediatype based on the collection folder the JPG file is stored in, then all JPG will be assigned the same Mediatype, which would ordinarily be Photos.
    • The default value for this mod option is "JPG,GIF,PNG,PDF"
  2. The Mediatype to which those files are to be assigned.
    • For instance, you could pick "Videos" (if you have only a few videos) so that the files will be easier to find and reassign.
    • The default value for this mod option is "Videos"


No known mod conflicts or dependencies. This mod is compatible with all the published mods that affect the Gedcom Import process.

Related Mods


Files Installed

This mod is packaged with a mod subfolder that is shared with several other mods. The shared folder RR-shared_mod_includes_v12.0.0.3 contains files that help to manage mod options in many of my mods:

  1. rrshared_innermodmenu3.php - Inner Mod Menus
  2. rrshared_modsettingsblocks3.php - Mod Settings Blocks
  3. img/rrshared_wikilogo.gif - An icon that links to a mod's TNG Wiki page from an Inner Mod Menu or Mod Settings Block

Each mod that contains the shared folder may install some or all of its shared files, depending on whether those files already exist, and whether that mod needs that particular file. Once a file from the shared folder has been installed (by any mod), that file will not be overwritten or removed by the subsequent installation or un-installation of any mod (including this one), nor will its presence or absence generate any Mod Manager errors.

If you unzip mod distribution files directly into your mods folder, then the presence of the shared subfolder and the installation of its files should be invisible to you. But if you generally copy mod subfolders to your mods folder after you have unzipped the distribution file, then you need to make sure to copy the folder RR-shared_mod_includes_v12.0.0.3 (well, unless you are confident that it is already in your mods folder because it was part of another mod).
[Show Installation Details]


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


  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.


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


Admin>>Import/Export - The Gedcom Import Kickoff Form BEFORE INSTALLATION:
Gedcom import monitor before.png
Admin>>Import/Export - The Gedcom Import Kickoff Form

This visualization shows how three related mods affect the form.

  1. The green rectangle shows the two new control implemented by Gedcom Import Mediatype (this mod).
  2. The cyan rectangles show new checkboxes and a default checkbox value implemented by Gedcom Import Purge, and
  3. The orange rectangles show the fields that Gedcom Import Purge puts on the form in place of the "Old style import" checkbox.

Gedcom import-3mods-after.jpg

The Gedcom Import Kickoff Form Inner Mod Menu'

Each of the three related Gedcom Import mods installs an Inner Mod Menu in the Gedcom Import kickoff form web page. The Gedcom Import Mediatype menu is the first one in this screen clip just by chance, based on the order in which the three mods were installed.

Gedcom import-3mods-innermodmenu.jpg
The Gedcom Import Mediatype Mod Options

The options are in a Mod Settings Block at Admin>>Setup>>Import Settings. You can jump straight there from the "Change Mod Options" link in the Inner Mod Menu.

Gedcom import-3mods-modsettingsblock.jpg

Revision History

Mod Version TNG Version Date Note 12.0 - 12.2+ 20 Dec 2019 The mod options are now in a Mod Settings Block, and the first option is a comma-delimited list of file extensions rather than a multi-select drop-down box of mediatypes. 12.0+ 15 May 2018 No functional changes; made compatible with TNGv12. 10.1+ 07 Nov 2017 Removed the second line from the cust_text.php target location search string 10.1+ 10 Jun 2017 Modified some fieldnames on the Gedcom Import Kickoff form, and removed dependencies on Show Mod Names (which is now optional) and Blue Info Button (which is now obsolete).|- 9.0-11.0 25 Mar 2016 Additional mod parameters; significantly reworked code 9.0-10.1.3 6 Feb 2016 I hadn't really tested v9 properly, and I updated the mod to use Show Mod Names v2. 9.0-10.1.3 6 Feb 2016 New mod.

Sites using this mod

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

URL User Note Mod-Version TNG-Version User-language
Robin Richmond's Genealogy Database - admin function; not visible. Robin Richmond Mod developer 12.2 English