Difference between revisions of "Admin Media Predefined Search"

From TNG_Wiki
Jump to navigation Jump to search
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{construction
 
|notes=Under Construction<br>(The text of this article describes Version 18, but the visualizations are from Version 15.)<br>Robin Richmond 30 Sep 2019}}
 
 
{{V12_cust_text}}
 
 
{{TNGmod
 
{{TNGmod
 
| mod_name        = Admin Media Predefined Search
 
| mod_name        = Admin Media Predefined Search
 
|  mod_summary    = Adds a dropdown box to the Admin Media Search form that populates the search box with strings intended to do multi-valued searches for media objects of a particular media type. It is intended to facilitate reassigning new media items to a different category after a Gedcom upload.
 
|  mod_summary    = Adds a dropdown box to the Admin Media Search form that populates the search box with strings intended to do multi-valued searches for media objects of a particular media type. It is intended to facilitate reassigning new media items to a different category after a Gedcom upload.
 
| mod_validation  =  
 
| mod_validation  =  
| mod_last_update = 30 Sep 2019
+
| mod_last_update = 17 Dec 2019
| download_link  =  <div>[[Media:admin_media_predefined_search_v12.0.0.5.zip|v12.0.0.5.zip]]{{Tv120}}</div>
+
| download_link  =  [[Media:admin_media_predefined_search_v12.0.0.5.zip|v12.0.0.5.zip]]{{Tv120}}
 +
<div class='font-size:90%;'>See the [[#Revision_History|Revision History]] for older versions</div>
 
| download_stats  =
 
| download_stats  =
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
 
| mod_author      = [[User:Robinrichm|Robin Richmond]]
| mod_url        = [http://www.robinrichmond.com/family/ Robin Richmond's Genealogy Database]
+
| mod_url        = ''this page''
 
| mod_contact    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_contact    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form]
| mod_support    = [http://robinr.org/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
+
| mod_support    = [http://www.robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
| mod_version    = 12.0.0.8
+
| mod_version    = 12.0.0.5
 
| min_TNG_ver    = 10.1
 
| min_TNG_ver    = 10.1
 
| max_TNG_ver    = 12.2
 
| max_TNG_ver    = 12.2
 
|  TNG_file_list  = admin_media.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.php
 
|  TNG_file_list  = admin_media.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.php
<br>Installs shared files: rrinnermodmenu1_include.php, rrmodoptions1.php, img/rrmodadmin_wikilogo.png
+
<br>'''May Install''' rrshared_innermodmenu3.php, rrshared_modsettingsblocks3.php, rrshared_wikilogo.gif
 
| related_mods  = [[Show Mod Names]], [[Gedcom Import Mediatype]], [[Admin Media Search]],  
 
| related_mods  = [[Show Mod Names]], [[Gedcom Import Mediatype]], [[Admin Media Search]],  
 
| notes    =   
 
| notes    =   
Line 27: Line 24:
 
| __TOC__
 
| __TOC__
 
|}
 
|}
 
+
Because of the way that I edit data and create GEDCOM files (that is, with Family Tree Maker), all of my media items (for a given tree) are in a single media folder, and the TNG GEDCOM import process is unable to effectively categorize my media items.  TNG's GEDCOM import process does use file extensions to assign the media type of new media items, but all new .JPG's are identified as "photos".  So, I often wind up with numerous improperly-categorized media items.
Because of the way that I edit data and create GEDCOMS (that is, with Family Tree Maker), all of my media items (for a given tree) are in a single media folder, and the TNG GEDCOM import process is unable to effectively categorize my media items.  TNG's GEDCOM import process does use file extensions to assign the media type of new media items, but all new .JPG's are identified as "photos".  So, I often wind up with numerous improperly-categorized media items.
 
  
 
To re-categorize items, I search the "photos" collection for strings such as "stone", "grave", and "cemetery" to try to find headstones, and for strings such as "history", "notes", "story", or "obit" to try to identify "histories".  This searching is not completely accurate, of course, and it is laborious.
 
To re-categorize items, I search the "photos" collection for strings such as "stone", "grave", and "cemetery" to try to find headstones, and for strings such as "history", "notes", "story", or "obit" to try to identify "histories".  This searching is not completely accurate, of course, and it is laborious.
Line 34: Line 30:
 
This mod effectively automates that search scheme. In particular, it adds a drop-down box to the Administration >> Media search form that allows the user to select search strings customized for a particular media type. Those search strings contain comma-delimited keywords that are each searched for independently.  That is, the comma acts like an OR operator.
 
This mod effectively automates that search scheme. In particular, it adds a drop-down box to the Administration >> Media search form that allows the user to select search strings customized for a particular media type. Those search strings contain comma-delimited keywords that are each searched for independently.  That is, the comma acts like an OR operator.
  
==Compatibility With Other Mods==
+
==Mod Options==
 +
The options for this mod specify There is just one option, which allows the branch counts in admin_branches.php to be omitted on sites with so many records that the branch counts take too long.  That is, the option determines whether the program with display
 +
* The number of records in each branch, or
 +
* A flag that says that there ''are'' records in the branch.
 +
 
 +
These mod options are custom TNG settings, defined and edited in the form at Admin>>Setup>>General&nbsp;Settings, in a new subform named '''Robin's Mod's'''. This subform takes advantage of a scheme that I call '''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Blocks]'''.
 +
 
 +
==Compatibility==
 
This mod is fully compatible with [[Unused Media]], [[Admin Media Search]], and [[Private Media Mod]], the only other mods that affect admin_media.php.
 
This mod is fully compatible with [[Unused Media]], [[Admin Media Search]], and [[Private Media Mod]], the only other mods that affect admin_media.php.
 
==Dependencies on other Mods==
 
This mod generates that can be used by the [[Show Mod Names]] mod, which is completely optional.
 
  
 
==Related Mods==
 
==Related Mods==
 
* [[Gedcom Import Mediatype]] is specifically designed to help make process of reassigning Media Collections easier.  It allows you to specific a rarely used mediatype (say, Videos) as the default for new media items in a Gedcom Import.  With new media items assigned to, say Videos, instead of Photos, it will be much easier to identify the new items that need to be reassigned.  You still need this mod (or a more manual process), but [[Gedcom Import Mediatype]] helps to distinguish new media items from old ones.
 
* [[Gedcom Import Mediatype]] is specifically designed to help make process of reassigning Media Collections easier.  It allows you to specific a rarely used mediatype (say, Videos) as the default for new media items in a Gedcom Import.  With new media items assigned to, say Videos, instead of Photos, it will be much easier to identify the new items that need to be reassigned.  You still need this mod (or a more manual process), but [[Gedcom Import Mediatype]] helps to distinguish new media items from old ones.
 
* [[Admin Media Search]] also affects the Admin Media Search, and is more widely applicable than this mod.
 
* [[Admin Media Search]] also affects the Admin Media Search, and is more widely applicable than this mod.
== Installation ==
+
 
== Installation ==
+
== Installation ==  
This mod uses the standard installation procedure, though it should be noted that this mod contains two mod subfolders that are shared with other mods that implement ''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Blocks]''' Admin>>Setup forms, and '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner_Mod_Menus]'''. Because of the shared subfolders, as you unzip or copy the mod, you might get a warning noting that a folder already exists. You can just ignore that warning.<br>{{RobinInstallationBoilerplate}}
+
=== 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:
 +
## '''rrshared_innermodmenu3.php''' - [https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner&nbsp;Mod&nbsp;Menus]
 +
## '''rrshared_modsettingsblocks3.php''' - [https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Blocks]
 +
## '''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).{{RobinInstallationBoilerplate}}
 +
 
 
== Visualizations ==
 
== Visualizations ==
  
 
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="1" cellspacing="1" cellpadding="2" class="wikitable"
 
|-
 
|-
| <span style="color: red">'''AFTER:'''</span>
+
| <span style="color: red">'''AFTER INSTALLATION:'''</span>
 
|-
 
|-
| [[Image:admin_media_predefined_search-after.png]]
+
| [[Image:admin_media_predefined_search-after-wide.jpg|width=810]]
 
Note the highlighted drop-down list.  Only one entry is shown when the page is loaded; it has been expanded to list all of the predefined search choices.  When "Headstones" was selected, the related search string was stored in the Search field in the form.   
 
Note the highlighted drop-down list.  Only one entry is shown when the page is loaded; it has been expanded to list all of the predefined search choices.  When "Headstones" was selected, the related search string was stored in the Search field in the form.   
  
Line 63: Line 72:
  
 
== The search strings ==
 
== The search strings ==
The Admin Media Search form search the description, path, notes, and bodytext fields of a media item for one search string.
+
The following lines of PHP code, taken from config.php, show the nine search strings that are defined by default in the Admin Media Predefined Search options. Each statement (except 1) defines a set of search keys intended to find media items of the mediatype specified at the beginning of the string value. The second  subscript is the label that is displayed in the drop-down list through which you select which set of strings to search for.
  
The following lines in the English and English-UTF8 versions of cust_test.php define '''a single string''' named 'presearchvalue' that contains multiple multi-valued, case-insensitive search strings.
+
The search strings are SQL regular expressions that say, in effect "Find {this term} OR {this term] OR ...". The search string that does not use a regular expression is "U.S.".  When inside a regular expression, "U.S." would match any occurrence of a U and an S (upper or lower case) separated by one space. One could, in theory, use backslash-quoting to define a regular expression string for "U.S.", but the backslash-quoting is disrupted by the fact that the strings are passed as querystring parameters.  
 
<syntaxhighlight lang="php" enclose="div">
 
<syntaxhighlight lang="php" enclose="div">
$admtext['presearchvalue'] = "Census:census,ennumeration";
+
$rrconfig['MediaPredefinedSearches']['Censuses'] = "censuses:/(census)|(ennumeration)/";
$admtext['presearchvalue'] .= "\nHeadstones:stone,tomb,grave,memorial,burial,cemetery,marker,crypt,resting place";
+
$rrconfig['MediaPredefinedSearches']['Headstones1'] = "headstones:/(headstone)|(tomb)|([^a-z]grave[^a-z])|(^grave)|(crypt)|(marker)|(resting place)/";
$admtext['presearchvalue'] .= "\nDocuments1:index,births,deaths,marriages,U.S.,records,registration cards";
+
$rrconfig['MediaPredefinedSearches']['Documents1'] = "documents:/(index)|(births)|(deaths)|(marriages)|(records)|(registration cards)/";
$admtext['presearchvalue'] .= "\nDocuments2:death collection,marriage collection,certificate,license";
+
$rrconfig['MediaPredefinedSearches']['Documents2'] = "documents:/(death collection)|(marriage collection)|(certificate)|(license)/";
$admtext['presearchvalue'] .= "\nDocuments3:register,tax list,border crossings";
+
$rrconfig['MediaPredefinedSearches']['Documents3'] = "documents:/(register)|(tax list)|(border crossings)/";
$admtext['presearchvalue'] .= "\nHistories1:bio,history,histories,memoir,notes,story,obit";
+
$rrconfig['MediaPredefinedSearches']['Documents4'] = "documents:U.S.";
$admtext['presearchvalue'] .= "\nHistories2:article,letter,will ,will$,wills,probate";
+
$rrconfig['MediaPredefinedSearches']['Histories1'] = "histories:/(bio)|(history)|(histories)|(memoir)|(notes)|(story)|(obit)/";
 +
$rrconfig['MediaPredefinedSearches']['Histories2'] = "histories:/(article)|(letter)|(will )|(will$)|(wills)|(probate)/";
 +
$rrconfig['MediaPredefinedSearches']['Headstones2'] = "headstones:/([^a-z]stone[^a-z])(^stone[^a-z])|(tomb)|([^a-z]grave[^a-z])|(memorial)|(burial)|(cemetery)/";
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Each line in the 'presearchvalue' string will be presented to the user as an option in the new the new drop-down box called "Preloaded Searched" on the Admininstration >> Media Search form.  If you select "Headstones" from the drop-down box, the program will search for "stone" OR "tomb" OR "grave" (etc.). 
 
 
To accomplish this, the modified code places the keyword "OR:" at the front of the multi-valued search string.  The keyword "OR:" is not a search term, but it tells the program to treat the rest of the string as a series of comma-delimited search terms, each of which will satisfy the match.  '''Thus, with this mod installed, not only can you select one of the predefined search terms, but you can also simply simply type OR: at the beginning of a comma-delimited search string of your own, and force the program to search for ANY of the search terms, rather than the search string as a whole.'''
 
  
 
Note that
 
Note that
* A normal search looks in five fields in the Media table - mediaID, description, path, notes, and bodytext fields.  Preloaded searches, however, do not search the mediaID field.
 
 
* You might want to remove the term the term "stone" from the "Headstones" search string if you have a "Stone" family in your database.  The same goes for the term "story" in the "Histories" search string.
 
* You might want to remove the term the term "stone" from the "Headstones" search string if you have a "Stone" family in your database.  The same goes for the term "story" in the "Histories" search string.
 
 
* The term "will " in the "Histories2" search string contains a space so that names like "William" don't cause false matches.
 
* The term "will " in the "Histories2" search string contains a space so that names like "William" don't cause false matches.
 
* The dollar sign in the term "will$" in the "Histories2" search string represents the end of the target string, just like it does in regular expressions.  Given that "will " has a space at the end, "will$" allows the search to match "John Brown's will", while not matching "William".
 
* The dollar sign in the term "will$" in the "Histories2" search string represents the end of the target string, just like it does in regular expressions.  Given that "will " has a space at the end, "will$" allows the search to match "John Brown's will", while not matching "William".
 
* The search terms "will " and "will$" will, however, match "Will Smith Death Certificate".  
 
* The search terms "will " and "will$" will, however, match "Will Smith Death Certificate".  
 
To modify the search strings, you should create entries '''at the bottom of''' your cust_text.php file that '''completely redefine''' $admtext['presearchvalue'].  That is, you should start with a line such as
 
<syntaxhighlight lang="php" enclose="div">
 
$admtext['presearchvalue'] = "Census:census";
 
</syntaxhighlight>
 
followed by each additional search string, using the "assign and append" operator, ".=", and placing a colon after the search label (Census, Headstones, Documents1, Documents2, etc.).
 
  
 
== Revision History ==
 
== Revision History ==
'''*** The newest version of the mod is at the top of this table ***'''
 
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
{| border="0" cellspacing="1" cellpadding="2" class="wikitable"
 
! Mod Version !! TNG Version !! Date !! Note
 
! Mod Version !! TNG Version !! Date !! Note
Line 104: Line 102:
 
 
 
| Minimal changes to the user functionality in the Admin Media Search screen:
 
| Minimal changes to the user functionality in the Admin Media Search screen:
*Added my Inner Mod Menu
+
*Added an Inner Mod Menu and put the options in a mod Settings Block
 
*When the user selects a predefined search, the File Type is set to JPG, and the
 
*When the user selects a predefined search, the File Type is set to JPG, and the
*Collection is set to the collection (mediatype) defined by the selected string.
+
*Collection is set to the collection (the mediatype) defined by the selected string.
 
*This mod now depends on Admin Media Search v11
 
*This mod now depends on Admin Media Search v11
*The predefined searches are now implemented at Admin>>Setup>>General Settings>Miscellaneous rather than as language strings.
+
* Now that the Admin Media Search mod implements regular expressions for the search string, the multi-search-key strings that this mod generates are implemented as regular expressions. That is, the "OR:" kludge no longer exists.
*Now that the Admin Media Search mod implements regular expressions for the search string, the multi-search-key strings that this mod generates are implemented as regular expressions. That is, the "OR:" kludge no longer exists.
 
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
| [[Media:admin_media_predefined_search_v12.0.0.4.zip|12.0.0.4]]
 
| [[Media:admin_media_predefined_search_v12.0.0.4.zip|12.0.0.4]]

Revision as of 23:18, 17 December 2019

Admin Media Predefined Search
Summary Adds a dropdown box to the Admin Media Search form that populates the search box with strings intended to do multi-valued searches for media objects of a particular media type. It is intended to facilitate reassigning new media items to a different category after a Gedcom upload.
Validation
Mod Updated 17 Dec 2019
Download link v12.0.0.5.zip
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 12.0.0.5
Min TNG V 10.1
Max TNG V 12.2
Files modified
admin_media.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.php
May Install rrshared_innermodmenu3.php, rrshared_modsettingsblocks3.php, rrshared_wikilogo.gif
Related Mods
Notes


Purpose of the Mod

To make it easier to fix improperly categorized Media Items (i.e. those with wrong media type). By the way, in this context, the term "collection" is equivalent to "media type".

Because of the way that I edit data and create GEDCOM files (that is, with Family Tree Maker), all of my media items (for a given tree) are in a single media folder, and the TNG GEDCOM import process is unable to effectively categorize my media items. TNG's GEDCOM import process does use file extensions to assign the media type of new media items, but all new .JPG's are identified as "photos". So, I often wind up with numerous improperly-categorized media items.

To re-categorize items, I search the "photos" collection for strings such as "stone", "grave", and "cemetery" to try to find headstones, and for strings such as "history", "notes", "story", or "obit" to try to identify "histories". This searching is not completely accurate, of course, and it is laborious.

This mod effectively automates that search scheme. In particular, it adds a drop-down box to the Administration >> Media search form that allows the user to select search strings customized for a particular media type. Those search strings contain comma-delimited keywords that are each searched for independently. That is, the comma acts like an OR operator.

Mod Options

The options for this mod specify There is just one option, which allows the branch counts in admin_branches.php to be omitted on sites with so many records that the branch counts take too long. That is, the option determines whether the program with display

  • The number of records in each branch, or
  • A flag that says that there are records in the branch.

These mod options are custom TNG settings, defined and edited in the form at Admin>>Setup>>General Settings, in a new subform named Robin's Mod's. This subform takes advantage of a scheme that I call Mod Settings Blocks.

Compatibility

This mod is fully compatible with Unused Media, Admin Media Search, and Private Media Mod, the only other mods that affect admin_media.php.

Related Mods

  • Gedcom Import Mediatype is specifically designed to help make process of reassigning Media Collections easier. It allows you to specific a rarely used mediatype (say, Videos) as the default for new media items in a Gedcom Import. With new media items assigned to, say Videos, instead of Photos, it will be much easier to identify the new items that need to be reassigned. You still need this mod (or a more manual process), but Gedcom Import Mediatype helps to distinguish new media items from old ones.
  • Admin Media Search also affects the Admin Media Search, and is more widely applicable than this mod.

Installation

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]

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

AFTER INSTALLATION:
width=810

Note the highlighted drop-down list. Only one entry is shown when the page is loaded; it has been expanded to list all of the predefined search choices. When "Headstones" was selected, the related search string was stored in the Search field in the form.

Note also that the use has selected the collect "Photos", since (without Gedcom Import Mediatype) most new Media Items are assigned to "Photos" (in the single-collection-folder environment that this mod was designed for).

The user must also select the Mediatype that the photos matching this search will be moved to. In this case, it is set to "Headstones" (on the bottom row of buttons in the screen clip).

When the user clicks on "Search", the search results will list Photos that have the words "stone", OR "tomb", OR "grave", OR "burial" (etc) in the Media table description, path, notes, or bodytext fields. These results are (we hope) likely to yield Headstone photos, which belong in the Headstones collection. Upon seeing the results, the user can select the Photos that should be moved, and move several at once.

The search strings

The following lines of PHP code, taken from config.php, show the nine search strings that are defined by default in the Admin Media Predefined Search options. Each statement (except 1) defines a set of search keys intended to find media items of the mediatype specified at the beginning of the string value. The second subscript is the label that is displayed in the drop-down list through which you select which set of strings to search for.

The search strings are SQL regular expressions that say, in effect "Find {this term} OR {this term] OR ...". The search string that does not use a regular expression is "U.S.". When inside a regular expression, "U.S." would match any occurrence of a U and an S (upper or lower case) separated by one space. One could, in theory, use backslash-quoting to define a regular expression string for "U.S.", but the backslash-quoting is disrupted by the fact that the strings are passed as querystring parameters.

$rrconfig['MediaPredefinedSearches']['Censuses'] = "censuses:/(census)|(ennumeration)/";
$rrconfig['MediaPredefinedSearches']['Headstones1'] = "headstones:/(headstone)|(tomb)|([^a-z]grave[^a-z])|(^grave)|(crypt)|(marker)|(resting place)/";
$rrconfig['MediaPredefinedSearches']['Documents1'] = "documents:/(index)|(births)|(deaths)|(marriages)|(records)|(registration cards)/";
$rrconfig['MediaPredefinedSearches']['Documents2'] = "documents:/(death collection)|(marriage collection)|(certificate)|(license)/";
$rrconfig['MediaPredefinedSearches']['Documents3'] = "documents:/(register)|(tax list)|(border crossings)/";
$rrconfig['MediaPredefinedSearches']['Documents4'] = "documents:U.S.";
$rrconfig['MediaPredefinedSearches']['Histories1'] = "histories:/(bio)|(history)|(histories)|(memoir)|(notes)|(story)|(obit)/";
$rrconfig['MediaPredefinedSearches']['Histories2'] = "histories:/(article)|(letter)|(will )|(will$)|(wills)|(probate)/";
$rrconfig['MediaPredefinedSearches']['Headstones2'] = "headstones:/([^a-z]stone[^a-z])(^stone[^a-z])|(tomb)|([^a-z]grave[^a-z])|(memorial)|(burial)|(cemetery)/";

Note that

  • You might want to remove the term the term "stone" from the "Headstones" search string if you have a "Stone" family in your database. The same goes for the term "story" in the "Histories" search string.
  • The term "will " in the "Histories2" search string contains a space so that names like "William" don't cause false matches.
  • The dollar sign in the term "will$" in the "Histories2" search string represents the end of the target string, just like it does in regular expressions. Given that "will " has a space at the end, "will$" allows the search to match "John Brown's will", while not matching "William".
  • The search terms "will " and "will$" will, however, match "Will Smith Death Certificate".

Revision History

Mod Version TNG Version Date Note
12.0.0.5 12.0 - 12.2+ 30 Sep 2019 Minimal changes to the user functionality in the Admin Media Search screen:
  • Added an Inner Mod Menu and put the options in a mod Settings Block
  • When the user selects a predefined search, the File Type is set to JPG, and the
  • Collection is set to the collection (the mediatype) defined by the selected string.
  • This mod now depends on Admin Media Search v11
  • Now that the Admin Media Search mod implements regular expressions for the search string, the multi-search-key strings that this mod generates are implemented as regular expressions. That is, the "OR:" kludge no longer exists.
12.0.0.4 12.0+ 4 May 2018 No functional changes; made compatible with TNGv12.
10.1.0.4.zip 10.1 - 11.1.2 1 Dec 2017 Removed the second line from the cust_text.php target location search string.

Also repositioned the Predefined Search field in the form layout table to be compatible with a new version of Admin Media Search.

10.0.3.3 10.0.3 - 10.1.3 21 Feb 2016 The predefined strings dropdown list now maintains its selection after search and page operations within a search.

I also tweaked some of the predefined searches. This mod now uses (and depends on) Show Mod Names v2+.

10.0.3.2 10.0.3 - 10.1.2 01 Sep 2015 Added some search terms, and implemented special processing for "$" at the end of a search term to anchor that term to the end of a target string.
10.0.3.1 10.0.3 - 10.1.1 08 May 2015 Initial release.

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 Robin Richmond Mod developer 12.0.0.4 12.0.0 English