Difference between revisions of "Admin Media Search"

From TNG_Wiki
Jump to navigation Jump to search
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{construction  
 
{{construction  
|notes= This mod now can display detailed information about Citation Medialinks, which are new to TNGv12. I'm not real confident that I've tested all of the ways that Citation Medialinks can be organized. Please let me know through the mod support form if you have any problems.<br>Robin Richmond - 24 Feb 2020}}{{TNGmod
+
|notes=&nbsp;
 +
# Citation Medialinks are new to TNGv12 and not fully implemented in all TNG programs. Starting with mod version 12 (that is, v12.0.0.12) this mod displays detailed information about Citation Medialinks in the Admin>>Media>>Search 'Linked to'column. But I'm not real confident that I've tested all of the ways that Citation Medialinks can be organized, and that I display them in a way that everyone likes. Please let me know through the mod support form if you have any feedback on the way that Citation Medialinks are displayed.
 +
# I fully realize that this mod has too many features and options. I've looked into spinning off some of the features into other mods, but there are interactions among features that make accomplish that goal. In version 13 of this mod, I have changed the way the mod options operate so that you can more easily ignore features and modify groups of options with one click. I would appreciate feedback about this new mod-option-editing procedure, and about the mod and its features in general.
 +
Robin Richmond 18 Jul 2020}}{{TNGmod
 
| mod_name        = Admin Media Search
 
| mod_name        = Admin Media Search
 
|  mod_summary    = Adds numerous features to Admin>>Media>>Search, including new run-time search and display option. Perhaps most significantly, it adds hyperlinks to all objects shown in the "Links To" (i.e. medialinks) column and shows tag details for Citation Medialinks.
 
|  mod_summary    = Adds numerous features to Admin>>Media>>Search, including new run-time search and display option. Perhaps most significantly, it adds hyperlinks to all objects shown in the "Links To" (i.e. medialinks) column and shows tag details for Citation Medialinks.
 
| mod_validation  =  
 
| mod_validation  =  
| mod_last_update = 24 Feb 2020
+
| mod_last_update = 25 Jul 2020
| download_link  =  [[Media:admin_media_search_v12.2.0.12c.zip|12.2.0.12c.zip]]{{Tv1230}}{{Tv1220}}
+
| download_link  =  [[Media:admin_media_search_v12.2.0.13a.zip|12.2.0.13a.zip]]{{Tv1230}}{{Tv1220}}
<div>[[Media:admin_media_search_v12.0.0.12c.zip|12.0.0.12c.zip]]{{Tv1220}}{{Tv120}}</div>
+
<div style='clear:both;'>[[Media:admin_media_search_v12.2.0.12c1.zip|12.2.0.12c1.zip]]{{Tv1230}}{{Tv1220}}</div>
<div class='font-size:90%;'>See the [[#Revision_History|Revision History]] for older versions</div>
+
<div style='clear:both;'>[[Media:admin_media_search_v12.0.0.12c.zip|12.0.0.12c.zip]]{{Tv1220}}{{Tv120}}</div>
 +
<div style='font-size:90%;clear:both;'>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]]
Line 13: Line 17:
 
| mod_contact    = [http://robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_contact    = [http://robinrichmond.com/family/mod_support.php My Mod Support form]
 
| mod_support    = [http://robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
 
| mod_support    = [http://robinrichmond.com/family/mod_support.php My Mod Support form] or [http://tng.community/ TNG Community Forums]
| mod_version    = 12.2.0.12c
+
| mod_version    = 12.2.0.13a
 
| min_TNG_ver    = 10.1
 
| min_TNG_ver    = 10.1
 
| max_TNG_ver    = 12.3
 
| max_TNG_ver    = 12.3
 
|  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>'''May Install''' rrshared_innermodmenu3.php, rrshared_modsettingsblocks3.php, rrshared_wikilogo.gif
+
<br>'''May Install''' rrshared_modsettingsblocks4.php, img/rrshared_wikilogo.gif
 
| related_mods  = [[Admin Media Predefined Search]]
 
| related_mods  = [[Admin Media Predefined Search]]
| notes    =  You do not need to upgrade to from 12.0.0.12c to 12.2.0.12c if you use TNGv12.
+
| notes    =  # There is no benefit to upgrading from Admin Media Searchv.12.0.0.12c to 12.2.0.12c1 if you use TNGv12.2.
 
}}{| style="margin-right:0.5 em;" align="right"  
 
}}{| style="margin-right:0.5 em;" align="right"  
 
| __TOC__
 
| __TOC__
 
|}
 
|}
 
== Purpose of the Mod ==
 
== Purpose of the Mod ==
This distinctly complex mod is intended to make the Admin>>Media>>Search form more powerful and useful. To a significant degree, you can think of this mod as turning the search form into a report-generator. Among its features are:
+
This distinctly complex mod is intended to make the Admin>>Media>>Search form more powerful and useful. To a significant degree, you can think of this mod as turning the search form into a report generator. The mod implements ''many'' features. (The features listed here are flagged with &Dagger; if they can be adjusted by mod options. Most can also be suppressed altogether.)
 
* In the search form:
 
* In the search form:
*# The search string can be a regular expression
+
*# The search string can be a regular expression.
*# You can control which database fields to search.
+
*# You can control which database fields to search.&Dagger;
*# You can select several database fields to be added to the results table
+
*# You can select several database fields to be added to the results table.&Dagger;
*# There are sort order options
+
*# There are sort order options.&Dagger;
*# You can control the number of results per page
+
*# You can control the number of results per page.
 
* In the search results
 
* In the search results
 
*# The Tree name is shown in a new column when more than one tree is searched (as in other Admin programs).
 
*# The Tree name is shown in a new column when more than one tree is searched (as in other Admin programs).
 
*# Very significantly - '''This mod converts all of the medialinks in the "Linked To" column into hyperlinks'''
 
*# Very significantly - '''This mod converts all of the medialinks in the "Linked To" column into hyperlinks'''
*#* For citation medialinks, the tagnames of events supported by the citation are displayed. (See the [[#Citation_Medialinks|Citation Medialinks]] section below.
+
*# For citation medialinks, the tagnames of events supported by the citation are displayed.&Dagger; (See the [[#Citation_Medialinks|Citation Medialinks]] section below.
*# Some messages are printed in the Thumnail column when there is no thumbnail.
+
*# When there is a thumbnail path value, but the file is missing, the message "(missing)" is displayed in the thumbnmail column.
 +
*# Other messages can be printed in the Thumbnail column when there is no thumbnail path value.&Dagger;
 
<!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-features1 mw-customtoggle-features2" id='mw-customcollapsible-features1' style="text-decoration:underline;color:#0645ad;">&#91;More Features&#93;</div>
 
<!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-features1 mw-customtoggle-features2" id='mw-customcollapsible-features1' style="text-decoration:underline;color:#0645ad;">&#91;More Features&#93;</div>
 
<div class='mw-collapsible mw-collapsible-content mw-collapsed' id='mw-customcollapsible-features2 ' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
 
<div class='mw-collapsible mw-collapsible-content mw-collapsed' id='mw-customcollapsible-features2 ' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
Line 42: Line 47:
 
*# An HTML fieldset border is drawn around the search form to help distinguish the search form from the action buttons below the form.
 
*# An HTML fieldset border is drawn around the search form to help distinguish the search form from the action buttons below the form.
 
*# The "File Ext" text field has been changed to a "File Type" drop-down list.
 
*# The "File Ext" text field has been changed to a "File Type" drop-down list.
*# A mod option determines which database fields can be searched, and which are searched by default
 
 
*# New search options include:
 
*# New search options include:
 
*#* Radio buttons that limit the search to media items with thumbnails, or without them.
 
*#* Radio buttons that limit the search to media items with thumbnails, or without them.
*#* A checkbox that limits the search to items that have bodytext.
+
*#* A checkbox that limits the search to items that have bodytext.&Dagger;
*#* Checkboxes to select optional result values: Geocodes, the file path, the MediaID, and/or the Mediakey.
+
*#* Checkboxes to select optional result values: Geocodes, the file path, the MediaID, and/or the Mediakey.&Dagger;
*# Some fields utilize single-charter "field button" shortcuts, but only if the [[Field Button]] mod is installed.
+
*# Some fields utilize single-charter "field button" shortcuts, but only if the [[Field Buttons]] mod is installed.
 
* Search results
 
* Search results
*# The geocodes and file path are displayed in their own columns if they are selected in the search form.
+
*# The geocodes and file path are displayed in their own columns if they are selected in the search form.&Dagger;
*# When the file path has not been selected for display, the file extension (the 'FORM' attribute) is displayed in the "Title,Description" column.
+
*# When the file path has not been selected for display, the file extension (the 'FORM' attribute) is displayed in the "Title,Description" column.&Dagger;
 
*# The mediaid and mediakey share a column when they are selected in the search form.
 
*# The mediaid and mediakey share a column when they are selected in the search form.
*# A button in the "Linked To" column heading toggles the display of the event tags.
+
*# A button in the "Linked To" column heading toggles the display of event tags in citation medialinks.&Dagger;
*# Messages in the thumbnail column:
+
*# Messages in the thumbnail column:&Dagger;
 
*#* Invalid image filename
 
*#* Invalid image filename
 
*#* Missing file
 
*#* Missing file
 
*#* The filename extension (well, really, the 'FORM' attribute) for non-images (based on a mod option)
 
*#* The filename extension (well, really, the 'FORM' attribute) for non-images (based on a mod option)
 
* Other features
 
* Other features
*# The standard TNG Inner Menu now contains a drop-down menu that provides handy links to information about the mod and a direct link to the mod options editor. (I call this menu an '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu]''', and essentially all of my mods now (or will soon) add Inner Mod Menus to the programs that they alter significantly.
+
*# The standard TNG Inner Menu now contains a drop-down menu that provides handy links to information about the mod and a direct link to the mod options editor. I call this menu an '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu]''', and most of my mods now (or will soon) add Inner Mod Menus to the programs that they alter significantly.
 
'''Finer Details:'''
 
'''Finer Details:'''
 
# The "Linked to" column is allowed to wrap, thus allowing the "Title,Description" column to wrap less.
 
# The "Linked to" column is allowed to wrap, thus allowing the "Title,Description" column to wrap less.
Line 64: Line 68:
 
# What was a file extension textbox in the native code is now a "File Type" selection box.
 
# What was a file extension textbox in the native code is now a "File Type" selection box.
 
# When the Geocodes column is displayed, it uses abbreviations so that it is narrower than the native Geocoordinates column.
 
# When the Geocodes column is displayed, it uses abbreviations so that it is narrower than the native Geocoordinates column.
# Among the areas excluded from printing are the search form, the Action and Select columns, the page navigation buttons, and the action buttons above the results table.
+
# Under the assumption that, when you print the Admin>>Media>>Search page, you are focusing on the search results, several parts of the web page are omitted when the Admin>>Media>>Search page is sent to a printer. Among the areas excluded from printing are the search form, the Action and Select columns, the page navigation buttons, and the action buttons above the results table.  To print these parts of the page, you can do a screen capture and print the resulting screenshot image.  
# The reset button does reset all of the new search and display options (to the values they had when the page was loaded, not to the defaults they would have in a new browser session).
+
# The reset button resets all of the new search form options to the values they had when the page was loaded, not to the defaults they would have in a new browser session.
 
<!-- BUTTON AT THE BOTTOM OF TOGGLED CONTENT --><div class="mw-customtoggle-features1 mw-customtoggle-features2" style="text-decoration:underline;color:#0645ad;text-align:right;">&#91;Hide details&#93;</div>
 
<!-- BUTTON AT THE BOTTOM OF TOGGLED CONTENT --><div class="mw-customtoggle-features1 mw-customtoggle-features2" style="text-decoration:underline;color:#0645ad;text-align:right;">&#91;Hide details&#93;</div>
 
</div><!-- END TOGGLED CONTENT and END DOUBLE TOGGLE -->
 
</div><!-- END TOGGLED CONTENT and END DOUBLE TOGGLE -->
  
 
== Mod Options ==
 
== Mod Options ==
This mod's options are implemented as custom TNG settings, in a new ''''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Block]''' at '''Admin>>Setup>>General&nbsp;Settings>>Robin's&nbsp;Mods'''. The options and their effects are described here, and shown in the visualizations.
+
This mod's options are implemented as custom TNG settings, in a new '''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Block]''' at '''Admin>>Setup>>General&nbsp;Settings>>Robin's&nbsp;Mods'''. The options and their effects are described here, and shown in the visualizations.
  
<!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-options1 mw-customtoggle-options2" id='mw-customcollapsible-options1' style="text-decoration:underline;color:#0645ad;">&#91;See details&#93;</div>
+
<!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-options1 mw-customtoggle-options2" id='mw-customcollapsible-options1' style="text-decoration:underline;color:#0645ad;">&#91;Options for mod version 12&#93;</div>
<div class='mw-collapsible mw-collapsible-content mw-collapsed' id='mw-customcollapsible-options2 ' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
+
<div class='mw-collapsible mw-collapsible-content mw-collapsed toccolours' id='mw-customcollapsible-options2 ' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
The options are organized into three groups:
+
The options in Admin Media Search version 12* are organized into three groups:
 
# '''Media fields that can be searched, and whether they are searched by default'''.
 
# '''Media fields that can be searched, and whether they are searched by default'''.
 
#* The fields that you chose as fields that "can be searched" are presented on the search form as checkboxes.
 
#* The fields that you chose as fields that "can be searched" are presented on the search form as checkboxes.
Line 93: Line 97:
 
##* (<span style='color:brown'>Missing</span>) - There is a thumbnail path, but the file is missing.
 
##* (<span style='color:brown'>Missing</span>) - There is a thumbnail path, but the file is missing.
 
##* (<span style='color:brown'>{filename extension}</span>) - There is no file type, but there is a file extension in the media path.  
 
##* (<span style='color:brown'>{filename extension}</span>) - There is no file type, but there is a file extension in the media path.  
<!-- BUTTON AT THE BOTTOM OF TOGGLED CONTENT --><div class="mw-customtoggle-options1 mw-customtoggle-options2" style="text-decoration:underline;color:#0645ad;text-align:right;">&#91;Hide details&#93;</div>
+
<!-- BUTTON AT THE BOTTOM OF TOGGLED CONTENT --><div class="mw-customtoggle-options1 mw-customtoggle-options2" style="text-decoration:underline;color:#0645ad;text-align:right;">&#91;Hide options for mod version 12&#93;</div>
 +
</div><!-- END TOGGLED CONTENT and END DOUBLE TOGGLE *********************************** -->
 +
<!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-options131 mw-customtoggle-options132" id='mw-customcollapsible-options131' style="text-decoration:underline;color:#0645ad;">&#91;Options for mod version 13&#93;</div>
 +
<div class='mw-collapsible mw-collapsible-content mw-collapsed toccolours' id='mw-customcollapsible-options132' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
 +
Admin Media Search version 13 has essentially the same features and options as version 12 of the mod.  The primary effect of mod version 13 is to reorganize the (too-)many options so that (I hope) they are simpler to manage. The options in Admin Media Search version 13 are divided into seven groups, three of which are single options, and four of which allow
 +
* The entire group of options to be set to values that achieve the native Admin>>Setup>>Search functionality; (i.e. to disable the features handled by the group),
 +
* The entire group of options to be set to recommended settings,
 +
* The entire group of options to be ignored,
 +
* Each option to be edited.
 +
The mod options block initially looks like this:<div>[[Image:admin_media_search-modoptionsblock.jpg]]</div>(The colored borders help you keep track of the options groups as they jump around on the screen a bit when you open and close the groups.)
 +
 
 +
I'll focus on group 1 to illustrate details.
 +
 
 +
Here's what you see if you click both the "See Native Behavior" ''and'' "See Recommended Behavior" buttons.<div>[[Image:admin_media_search-optionsgroup1-behavior.jpg]]</div>
 +
The descriptions give you a glimpse of how the settings would affect the Admin>>Media>>Search behavior, without requiring you to look at and make decisions about each option. If you just want to make sure that the program takes on the native or recommended behavior, you still don't have to see all of the options in their form fields. You can just click "Apply" and ignore those details.
 +
 
 +
Here are the form fields for group 1, after they are opened by by the 'Show Settings' button. <div>[[Image:admin_media_search-optionsgroup1-settings.jpg]]</div>Unfortunately, the options program cannot tell you whether the option values are set to the native settings, the recommended settings, or custom settings. I've looked into doing that, but would take too much time to implement. But still, the point is that you don't have to deal with all of the options individually - saying, in effect, 'Don't bother me with the details".
 +
<!-- BUTTON AT THE BOTTOM OF TOGGLED CONTENT --><div class="mw-customtoggle-options131 mw-customtoggle-options132" style="text-decoration:underline;color:#0645ad;text-align:right;">&#91;Hide options for mod version 13 &#93;</div>
 
</div><!-- END TOGGLED CONTENT and END DOUBLE TOGGLE -->
 
</div><!-- END TOGGLED CONTENT and END DOUBLE TOGGLE -->
  
Line 100: Line 121:
  
 
<!--  
 
<!--  
TNGv12 introduced the ability for TNG to record medialinks to citations, but didn't fully implement them in programs that display information about citations or medialinks. TNGv12.2 added citation medialink-handling in admin_media.php, but I wasn't crazy about that implementation, so I've used v12.0.0.12b to change it for all incremental versions of TNGv12.
+
TNGv12 introduced the ability for TNG to record medialinks to citations, but didn't fully implement them in programs that display information about citations or medialinks. TNGv12.2 added citation medialink-handling in admin_media.php, but I wasn't crazy about that implementation, so I've used Admin Media Search v12.0.0.12b to change it for all incremental versions of TNGv12.
  
 
Here's a summary of the complications introduced by citation medialinks:
 
Here's a summary of the complications introduced by citation medialinks:
Line 198: Line 219:
  
 
==Compatibility==
 
==Compatibility==
This mod is fully compatible with [[Unused Media]] and [[Private Media Mod]].
+
This mod is fully compatible with the only other mods that affect admin_media.php - [[Unused Media]], [[Private Media Mod]], and [[Admin Media Predefined Search]].
  
 
==Related Mods==
 
==Related Mods==
 
* [[Admin Media Predefined Search]], ''which is dependent on this mod'', adds a search feature to Admin Media Search that is helpful in a particular situation - in short, when a TNG site mixes files of different Mediatypes (documents, photos, histories, etc.) in a single media folder.  This situation generally occurs when a genealogy applications that feeds data to TNG cannot handle multiple folders. Family Tree Maker is one such application.
 
* [[Admin Media Predefined Search]], ''which is dependent on this mod'', adds a search feature to Admin Media Search that is helpful in a particular situation - in short, when a TNG site mixes files of different Mediatypes (documents, photos, histories, etc.) in a single media folder.  This situation generally occurs when a genealogy applications that feeds data to TNG cannot handle multiple folders. Family Tree Maker is one such application.
 
* [[Media Bodytext]] (which has not been released as I write this) changes some features of admin_editmedia.php and showmedia.php - especially with respect to BodyText values.
 
* [[Media Bodytext]] (which has not been released as I write this) changes some features of admin_editmedia.php and showmedia.php - especially with respect to BodyText values.
 +
* The "Field Buttons" attached to the search string field and the new 'Results per page' search form field are visible only if the optional [[Field Buttons]] form is installed. Field Buttons provide single-click execution of field editing tasks such as clearing the field, returning to the value the field had when the program was loaded, and selecting a default value.
 +
* The mod's '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu]''' is visible (and only to TNG admins) only if the optional [[Inner Mod Menus]] is installed. The Inner Mod Menu gives TNG Admins handy access to information about the mod, and to the mod options.  The Admin>>Media>>Search Inner Mod Menu is illustrated in the last visualization below.
 
* This mod saves data that '''can be used by''' the ''optional'' [[Show Mod Names]] utility mod, but this mod is '''not''' dependent on [[Show Mod Names]].
 
* This mod saves data that '''can be used by''' the ''optional'' [[Show Mod Names]] utility mod, but this mod is '''not''' dependent on [[Show Mod Names]].
  
 
== Installation ==
 
== Installation ==
 
=== Files Installed ===
 
=== 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.4''' contains files that help to manage mod options in many of my mods:
+
This mod has two mod subfolders:
## '''rrshared_innermodmenu4.php''' - [https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner&nbsp;Mod&nbsp;Menus]
+
# The folder with the same base name as the mod that you expect to exist for any mod that installs files. But, in this mod, the folder does not contain any files that are installed by the mod. However, it does contain critical files that contain the mod's language strings, which are not installed in the standard cust_text.php files. Instead, the language strings are loaded in modified programs from files in the mod's '''languages/''' subfolder. [https://tng.lythgoes.net/wiki/index.php?title=User:Robinrichm#5._Language_Strings Read more about this technique].<br>
 +
# The shared folder '''RR-shared_mod_includes_v12.0.0.4''' contains files that help to manage mod options in many of my mods:
 
## '''rrshared_modsettingsblocks4.php''' - [https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Blocks]
 
## '''rrshared_modsettingsblocks4.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
+
## '''img/rrshared_wikilogo.gif''' - An icon that links to a mod's TNG Wiki page from a 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. 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.  
 
Each mod that contains the shared folder may install some or all of its shared files, depending on whether those files already exist. 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.  
  
Line 223: Line 246:
 
|'''<span style="color:red">1. Admin>>Media>>Search BEFORE</span>'''
 
|'''<span style="color:red">1. Admin>>Media>>Search BEFORE</span>'''
 
<div>[[Image:admin_media-before-v12.jpg]]</div>
 
<div>[[Image:admin_media-before-v12.jpg]]</div>
* There is no "Tree" column, even though "All Trees" have been selected.
+
* There is no "Tree" column, even though "All Trees" has been selected.
 
* In the results table, the thumbnail in the 3rd row looks exactly like the one in the first row, because ''it is the same file''. In this case, the third media item has an invalid thumbpath value. Sometimes (I don't know why it doesn't always happen), the program displays the very first thumbnail in the thumbnails folder when it encounters a invalid path.
 
* In the results table, the thumbnail in the 3rd row looks exactly like the one in the first row, because ''it is the same file''. In this case, the third media item has an invalid thumbpath value. Sometimes (I don't know why it doesn't always happen), the program displays the very first thumbnail in the thumbnails folder when it encounters a invalid path.
 
* In the second and fourth rows, we don't know whether the thumbnail cell is blank because there is no thumbnail path value, or because the file is missing.
 
* In the second and fourth rows, we don't know whether the thumbnail cell is blank because there is no thumbnail path value, or because the file is missing.
* The "Linked to" column is wider than it needs to be, because it has a fixed width. The data in that column is also not allowed to wrap.
+
* The "Linked to" column is wider than it needs to be, because it has a fixed width. The data in that column is also not allowed to wrap. The links are hyperlinks in browsemedia.php, but not in admin_media.php
  
 
|- <!-- ****************************************** -->
 
|- <!-- ****************************************** -->
 
|'''<span style='color:red;'>2. Admin>>Media>>Search AFTER</span>''', with most of the run-time display options unchecked, and with the options that display extra information in the thumbnail column unchecked.
 
|'''<span style='color:red;'>2. Admin>>Media>>Search AFTER</span>''', with most of the run-time display options unchecked, and with the options that display extra information in the thumbnail column unchecked.
 
<div>[[Image:admin_media-after1-v12.jpg]]</div>
 
<div>[[Image:admin_media-after1-v12.jpg]]</div>
# "Mod Information" is the label for the '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu]''', which is shown in a later visualization.
+
# "Mod Information" is the label for the '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu]''', which is visible only if the optional [[Inner Mod Menus]] mod is installed. Its contents are shown in a visualization below.
# The informal icon pop-up a message about the search string.
+
# Three features tied to the search string field
#* It notes that the search string can be a regular expression, and give a couple of examples.
+
## The placeholder text notes that the search string can now be a regular expression.
#* It describes the search field's field buttons, which, in this screen shot, are shaded out. The field buttons appear only if the '''[[Field Buttons]]''' mod is installed.
+
## The shaded block next to the search string represents two "Field Buttons" that are shaded out because of the status of the search string field in this screenshot.
# The "Search fields" line is defined strictly by this mod.  It lists the searchable database fields, as defined by mod options. The mod options alto control which boxes are checked ''for the first search you do in a browser session''. After that (as with other search form options like the search string) search forms default to the values used in the most recent search.
+
##* The "X" button is shaded out here because the field is already empty. It is visible in Screenshots 3 and 4 below.
# The "Search Criteria" line exists (with different labels) in the native search form. Here, all options are new or changed, except for the "Unlinked Only" checkbox.
+
##* The "R" button (which restores the initial value of the field) is shaded out here because the field has not been changed since the page was loaded.
#* The native form has a "File Ext" text box, which this mod replaces with a "File Type" selection box. The new selection box accomplishes the same thing as the old text field; it just lets you select file types (i.e. file extensions) from a list.
+
## The information icon pops up a message about the new features in the search string. The pop-up message is shown in Visualization 4.
 +
##* The popup notes that the search string can be a regular expression, and gives a couple of examples.
 +
# The row of "Search fields" has been added by this mod.  It determines which database fields are searched by a Media search.  
 +
#* Mod options control which database fields are shown here, and whether they are checked by default.
 +
#* A mod option can suppress the entire "Search fields" row.  If the search field options are suppressed, the searches look at the Title and Description fields.
 +
#* (As you may know, in Admin>>Media>>Search, the field identified as "Title" is really the database field "description", and the field identified as "Description" is really the database field "notes".)
 +
# The "Search Criteria" row exists (with different labels) in the native search form. Here, all options are new or changed, except for the "Unlinked Only" checkbox.
 +
#* The native form has a "File Ext" text box, which this mod replaces with a "File Type" selection box. The new selection box accomplishes the same thing as the old text field; it just lets you select file types (i.e. file extensions) from a list, and prevents you from entering a file extension that does not exist in the database. The selection box also has a "no file" option for media items that have BodyText but no file.
 
#* Three radio buttons determine if the search will focus on media items with or without a thumbnail path value.
 
#* Three radio buttons determine if the search will focus on media items with or without a thumbnail path value.
#* I didn't implement three choices for BodyText, as I did for the thumbnail. The single textbox seemed sufficient.
+
#* The presence of the "Has Body Text" checkbox is controlled by a mod option.  (Note that "Has Body Text" could be implemented with three radio buttons, like the thumbnails buttons, but the single box seemed sufficient.)
# The "Display options" line is also created by this mod.
+
# The "Display options" row of options is added by this mod.
#* The four checkboxes determine whether those values will be added to the results table.
+
#* Mod options control which optional columns are shown here, and whether they are checked by default.  All of the checkboxes can be suppressed,  in which case the results table will always have the Geocoordinates column that is shown by the native Admin>>Media>>Search page. (But the Geocoordinates column will be abbreviated, as described in item 7 below.
#* The "Results per page" field overrides the TNG system value, but the "D" field button next to the field applies that system value
+
#* The "Results per page" field overrides the TNG system value.  This field has three field buttons:
#** The "A" (for "All") button is very handy when you want to print all results. Without this field, you would have to print the media items page-by-page, and with the "A" setting, you'll get appropriate printed page breaks.
+
#** The "R" button, as with the search string field, restores the value the field had when the page first loaded,
# The "Sort By" link was also created by the mod, but is quite easy to cover, as it is just a four options radio button set.
+
#** The "D" field button next to the field applies the default value - the TNG system value called maxsearchresults, and
# Changes to the result table columns (not their contents; just the columns):
+
#** The "A" shows "All" results.  If you want to ''print'' all results using the maxsearchresults value, you would have to print the media items page-by-page, where each web page would leave wasted space on a printed page.  But with the "A" setting, you'll get appropriate printed page breaks.
#* The "Title,Description" column is now "Title,Description,FileExt" (sometimes) because I display the media item's file extension ('FORM' field) just after the title. The file type is important to me, and this seemed to be a good way to replace some whitespace with data.
+
# The "Sort By" row is also created by the mod. Mod options control which (if any) sort options are available. When the sort options are suppressed, the "Sort By" row is eliminated, and the page uses the native Title, Description sort.
#* The native "Linked to" column has a fixed width and is not allowed to wrap. I've defined a minimum length, but I allow it to wrap, and let the browser control the column widths.
+
# Changes to the result table columns:
#* The Tree column is not native to the application, though it is native to most TNG search screens. I display it only when the search covers all trees.
+
#* The "Title,Description" column is "Title,Description,FileExtension" here because - under the control of a mod option - the mod adds the media item's FORM attribute in this column when the the file path column is omitted.
# The "Linked to" column is all about links, so the mod generates hyperlinks to every object that the media item is linked to. Citation medialinks are a little funky; another visualization will show how I handle citation medialinks.
+
#* The "Geocoordinates" column heading and the "Latitude" and "Longitude" labels have been abbreviated so that the column takes up less horizontal space.  
 +
# The "Linked to" column:
 +
#* The mod defines a minimum width larger than the native fixed width. This generally causes the results table to use less vertical space.
 +
#* Since "Linked to" is about "links", the mod generates hyperlinks to every object that the media item is linked to.  
 +
#** Citation medialinks are a little funky; see the [[#Citation_Medialinks|Citation Medialinks]] section above.
 +
#* The Tree column is not native to the Admin>>Media>>Search page, though it is native to most TNG search pages. It is shown by the mod only when the search covers multiple trees.
  
 
|-  <!-- *********************************************** -->
 
|-  <!-- *********************************************** -->
 
| '''<span style="color:red">3. Admin>>Media>>Search AFTER</span>''', with a few run-time options.
 
| '''<span style="color:red">3. Admin>>Media>>Search AFTER</span>''', with a few run-time options.
<div>[[Image:admin_media-after2-v12.jpg]]</div>
+
<div>[[Image:admin_media-after2-v13.jpg]]</div>
In the search form, as indicated by the red outlines
+
* In the search form, as indicated by the red outlines:
* A single tree has been selected and a search string has been entered.
+
** This search was done on a one-tree site, so there is no Tree prompt:
* The search focuses on Histories
+
** A single tree has been selected and a search string has been entered.
* "MediaKey" and "File Path" have been selected for display, so both are present in the results table.
+
** Note that the "X" field button is now visible, since there is a value that can be cleared.
In the results table, as indicated by the green outlines
+
** The search focuses on Histories
* In the MediaKey column,
+
** "MediaID" and "File Path" have been selected for display, so both are present in the results table.
** The pound sign indicates that the media key is a number longer than 5 digits. If the user clicks on the pound sign, it is replaced by the actual media key value.
+
** The "Results per page" value is not the system default, so both the "D" and the "A" buttons are visible.  The "R" button is still shaded out because the value has not been changed since the page was loaded.
** The link reading "(text)" indicates that the media key is text - probably a filename, since the media filepath is saved as the media key when media items are uploaded through TNG. Again, if the user clicks on the pound sign, it is replaced by the actual media key value.
+
* The site administrator has set the the mod option to display the FORM attribute or flag BodyText-only media items flag when there is no thumbnail ''value''. Thus, in the Thumbnail column:
* In the thumnail column, you can see some of the extra information that has been enabled by mod options.
+
*# Even though the first media item is an external link, the file extension PDF is shown
** In the absence of a thumbnail path, this value indicated that the media item consists of BodyText.
+
*# "BodyText" is shown in for media items that have a BodyText value and no file.
** The second media item is a PDF file, and the fourth media item is an HTM file.
+
*# The third row displays a thumbnail.
* In the File path column
+
* In the fourth row of the thumbnail column, the message "(Missing)" indicates that there ''is'' a thumbnail value but the thumbnail ''file'' is missing. If there were no thumbnail value, then (given the mod option setting mentioned above), the value "JPG" would be displayed.  
** The first media item has no media path. Instead, the media items consists of 3800 characters of body text.
+
* In the File Path Column:
** The second media item is the normal value in the File Path column; it is the media item's file path value.
+
** In external URLs and actual file paths, the mod adds zero-length space entities to the path value to allow the file path to wrap as necessary.
* In the Linkedto column:
+
** When there is a BodyText value, and no file, the size of the BodyText is shown.
** The third media item has a media link to a placename.
 
** The fourth media item has a media link to a source.
 
** (no file) means that the thumbnail file is specified by the file does not exist.
 
** The second media item is a PDF file, and the fourth media item is an HTM file.
 
  
 
|- <!-- ***************************************************** -->
 
|- <!-- ***************************************************** -->
Line 282: Line 313:
 
In the results table, as indicated by the green outlines
 
In the results table, as indicated by the green outlines
 
* In the MediaID & MediaKey column, the MediaID comes first, though if both values have been selected, and results are sorted by MediaKey, the MediaKey will be listed first.
 
* In the MediaID & MediaKey column, the MediaID comes first, though if both values have been selected, and results are sorted by MediaKey, the MediaKey will be listed first.
* The Geocodes uses abbreviations and rounds the latitude and longitude to three digits so that the column doesn't take up much space.
+
* The Geocodes column uses abbreviations and rounds the latitude and longitude to three digits so that the column doesn't take up much space.
* The pop-up message from the information icon next to the search string is shown at the bottom of the screen clip.
+
* The pop-up message from the information icon next to the search string is shown at the bottom of the screen clip.  If the Field Buttons mod is not installed, the description of the field buttons is not displayed.
  
 
|- <!-- ***************************************************** -->
 
|- <!-- ***************************************************** -->
| '''<span style="color:red">5. Admin>>Media>>Search AFTER</span>''', the '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu]'''
+
| '''<span style="color:red">5. Admin>>Media>>Search</span>''', the '''[https://tng.lythgoes.net/wiki/index.php?title=Inner_Mod_Menus Inner Mod Menu]'''
<div>[[Image:admin_media-after-innermodmenu-v12a.jpg]]</div>
+
<div>[[Image:admin_media_search-innermodmenu-v13.jpg]]</div>
This shows the Inner Mod Menu when two mods that affect Admin>>Places>>Search have been installed. For both mods, the Inner Mod Menu provides hyerlinks to
+
This shows the Inner Mod Menu when two mods that affect Admin>>Media>>Search have been installed - Admin Media Search and its companion mod Admin Media Predefined Search. For both mods, the Inner Mod Menu provides hyerlinks to
 
# The mod's Wiki article (via the Wiki logo),
 
# The mod's Wiki article (via the Wiki logo),
# The Mod Options setion of the Wiki article, and
+
# The Mod Options section of the Wiki article, and
 
# The Mod Options editor (see the next visualization)
 
# The Mod Options editor (see the next visualization)
(The Inner Mod Menus of some other mods provide additional links.)
+
The Admin Media Search menu also links to a popup summary of what the mod does. That popup is shown in this screenshot.
  
 
|- <!-- ***************************************************** -->
 
|- <!-- ***************************************************** -->
| '''<span style="color:red">6. Admin>>Media>>Search AFTER</span>''' - Mod Options
+
| '''<span style="color:red">6. Admin>>Media>>Search</span>''' - Mod Options
<div>[[Image:admin_media-after-options-v12a.jpg]]</div>
+
The options are described in some detail up in the [[#Mod_Options|Mod Options]] section of this article. The Wiki logo next to the mod name in these '''[https://tng.lythgoes.net/wiki/index.php?title=Mod_Settings_Blocks Mod Settings Blocks]''' is a link to the mod's Wiki Article.
The options are described in some detail up in the [[#Mod_Options|Mod Options]] section of this article.
 
  
The Wiki logo next to the mod name is a hyperlink to the mod's Wiki article.
+
Significantly, when you go to '''Admin>>Setup>General&nbsp;Settings''', and select '''Robin's Mods''', you'll see the options for all of the mods that have placed options in this subform. But when you link to a mod's  options through the Inner Mod Menu shown in the previous visualization, you'll see what you see in the two screenshots below, that is, just the one Mod Setting Block. If you click the subform heading (the triangular arrow or the label '''Robin's Mods'''), all of the mods in the subform will be displayed, just as if you had navigated to '''Admin>>Setup>General&nbsp;Settings>>Robin's&nbsp;Mods'''.
 
+
|- <!-- ***************************************************** -->
Significantly, when you go to '''Admin>>Setup>General Settings''', and select '''Robin's Mods''', you'll see the options for all of the mods that have placed options in this subform. But when you link to a mod's  options through the Inner Mod Menu shown in the previous visualization, you'll see what you see in this screen shot - just the one Mod Setting Block. If you click the subform heading (the triangular arrow or the label '''Robin's Mods''') in ''this'' screen clip, all of the mods in the subform will be displayed.  Then, if you click the heading again, all of the mod settings will be hidden.
+
| '''Mod Options for Admin Media Search version 12'''<div>[[Image:admin_media-after-options-v12a.jpg]]</div>
 +
|- <!-- ***************************************************** -->
 +
| '''Mod Options for Admin Media Search version 13'''<div>[[Image:admin_media_search-modoptionsblock.jpg]]</div>
 +
Note that these groups of mod options can be set with just a couple of clicks, without the need to look at the details of each mod option.
 +
Here is the mod options block with each group expanded to show the all settings<div>[[Image:admin_media_search-modoptionsblock-open-v13.jpg]]</div>
 
|}
 
|}
  
Line 310: Line 344:
 
# Keeping mod-generated rules separate helps to avoid classname conflicts between mods.  
 
# Keeping mod-generated rules separate helps to avoid classname conflicts between mods.  
 
Some of my mods define stand-alone .css files, but most of my mods (like this one) define an inline style sheet. <!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-css1 mw-customtoggle-css2" id='mw-customcollapsible-css1' style="text-decoration:underline;color:#0645ad;">&#91;See this mod's inline style sheet&#93;</div>
 
Some of my mods define stand-alone .css files, but most of my mods (like this one) define an inline style sheet. <!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-css1 mw-customtoggle-css2" id='mw-customcollapsible-css1' style="text-decoration:underline;color:#0645ad;">&#91;See this mod's inline style sheet&#93;</div>
<div class='mw-collapsible mw-collapsible-content mw-collapsed' id='mw-customcollapsible-css2 ' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
+
<div class='mw-collapsible mw-collapsible-content mw-collapsed' id='mw-customcollapsible-css2' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT --><div class="mw-customtoggle-css1 mw-customtoggle-css2" style="text-decoration:underline;color:#0645ad;float:right;">&#91;Hide the stylesheet&#93;</div>
 
<syntaxhighlight lang="css" enclose="div">
 
<syntaxhighlight lang="css" enclose="div">
 +
<style id='rramsstyle'>
 
/*Suppress printing on a printer */
 
/*Suppress printing on a printer */
 
@media print {
 
@media print {
.rramsnoprinter {display:none;}
+
.rramsnoprint {display:none;}
 
}
 
}
 +
/* For shading of inactive options */
 +
.rramsshaded {color:#bbb;}
 
/* Move labels closer to checkboxes and radio buttons */
 
/* Move labels closer to checkboxes and radio buttons */
 
input[type='checkbox'], input[type='radio'] {margin-right:1px;}
 
input[type='checkbox'], input[type='radio'] {margin-right:1px;}
Line 323: Line 360:
 
padding:0 5px;
 
padding:0 5px;
 
}
 
}
/* Use bold and a background color to emphasize <code> elements in my litbox hints. */
 
 
.rrlitboxhint code {background-color:lightBlue;
 
.rrlitboxhint code {background-color:lightBlue;
 
font-weight:bold; white-space:no-wrap;
 
font-weight:bold; white-space:no-wrap;
 
}
 
}
/* Make sure that there is not too much vertical spacing around <ol> elements. */
 
 
.rrlitboxhint ol {margin-top:1ex; margin-bottom:0;
 
.rrlitboxhint ol {margin-top:1ex; margin-bottom:0;
 
margin-right:5px;
 
margin-right:5px;
 +
margin-left:8px; padding-left:8px;
 
}
 
}
 
/* Position the title in the litbox title bar */
 
/* Position the title in the litbox title bar */
Line 361: Line 397:
 
<?php
 
<?php
 
if ($rrconfig['MediaStartWithCiteTags'])
 
if ($rrconfig['MediaStartWithCiteTags'])
    echo ".rrtagsshow{display:none}\n";
+
echo ".rrtagsshow{display:none}\n";
 
else echo ".rrtags,.rrtagshide{display:none}\n";
 
else echo ".rrtags,.rrtagshide{display:none}\n";
 
?>
 
?>
 +
</style>
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Note that the last two styles are generated by PHP code. Those styles control the visibility of the citation medialink event tags on the basis of the mod option that controls whether the tags are displayed or hidden as the page is loaded.
 
Note that the last two styles are generated by PHP code. Those styles control the visibility of the citation medialink event tags on the basis of the mod option that controls whether the tags are displayed or hidden as the page is loaded.
<!-- BUTTON AT THE BOTTOM OF TOGGLED CONTENT --><div class="mw-customtoggle-v121 mw-customtoggle-v122" style="text-decoration:underline;color:#0645ad;text-align:right;">&#91;Hide details&#93;</div>
+
<!-- BUTTON AT THE BOTTOM OF TOGGLED CONTENT --><div class="mw-customtoggle-css1 mw-customtoggle-css2" style="text-decoration:underline;color:#0645ad;text-align:right;">&#91;Hide the stylesheet&#93;</div>
 
</div><!-- END TOGGLED CONTENT and END DOUBLE TOGGLE -->
 
</div><!-- END TOGGLED CONTENT and END DOUBLE TOGGLE -->
  
If you want to override any of these rules, you can add supplemental rules to your template's mytngstyle.css file, or to the bottom of your genstyle.css.  (As it turns out, it takes a JQuery document.ready trick to allow you to override my inline style rules this way.  That trick is described in a [[User:Robinrichm#Internal_Style_Sheets|Technical Note in my TNG Wiki home page]].)
+
If you want to override any of these rules, you can add supplemental rules to your template's mytngstyle.css file, or to the bottom of your genstyle.css.  The mod implements a JQuery document.ready trick to allow you to override my inline style rules this way.  That trick is described in a [[User:Robinrichm#Internal_Style_Sheets|Technical Note in my TNG Wiki home page]]. (Note that it is easy to miss the minor "Internal Style Sheets" heading that is the destination of this link, since the content of the section is hidden, and it is immediately followed by a major heading.)
  
 
== Revision History ==
 
== Revision History ==
Line 375: Line 412:
 
! Mod Version !! TNG Version !! Date !! Note
 
! Mod Version !! TNG Version !! Date !! Note
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
| [[Media:admin_media_search_v12.2.0.12c.zip|12.2.0.12c]]
+
| [[Media:admin_media_search_v12.2.0.13a.zip|12.2.0.13a]]
 
| 12.2 - 12.3
 
| 12.2 - 12.3
| 24Feb2020
+
| 25 Jul 2020
 +
|
 +
* Fixed the Edit Options link in Mod Manager.
 +
* Made the disabled sort options more obviously disabled by greying out the labels and adding title text.
 +
* If none of the display options that drive sort option (e.g. mediaid, mediakey, file path) are offered as display options, then we know that we'll sort by title/description, so the Sort By row in the search form is not displayed at all.
 +
* Added zero-length spaces next to slashes and underscores in the Media Item note to allow URLs and file paths to wrap.
 +
 
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| [[Media:admin_media_search_v12.2.0.13.zip|12.2.0.13]]
 +
| 12.2 - 12.3
 +
| 17 Jul 2020
 +
| No functional changes in the behavior of the search page, except that some features can now be disabled.  This update is essentially all about the mod options.  It simplifies (I hope) the editing of options by allowing groups of options to be set at once.
 +
 
 +
|- style="vertical-align:top;"  <!-- ############################################################## -->
 +
| [[Media:admin_media_search_v12.2.0.12c1.zip|12.2.0.12c1]]
 +
| 12.2 - 12.3
 +
| 25Feb2020
 
| No Functional Changes.
 
| No Functional Changes.
 
* Simplified the mod by removing a conditional location that handled TNGv12.0-1 vs TNGv12.2 (and now TNGv12.3).
 
* Simplified the mod by removing a conditional location that handled TNGv12.0-1 vs TNGv12.2 (and now TNGv12.3).
Line 383: Line 436:
 
* Fixed a missing %end:% tag, which TNGv12.3 does not tolerate.
 
* Fixed a missing %end:% tag, which TNGv12.3 does not tolerate.
 
* Uses version 4 of the shared mod libraries
 
* Uses version 4 of the shared mod libraries
 +
* Mod v12c1 fixes a function call that changed between v3 and v4 of a shared mod library.
  
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
 
|- style="vertical-align:top;"  <!-- ############################################################## -->
Line 408: Line 462:
 
* Mod options control whether the event tags are visible or hidden as the page loads, and whether there is a button in the LinkedTo column that toggles the display citation medialinks the event tags.
 
* Mod options control whether the event tags are visible or hidden as the page loads, and whether there is a button in the LinkedTo column that toggles the display citation medialinks the event tags.
 
* Added (under control of an option) the ability to display the media item's FORM attribute when there is no thumbpath.  
 
* Added (under control of an option) the ability to display the media item's FORM attribute when there is no thumbpath.  
* Under control of an option, several error messages are displayed in the thumbnail column if there is no thumbpath
+
* Under control of an option, several error messages are displayed in the thumbnail column if there is no thumbpath.
 
<!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-v121 mw-customtoggle-v122" id='mw-customcollapsible-v121' style="text-decoration:underline;color:#0645ad;">&#91;Minor changes&#93;</div>
 
<!-- *** BEGIN DOUBLE TOGGLE --><div class="mw-collapsible mw-customtoggle-v121 mw-customtoggle-v122" id='mw-customcollapsible-v121' style="text-decoration:underline;color:#0645ad;">&#91;Minor changes&#93;</div>
 
<div class='mw-collapsible mw-collapsible-content mw-collapsed' id='mw-customcollapsible-v122 ' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
 
<div class='mw-collapsible mw-collapsible-content mw-collapsed' id='mw-customcollapsible-v122 ' style="border:thin solid grey;"><!-- BEGIN TOGGLED CONTENT -->
Line 512: Line 566:
 
| [[User:Robinrichm|Robin Richmond]]
 
| [[User:Robinrichm|Robin Richmond]]
 
| Mod developer
 
| Mod developer
| 12.2.0.12c
+
| 12.2.0.13a
 
| 12.3
 
| 12.3
 
| English
 
| English
Line 561: Line 615:
 
| [[User:Herbert1961|Herbert Fischer]]
 
| [[User:Herbert1961|Herbert Fischer]]
 
| Public site
 
| Public site
| 10.1.0.7(c)
+
| 12.2.0.12c1
| 11.0.0
+
| 12.3
 
| DE,(EN)
 
| DE,(EN)
 
|-
 
|-

Revision as of 06:01, 25 July 2020

Construction  
  1. Citation Medialinks are new to TNGv12 and not fully implemented in all TNG programs. Starting with mod version 12 (that is, v12.0.0.12) this mod displays detailed information about Citation Medialinks in the Admin>>Media>>Search 'Linked to'column. But I'm not real confident that I've tested all of the ways that Citation Medialinks can be organized, and that I display them in a way that everyone likes. Please let me know through the mod support form if you have any feedback on the way that Citation Medialinks are displayed.
  2. I fully realize that this mod has too many features and options. I've looked into spinning off some of the features into other mods, but there are interactions among features that make accomplish that goal. In version 13 of this mod, I have changed the way the mod options operate so that you can more easily ignore features and modify groups of options with one click. I would appreciate feedback about this new mod-option-editing procedure, and about the mod and its features in general.

Robin Richmond 18 Jul 2020

Construction


Admin Media Search
Summary Adds numerous features to Admin>>Media>>Search, including new run-time search and display option. Perhaps most significantly, it adds hyperlinks to all objects shown in the "Links To" (i.e. medialinks) column and shows tag details for Citation Medialinks.
Validation
Mod Updated 25 Jul 2020
Download link 12.2.0.13a.zip
TNG 12.3.0
TNG 12.2.0
12.2.0.12c1.zip
TNG 12.3.0
TNG 12.2.0
12.0.0.12c.zip
TNG 12.2.0
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.2.0.13a
Min TNG V 10.1
Max TNG V 12.3
Files modified
admin_media.php, English cust_text.php, admin_genconfig.php, admin_updateconfig.php
May Install rrshared_modsettingsblocks4.php, img/rrshared_wikilogo.gif
Related Mods
Notes
# There is no benefit to upgrading from Admin Media Searchv.12.0.0.12c to 12.2.0.12c1 if you use TNGv12.2.

Purpose of the Mod

This distinctly complex mod is intended to make the Admin>>Media>>Search form more powerful and useful. To a significant degree, you can think of this mod as turning the search form into a report generator. The mod implements many features. (The features listed here are flagged with ‡ if they can be adjusted by mod options. Most can also be suppressed altogether.)

  • In the search form:
    1. The search string can be a regular expression.
    2. You can control which database fields to search.‡
    3. You can select several database fields to be added to the results table.‡
    4. There are sort order options.‡
    5. You can control the number of results per page.
  • In the search results
    1. The Tree name is shown in a new column when more than one tree is searched (as in other Admin programs).
    2. Very significantly - This mod converts all of the medialinks in the "Linked To" column into hyperlinks
    3. For citation medialinks, the tagnames of events supported by the citation are displayed.‡ (See the Citation Medialinks section below.
    4. When there is a thumbnail path value, but the file is missing, the message "(missing)" is displayed in the thumbnmail column.
    5. Other messages can be printed in the Thumbnail column when there is no thumbnail path value.‡
[More Features]

More Features

  • Search form:
    1. An HTML fieldset border is drawn around the search form to help distinguish the search form from the action buttons below the form.
    2. The "File Ext" text field has been changed to a "File Type" drop-down list.
    3. New search options include:
      • Radio buttons that limit the search to media items with thumbnails, or without them.
      • A checkbox that limits the search to items that have bodytext.‡
      • Checkboxes to select optional result values: Geocodes, the file path, the MediaID, and/or the Mediakey.‡
    4. Some fields utilize single-charter "field button" shortcuts, but only if the Field Buttons mod is installed.
  • Search results
    1. The geocodes and file path are displayed in their own columns if they are selected in the search form.‡
    2. When the file path has not been selected for display, the file extension (the 'FORM' attribute) is displayed in the "Title,Description" column.‡
    3. The mediaid and mediakey share a column when they are selected in the search form.
    4. A button in the "Linked To" column heading toggles the display of event tags in citation medialinks.‡
    5. Messages in the thumbnail column:‡
      • Invalid image filename
      • Missing file
      • The filename extension (well, really, the 'FORM' attribute) for non-images (based on a mod option)
  • Other features
    1. The standard TNG Inner Menu now contains a drop-down menu that provides handy links to information about the mod and a direct link to the mod options editor. I call this menu an Inner Mod Menu, and most of my mods now (or will soon) add Inner Mod Menus to the programs that they alter significantly.

Finer Details:

  1. The "Linked to" column is allowed to wrap, thus allowing the "Title,Description" column to wrap less.
  2. Long mediakey values such as filenames are displayed as short links that pop up the full value.
  3. What was a file extension textbox in the native code is now a "File Type" selection box.
  4. When the Geocodes column is displayed, it uses abbreviations so that it is narrower than the native Geocoordinates column.
  5. Under the assumption that, when you print the Admin>>Media>>Search page, you are focusing on the search results, several parts of the web page are omitted when the Admin>>Media>>Search page is sent to a printer. Among the areas excluded from printing are the search form, the Action and Select columns, the page navigation buttons, and the action buttons above the results table. To print these parts of the page, you can do a screen capture and print the resulting screenshot image.
  6. The reset button resets all of the new search form options to the values they had when the page was loaded, not to the defaults they would have in a new browser session.
[Hide details]

Mod Options

This mod's options are implemented as custom TNG settings, in a new Mod Settings Block at Admin>>Setup>>General Settings>>Robin's Mods. The options and their effects are described here, and shown in the visualizations.

[Options for mod version 12]

The options in Admin Media Search version 12* are organized into three groups:

  1. Media fields that can be searched, and whether they are searched by default.
    • The fields that you chose as fields that "can be searched" are presented on the search form as checkboxes.
    • Among those fields, the options define which are checked on the search form by default.
    • Then, in the search form, you can check and uncheck the checkboxes to control which fields are searched by in a given search.
  2. Options for Event Tags associated with Citation Medialinks in the LinkedTo column.
    This mod can display the tags for events that are supported by a citation medialink. Two options affect this behavior.
    1. Start with the tags visible
    2. Add a button to toggle the display of the tags.
      Note that if both options are unchecked, the tags cannot ever be seen. (There is no run-time option to supersede these mod options.)
  3. Options for new information to place in the Thumbnails column.
    When a media item has no thumbnail path, the results table cell for the thumbnail image is necessarily blank. Under the control of these options, some messages can be displayed in that otherwise blank space.
    1. Check for missing file extension in media and thumbnail paths
      • Ordinarily, image file paths must have a filename extension such as .jpg, .png, or .gif, and the absence of a file extension in a media path is an error condition. However, it is possible to use a script to generate or retrieve an image, and it is possible to define scripts that have no filename extentions. If you happen to use such scripts in local path, then you should turn this option off. This test is not performed on external paths (those beginning with' http:' or 'https:').
    2. Show Mediatypes where there is no thumbnail path value
      • This is just a way to use otherwise empty space to display some information about media items that do not have thumbnails. This would almost always include, for example, PDF, DOC, and HTML files, but could include image files, too.
    3. Show error conditions. Error conditions displayed in otherwise-empty cells in the thumbnail column are distinguished by parentheses and a brown color. Each error message has more information in title text that pops up when you hover over the message. The error messages include:
      • (No media file) - The media path is empty and there is no bodytext.
      • (No file type) - There is a media path, but the file type (the 'FORM' attribute) is not defined.
      • (Bad filename) - The thumbnail path does not have a filename extension, and the Check for missing file extension in media and thumbnail paths option is set.
      • (Missing) - There is a thumbnail path, but the file is missing.
      • ({filename extension}) - There is no file type, but there is a file extension in the media path.
[Hide options for mod version 12]
[Options for mod version 13]

Admin Media Search version 13 has essentially the same features and options as version 12 of the mod. The primary effect of mod version 13 is to reorganize the (too-)many options so that (I hope) they are simpler to manage. The options in Admin Media Search version 13 are divided into seven groups, three of which are single options, and four of which allow

  • The entire group of options to be set to values that achieve the native Admin>>Setup>>Search functionality; (i.e. to disable the features handled by the group),
  • The entire group of options to be set to recommended settings,
  • The entire group of options to be ignored,
  • Each option to be edited.
The mod options block initially looks like this:
Admin media search-modoptionsblock.jpg
(The colored borders help you keep track of the options groups as they jump around on the screen a bit when you open and close the groups.)

I'll focus on group 1 to illustrate details.

Here's what you see if you click both the "See Native Behavior" and "See Recommended Behavior" buttons.
Admin media search-optionsgroup1-behavior.jpg

The descriptions give you a glimpse of how the settings would affect the Admin>>Media>>Search behavior, without requiring you to look at and make decisions about each option. If you just want to make sure that the program takes on the native or recommended behavior, you still don't have to see all of the options in their form fields. You can just click "Apply" and ignore those details.

Here are the form fields for group 1, after they are opened by by the 'Show Settings' button.
Admin media search-optionsgroup1-settings.jpg
Unfortunately, the options program cannot tell you whether the option values are set to the native settings, the recommended settings, or custom settings. I've looked into doing that, but would take too much time to implement. But still, the point is that you don't have to deal with all of the options individually - saying, in effect, 'Don't bother me with the details".
[Hide options for mod version 13 ]

Citation Medialinks

TNGv12 introduced the ability for TNG to record medialinks to citations, but didn't fully implement them in programs that display information about citations or medialinks. TNGv12.2 added citation medialink-handling in admin_media.php.

Citation medialinks are kind of funky, and it isn't really clear how they should be presented, especially in the context of other medialinks.

[See details]

A little background:

  • A citation links a source with a single event
  • The event then links to a person or family.

Thus, when a source (such as a census), provides information about the name, birthdate, and place of residence for, say, five members of a family, plus the date of the parents' marriage, there will be there will be 16 citations - 3 events x 5 people, plus one family event. And the media item (in this case, an image of the census page) would have 16 largely redundant citation medialinks.

To complicate matters, depending on how the data is loaded into TNG, for a given media item, 1. Medialinks directly to the people, the family, and the source might be derived from the citations, and 2. Medialinks directly to the people and the family, and maybe, but less likely, to the source could be created independently.

Lets take an example where there are

  1. 3 people in the 1930 census, which is source S30, and provides an approximate marriage date,
  2. The census page image is M301
  • The parents have personID's I1 and 2, and the child is I3. We'll pretend that their names are Pop, Mom, and Son.
  • The census provides support for each person's name (NAME), birth (BIRT), and place of residence (RESI).
  • Then census also supports the parents' marriage, which is S1
  • We'll also link the 1920 census to its place, say Dover, Spring Co, OH

For media item M301, we want to see

  • Pop (I1)
    S30, BIRT, NAME, RESI
  • Mom (I2)
    S30, BIRT, NAME, RESI
  • Son (I3)
    S30, BIRT, NAME, RESI
  • Pop/Mom (F1)
    S30, MARR
  • 1930 Census (S30)
  • Dover, Spring, OH

If there are direct links from the census image to the person, family, and source, we want to see the exact same thing.

To accomplish this, the medialink SQL query joins medialinks to their direct links (People, Family, Sources, Repositories, Places, and Citations), and then joins the citations to their sources and events, and the event to their people and families. There are four sort keys:

  1. A contrived numeric key that sorts all People first, then Families, Sources, Repositories, and Places
  2. PersonIDs & FamilyIDs in numeric, not string order (e.g. I2 is converted to I000002 so that it comes before I21 which is converted to I000021),
  3. Citation sourceID within each PersonID and FamilyID
  4. Event tags within each PersonID/sourceID and FamilyID/sourceID

Assuming no direct medialinks to the people, family, or source, we get this result set

ID Source Tag Fullname Husband Wife Title
P1 S30 BIRT Pop 1930 Census
P1 S30 NAME Pop 1930 Census
P1 S30 RESI Pop 1930 Census
P2 S30 BIRT Mom 1930 Census
2 more P2 results
3 P3 results
F1 S30 Marr Pop Mom 1930 Census
Dover, Spring, OH

To print what is shown above, we have to

  1. Recognize that the second and third rows have the same personID and sourceID so that we do not reprint the person's name, and so that we do not start a new line for each event tag.
  2. Remember the sourceID and title, so that we can a print a line for the source after the people and families

Now, if there are also direct medialinks from the census image to each person and family, and to the source, we'll get four more query results, which are sorted appropriately within the result set

ID Source Tag Fullname Husband Wife Title
P1 Dad
P2 Mom
P3 Son
F1 Pop Mom
S30 1930 Census

But, because we are making sure that we don't print a name, family, or source more than once, we get exact the same display as before.

Finally, note that the result set above also gives us the data we need to turn each person, family, source, and place into a hyperlink to the appropriate TNG pages.

[Hide details]

Compatibility

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

Related Mods

  • Admin Media Predefined Search, which is dependent on this mod, adds a search feature to Admin Media Search that is helpful in a particular situation - in short, when a TNG site mixes files of different Mediatypes (documents, photos, histories, etc.) in a single media folder. This situation generally occurs when a genealogy applications that feeds data to TNG cannot handle multiple folders. Family Tree Maker is one such application.
  • Media Bodytext (which has not been released as I write this) changes some features of admin_editmedia.php and showmedia.php - especially with respect to BodyText values.
  • The "Field Buttons" attached to the search string field and the new 'Results per page' search form field are visible only if the optional Field Buttons form is installed. Field Buttons provide single-click execution of field editing tasks such as clearing the field, returning to the value the field had when the program was loaded, and selecting a default value.
  • The mod's Inner Mod Menu is visible (and only to TNG admins) only if the optional Inner Mod Menus is installed. The Inner Mod Menu gives TNG Admins handy access to information about the mod, and to the mod options. The Admin>>Media>>Search Inner Mod Menu is illustrated in the last visualization below.
  • This mod saves data that can be used by the optional Show Mod Names utility mod, but this mod is not dependent on Show Mod Names.

Installation

Files Installed

This mod has two mod subfolders:

  1. The folder with the same base name as the mod that you expect to exist for any mod that installs files. But, in this mod, the folder does not contain any files that are installed by the mod. However, it does contain critical files that contain the mod's language strings, which are not installed in the standard cust_text.php files. Instead, the language strings are loaded in modified programs from files in the mod's languages/ subfolder. Read more about this technique.
  2. The shared folder RR-shared_mod_includes_v12.0.0.4 contains files that help to manage mod options in many of my mods:
    1. rrshared_modsettingsblocks4.php - Mod Settings Blocks
    2. img/rrshared_wikilogo.gif - An icon that links to a mod's TNG Wiki page from a 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. 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.4 (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

1. Admin>>Media>>Search BEFORE
Admin media-before-v12.jpg
  • There is no "Tree" column, even though "All Trees" has been selected.
  • In the results table, the thumbnail in the 3rd row looks exactly like the one in the first row, because it is the same file. In this case, the third media item has an invalid thumbpath value. Sometimes (I don't know why it doesn't always happen), the program displays the very first thumbnail in the thumbnails folder when it encounters a invalid path.
  • In the second and fourth rows, we don't know whether the thumbnail cell is blank because there is no thumbnail path value, or because the file is missing.
  • The "Linked to" column is wider than it needs to be, because it has a fixed width. The data in that column is also not allowed to wrap. The links are hyperlinks in browsemedia.php, but not in admin_media.php
2. Admin>>Media>>Search AFTER, with most of the run-time display options unchecked, and with the options that display extra information in the thumbnail column unchecked.
Admin media-after1-v12.jpg
  1. "Mod Information" is the label for the Inner Mod Menu, which is visible only if the optional Inner Mod Menus mod is installed. Its contents are shown in a visualization below.
  2. Three features tied to the search string field
    1. The placeholder text notes that the search string can now be a regular expression.
    2. The shaded block next to the search string represents two "Field Buttons" that are shaded out because of the status of the search string field in this screenshot.
      • The "X" button is shaded out here because the field is already empty. It is visible in Screenshots 3 and 4 below.
      • The "R" button (which restores the initial value of the field) is shaded out here because the field has not been changed since the page was loaded.
    3. The information icon pops up a message about the new features in the search string. The pop-up message is shown in Visualization 4.
      • The popup notes that the search string can be a regular expression, and gives a couple of examples.
  3. The row of "Search fields" has been added by this mod. It determines which database fields are searched by a Media search.
    • Mod options control which database fields are shown here, and whether they are checked by default.
    • A mod option can suppress the entire "Search fields" row. If the search field options are suppressed, the searches look at the Title and Description fields.
    • (As you may know, in Admin>>Media>>Search, the field identified as "Title" is really the database field "description", and the field identified as "Description" is really the database field "notes".)
  4. The "Search Criteria" row exists (with different labels) in the native search form. Here, all options are new or changed, except for the "Unlinked Only" checkbox.
    • The native form has a "File Ext" text box, which this mod replaces with a "File Type" selection box. The new selection box accomplishes the same thing as the old text field; it just lets you select file types (i.e. file extensions) from a list, and prevents you from entering a file extension that does not exist in the database. The selection box also has a "no file" option for media items that have BodyText but no file.
    • Three radio buttons determine if the search will focus on media items with or without a thumbnail path value.
    • The presence of the "Has Body Text" checkbox is controlled by a mod option. (Note that "Has Body Text" could be implemented with three radio buttons, like the thumbnails buttons, but the single box seemed sufficient.)
  5. The "Display options" row of options is added by this mod.
    • Mod options control which optional columns are shown here, and whether they are checked by default. All of the checkboxes can be suppressed, in which case the results table will always have the Geocoordinates column that is shown by the native Admin>>Media>>Search page. (But the Geocoordinates column will be abbreviated, as described in item 7 below.
    • The "Results per page" field overrides the TNG system value. This field has three field buttons:
      • The "R" button, as with the search string field, restores the value the field had when the page first loaded,
      • The "D" field button next to the field applies the default value - the TNG system value called maxsearchresults, and
      • The "A" shows "All" results. If you want to print all results using the maxsearchresults value, you would have to print the media items page-by-page, where each web page would leave wasted space on a printed page. But with the "A" setting, you'll get appropriate printed page breaks.
  6. The "Sort By" row is also created by the mod. Mod options control which (if any) sort options are available. When the sort options are suppressed, the "Sort By" row is eliminated, and the page uses the native Title, Description sort.
  7. Changes to the result table columns:
    • The "Title,Description" column is "Title,Description,FileExtension" here because - under the control of a mod option - the mod adds the media item's FORM attribute in this column when the the file path column is omitted.
    • The "Geocoordinates" column heading and the "Latitude" and "Longitude" labels have been abbreviated so that the column takes up less horizontal space.
  8. The "Linked to" column:
    • The mod defines a minimum width larger than the native fixed width. This generally causes the results table to use less vertical space.
    • Since "Linked to" is about "links", the mod generates hyperlinks to every object that the media item is linked to.
    • The Tree column is not native to the Admin>>Media>>Search page, though it is native to most TNG search pages. It is shown by the mod only when the search covers multiple trees.
3. Admin>>Media>>Search AFTER, with a few run-time options.
Admin media-after2-v13.jpg
  • In the search form, as indicated by the red outlines:
    • This search was done on a one-tree site, so there is no Tree prompt:
    • A single tree has been selected and a search string has been entered.
    • Note that the "X" field button is now visible, since there is a value that can be cleared.
    • The search focuses on Histories
    • "MediaID" and "File Path" have been selected for display, so both are present in the results table.
    • The "Results per page" value is not the system default, so both the "D" and the "A" buttons are visible. The "R" button is still shaded out because the value has not been changed since the page was loaded.
  • The site administrator has set the the mod option to display the FORM attribute or flag BodyText-only media items flag when there is no thumbnail value. Thus, in the Thumbnail column:
    1. Even though the first media item is an external link, the file extension PDF is shown
    2. "BodyText" is shown in for media items that have a BodyText value and no file.
    3. The third row displays a thumbnail.
  • In the fourth row of the thumbnail column, the message "(Missing)" indicates that there is a thumbnail value but the thumbnail file is missing. If there were no thumbnail value, then (given the mod option setting mentioned above), the value "JPG" would be displayed.
  • In the File Path Column:
    • In external URLs and actual file paths, the mod adds zero-length space entities to the path value to allow the file path to wrap as necessary.
    • When there is a BodyText value, and no file, the size of the BodyText is shown.
4. Admin>>Media>>Search AFTER, with a few other options.
Admin media-after3-v12a.jpg

In the search form, as indicated by the red outlines

  1. This search uses a regular expression to find media items that contain "Francis Billingsly" OR "ClarenceSR"
  2. The mediaID joins the mediakey in their shared column, and the Geocodes column is displayed.

In the results table, as indicated by the green outlines

  • In the MediaID & MediaKey column, the MediaID comes first, though if both values have been selected, and results are sorted by MediaKey, the MediaKey will be listed first.
  • The Geocodes column uses abbreviations and rounds the latitude and longitude to three digits so that the column doesn't take up much space.
  • The pop-up message from the information icon next to the search string is shown at the bottom of the screen clip. If the Field Buttons mod is not installed, the description of the field buttons is not displayed.
5. Admin>>Media>>Search, the Inner Mod Menu
Admin media search-innermodmenu-v13.jpg

This shows the Inner Mod Menu when two mods that affect Admin>>Media>>Search have been installed - Admin Media Search and its companion mod Admin Media Predefined Search. For both mods, the Inner Mod Menu provides hyerlinks to

  1. The mod's Wiki article (via the Wiki logo),
  2. The Mod Options section of the Wiki article, and
  3. The Mod Options editor (see the next visualization)

The Admin Media Search menu also links to a popup summary of what the mod does. That popup is shown in this screenshot.

6. Admin>>Media>>Search - Mod Options

The options are described in some detail up in the Mod Options section of this article. The Wiki logo next to the mod name in these Mod Settings Blocks is a link to the mod's Wiki Article.

Significantly, when you go to Admin>>Setup>General Settings, and select Robin's Mods, you'll see the options for all of the mods that have placed options in this subform. But when you link to a mod's options through the Inner Mod Menu shown in the previous visualization, you'll see what you see in the two screenshots below, that is, just the one Mod Setting Block. If you click the subform heading (the triangular arrow or the label Robin's Mods), all of the mods in the subform will be displayed, just as if you had navigated to Admin>>Setup>General Settings>>Robin's Mods.

Mod Options for Admin Media Search version 12
Admin media-after-options-v12a.jpg
Mod Options for Admin Media Search version 13
Admin media search-modoptionsblock.jpg

Note that these groups of mod options can be set with just a couple of clicks, without the need to look at the details of each mod option.

Here is the mod options block with each group expanded to show the all settings
Admin media search-modoptionsblock-open-v13.jpg

Styles

My mods generally do not add style rules to genstyle.css because

  1. genstyle.css has SO MANY rules already,
  2. The rules added by most mods affect only one or two programs, and just take up space in genstyle.css for other programs, and
  3. Keeping mod-generated rules separate helps to avoid classname conflicts between mods.

Some of my mods define stand-alone .css files, but most of my mods (like this one) define an inline style sheet.

[See this mod's inline style sheet]
[Hide the stylesheet]
<style id='rramsstyle'>
/*Suppress printing on a printer */
@media print {
	.rramsnoprint {display:none;}
}
/* For shading of inactive options */
.rramsshaded {color:#bbb;}
/* Move labels closer to checkboxes and radio buttons */
input[type='checkbox'], input[type='radio'] {margin-right:1px;}
/******* Format popup help text that is displayed in a LITbox ******/
.rrlitboxhint {font-family:sans-serif;
	font-size:108%;
	padding:0 5px;
}
.rrlitboxhint code {background-color:lightBlue;
	font-weight:bold; white-space:no-wrap;
}
.rrlitboxhint ol {margin-top:1ex; margin-bottom:0;
	margin-right:5px;
	margin-left:8px; padding-left:8px;
}
/* Position the title in the litbox title bar */
#LB_titletext {padding: 3px 0 0 3px;
}
/* A footnote in help text litboxes */
.rrlitboxhint footer {font-size:85%;
	margin-top:1ex;
	border-top:1px solid gray;
	font-family: sans-serif;
	text-align:center;
}
/* Right-justify the labels in the first column of the search form layout table */
.rramslabels {text-align:right; padding-right:.6em;
	padding-top:4px;
}
/* Position the Search and Reset buttons to the right inside the search form. */
.rramssubmit {float:right; text-align:right;
	padding-left:2em;
}
/* Give the links column a minimum width, and its list elements a smaller indentation */
.rramslinks {min-width:16em;}
.rramslinks ul {margin-left:12px; padding-left:0px;}
/* A button in the linked to column to hide event tags */
#tagsbutton {float:right; padding:1px 2px; cursor:pointer;}
/* For spans with explicit popups or click events */
.rramspoint {cursor:pointer}
.rramspointerr {cursor:pointer; color:brown;} /* Errors */
/* The show/hide tags buttons */
.rrtagsshow,.rrtagshide {float:right; padding:1px 2px; cursor:pointer;}
<?php
if ($rrconfig['MediaStartWithCiteTags'])
	echo ".rrtagsshow{display:none}\n";
else echo ".rrtags,.rrtagshide{display:none}\n";
?>
</style>

Note that the last two styles are generated by PHP code. Those styles control the visibility of the citation medialink event tags on the basis of the mod option that controls whether the tags are displayed or hidden as the page is loaded.

[Hide the stylesheet]

If you want to override any of these rules, you can add supplemental rules to your template's mytngstyle.css file, or to the bottom of your genstyle.css. The mod implements a JQuery document.ready trick to allow you to override my inline style rules this way. That trick is described in a Technical Note in my TNG Wiki home page. (Note that it is easy to miss the minor "Internal Style Sheets" heading that is the destination of this link, since the content of the section is hidden, and it is immediately followed by a major heading.)

Revision History

Mod Version TNG Version Date Note
12.2.0.13a 12.2 - 12.3 25 Jul 2020
  • Fixed the Edit Options link in Mod Manager.
  • Made the disabled sort options more obviously disabled by greying out the labels and adding title text.
  • If none of the display options that drive sort option (e.g. mediaid, mediakey, file path) are offered as display options, then we know that we'll sort by title/description, so the Sort By row in the search form is not displayed at all.
  • Added zero-length spaces next to slashes and underscores in the Media Item note to allow URLs and file paths to wrap.
12.2.0.13 12.2 - 12.3 17 Jul 2020 No functional changes in the behavior of the search page, except that some features can now be disabled. This update is essentially all about the mod options. It simplifies (I hope) the editing of options by allowing groups of options to be set at once.
12.2.0.12c1 12.2 - 12.3 25Feb2020 No Functional Changes.
  • Simplified the mod by removing a conditional location that handled TNGv12.0-1 vs TNGv12.2 (and now TNGv12.3).
    • As a result, there are two version of TNGv12* - v12.0.0.12c, and v12.2.0.12c,
  • Fixed a missing %end:% tag, which TNGv12.3 does not tolerate.
  • Uses version 4 of the shared mod libraries
  • Mod v12c1 fixes a function call that changed between v3 and v4 of a shared mod library.
12.0.0.12c 12.0 - 12.2 15Dec2019 No Functional Changes. Just upgraded to version 3 of the shared mod libraries and fixed a bug that was using the media item tree instead of a medialink tree. (They are rarely different, but they can be.)
12.0.0.12b 12.0 - 12.2 30Oct2019
  • Fixed a problem with regex searches. There is no practical way to validate them, and invalid regex expressions in SQL can crash PHP. Then, when you run the search program again, it uses the searchstring cookie to repeat the broken search. My solution is not to save regex searches in the cookie.
  • Found and dealt with a citation medialink use-case that I hadn't been aware of.
  • Improved the handling of the new information in the thumbnail column, and added mod options to suppress that information.

(See also the revision notes for v12.0.0.12 and v12.0.0.11, which were pretty short-lived.)

12.0.0.12 12.0 - 12.2 24Oct2019 This version needed immediate repair by version 12a, so it cannot be downloaded.
  • Handles citation medialinks differently from both the native TNGv12.2 code and version 11 of this mod. In particular, this version displays the tag names of events supported by citation medialinks
  • Mod options control whether the event tags are visible or hidden as the page loads, and whether there is a button in the LinkedTo column that toggles the display citation medialinks the event tags.
  • Added (under control of an option) the ability to display the media item's FORM attribute when there is no thumbpath.
  • Under control of an option, several error messages are displayed in the thumbnail column if there is no thumbpath.
[Minor changes]

Small presentation enhancements:

  • Fixed a bug that prevented the searchstring ID and info icon from being defined when the field buttons mod is not installed.
  • Added "File type" to the Title/Description column in the results table when those values are in the that column. (The mod has always placed the file type in that column when the full file path is not being displayed in the results table.)
  • Styled radio buttons and checkboxes to move the labels and buttons closer to each other.
  • Changed the order of the display option checkboxes to match their positions in the results table.
  • Added the label "File type" before the file type selection box.
  • Sorted the file type selection options in alphabetical order.
  • Uses version 2 of the shared InnerModMenu and ModSettingsBlocks Include files..
[Hide details]
12.0.0.11 12.0 - 12.1 30Sep2019 (This version was pretty short-lived. Several of its new features are handled much better in version 12.0.0.12a, which is also more fault-tolerant.)
  1. Handles Citation Medialinks, which are new in TNGv12. (Mod version 12a does a MUCH better job of this.)
  2. Added my new Inner Mod Menu, which provides very convenient access to the mod options.
  3. The options for this mod are presented in a Mod Settings Block in the new subform Robin's Mods.
[Less significant changes]
  1. In the Thumbnail column of the results table, when a thumbnail file is missing, the program now displays a message saying "Thumbnail missing", with the thumnail path in title text (in effect, in a tool tip).
  2. Added Field Buttons
  3. Makes sure that at least one search field is checked
  4. (There is a new mod option whose meaning is not at all clear, but I made up for that by never actually using that option in admin_media.php.)
[Hide details]
12.0.0.10 12.0+ 4May2018 No functional changes; made compatible with TNGv12.
10.1.0.10 10.1 - 11.1.2 17Dec2017

- Added the size of the Bodytext field to the filepath column if it is being displayed, and to the "Title, Description" column otherwise
- Rather than say "Thumbnail specified but missing", shows the thumbnail filepath.
- Moved the embedded style sheet to css/genstyle.css

10.1.0.9b 10.1 - 11.1+ 10May2017
  1. Added the ability to sort by description, filepath, mediaID, or mediaKey, selected through checkboxes on the search form.
  2. Made ShowModNames optional and pulled the .rrnoprinter style class into an embedded style sheet to remove a mod dependency.
10.1.0.8 download 10.1 - 10.1.3 21 Feb 2016 Added thumnbnail search option, and missing thumbnail message. Displays media key.

Also now depends on Show Mod Names v2+.

10.1.0.7c 10.1 - 10.1.1 12Jul2015 Made this mod compatible with Rick Bisbee's new Showfolio Mod by tweaking a code fragment. No other changes.
10.1.0.7b 10.1 - 10.1.1 5Jun2015 Made this mod compatible with Chris Moss's new Private Media Mod. No changes other than the inclusion of the new Private Media flag created by Private Media Mod.
10.1.0.7 10.1 - 10.1.1 11May2015 - Added showfilename and showgeocode parameters to display or suppress columns
- Added abbreviations for latitude and longitude.
- Added tree column
- Added hyperlinks to all linked objects, including places
- Added no-space breaks in the filename column to allow the path to wrap a bit.
- Allowed the linked object names to wrap, but specified a minimum column width.
10.1.0.5 10.1 30Dec2014 No functional changes, just changed database references for TNG v10.1 compatibility.
9.0.0.4 download 9.0.0 - 10.0.0.3 26 Dec 2014 Fixed a bug that was preventing the program from recognizing when the collection was changes, and from changing the collection Add/Edit buttons and fields in response.
9.0.0.3 9.0.0 - 10.0.0.3 11Dec2014 No functional changes; no visualization changes. Cleaned up mod directives for the TNGv10.3 alpha release. Added better annotation to the code changes. Eliminated a duplicate checkbox in the search. Places cust_text insertions at the end of cust_text.php instead of at the beginning.
9.0.0.1 9.0.0 - 10.0.0.3 08 May 2014 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.2.0.13a 12.3 English
Total Family History Scott Bennett Private Site (For right now) V9.0.0.1 TNG 10.0.1 - 11.1.2 EN
Wortelboer Genealogy Bernard Wortelboer Public site 10.1.0.8 11.0.0 NL/EN
De Zoethouten van Woudsend John Zoethout Public site 10.1.0.5 10.1.0 Dutch/English
Hooley Family Links Rick Hooley Public/Private See Here See Here EN
DJCM.DK Claus Martinussen Public site 12.0.0.10 12.0 DA/EN
Bisbee Family Connection Rick Bisbee Public site 10.1.0.7(c) 10.1.2 English
Adler-Wien Herbert Fischer Public site 12.2.0.12c1 12.3 DE,(EN)
Stamboom Jongman Roel Jongman Public/Private site 10.1.0.9(b) 10.1.3 NL, DE, EN
Our Family History Paul Barrett Public/Private site 10.1.0.9b 11.1.2 EN
Roots & Relatives Remembered Ron Krzmarzick Public & Private See Here See Here EN,DE,CS,ES
Cole / Tanner Family Tree David Cole Public/Private see here see here English