Admin Cemeteries Search

From TNG_Wiki
Revision as of 10:36, 13 December 2017 by Robinrichm (talk | contribs)
Jump to navigation Jump to search
Admin Cemeteries Search (formerly Admin Cemeteries List)
Summary Adds numerous controls to the Admin Cemeteries Search page to filter the search and include optional data in the results.
Validation
Mod Updated {{{mod_last_update}}}
Download link v11.0.0.8
TNG 11.0
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 11.0.0.8
Min TNG V 11.0 (probably lower)
Max TNG V at least 11.1.2
Files modified
admin_cemeteries.php, adminlib.php, css/genstyle.css, English cemetery_help.php, English cust_text.php;
Installs css/robinmods.css, ajxcemeteriessearchmod.php, admin_cemeteriessearchmod.php
Related Mods
Notes


Purpose of the Mod

This distinctly large and complex mod adds filtering, searching, and formatting options to the Admin >> Cemeteries >> Search page in order to produce what amounts to a variety of what I hope are useful reports.

Among other things, it

  • Uses checkboxes to control whether selected result table columns are displayed,
  • Can filter results through hierarchical drop-down location boxes,
  • Can filter results according to the number of headstones tied to a cemetery, or the number of burial events at the places associated with the cemetery.
  • Sorts the results table in several ways,
  • Controls which fields are searched by the search string,
  • Reveals which database fields are being searched,
  • Has location drop down boxes to allow the search to focus on a specific location

Mod Parameters

  1. Default value for the country selection box. ("USA")
  2. A list of fieldnames that set the initial state of checkboxes that determine whether optional fields (maplink, notes) are searched.
  3. A list of fieldnames that set the initial state of checkboxes that control whether optional data (notes, burials, headstones, geocodes] are displayed in the results table.
  4. A list of names that determine whether certain controls are shown on the search form at all.

Mod Conflicts

I don't know of any conflicts. This mod and its companion mod Cemetery Edit are the only mods that affect the Admin Cemeteries programs. This mod also affects adminlib.php, but I haven't found any conflicts with the specific location in adminlib.php that it modifies.

Related Mods

  1. My Cemetery Edit mod is closely related, and I recommend it as a companion to this mod. Still, these two mods are independent of each other. Cemetery Edit modifies the Cemetery Edit screen extensively, whereas this mod focuses on the Admin Cemeteries Search screen (and related programs).
  2. This mod uses the Field Buttons mod, which displays small controls next to some form fieldss. However, it does not require that Field Buttons be installed. If Field Buttons is not installed, then the buttons simply do not appear.
  3. This mod generates information that can be used by Show Mod Names, but does not require that Show Mod Names be installed.

Requirements

  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • The only other mod that target admin_cemeteries is my [Cemetery Edit] mod, which can be installed (or not) independently.

Automated Installation

  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. Upload and Extract to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install.

In the event of a problem

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

Visualizations

BEFORE: An unmodified Admin Cemeteries Search page from TNGv9 - v11.
Cemetery admin list-before.png

And older Version: 9.2.0.5

AFTER installing Admin Cemeteries List v9.2.0.5: (which still appears to work in TNGv11.1.1, and which can be downloaded from the Revision History section below).

With the optional Associated Place column, I can now tell at a glance that the first two cemeteries on the page are not fully configured with an Associated Place.
Also note the new "Results per page" field and "Hide notes" checkbox. In each browser session, the Results per page value is initialized to the system-wide "Max Search Results" parameter from the General Settings/Miscellaneous screen. The value you enter only affects this screen, and is retained in a session cookie like the search string. Since cemetery notes can be fairly verbose, and can wind up scrunching the other fields, the user can use the "Hide Notes" checkbox (also retained in a session cookie) to suppress the Notes column.

Cemetery admin list-after1.png
Another AFTER view of v5 of the mod. This example screenshot suppresses the Notes column.
Cemetery admin list-after2.png

Newest Version: 11.0.0.8

The search page AFTER installing mod version 8
Admin cemeteries search8-after1b.jpg

Legend:

  1. Two new links in the inner menu
    • A drop-down menu that links to this Wiki article's description of the mod parameters, and to the Mod Parameter editor in Mod Manager.
    • A link to this visualization in this Wiki article.
  2. A new set of "Location" controls. Each place component (country, state, etc) has a smart selection box. They are "smart" in the sense that
    • They are populated with values based on the selected value for the next-higher-level jurisdiction.
    • If there is only one possible value - for instance, if Manning County is the only county in Idaho in this site's Cemeteries table - then that value is automatically selected, and the possible values for the next jurisdiction are populated based on that value.
    • When a state has been selected but no county has been selected, the County field is populated with that state's counties, and the Cities field is populated with all cities and their county. As a result, you can select a city without necessarily selecting its county first.
    • When a place component value is selected, that component is removed from the list of fields that are searched by the search string (#6).
  3. The search string has HTML placeholder text that tells you about characters that have special meaning to the search field (see a visualization below). The string also has field buttons" (see the Field Buttons mod). An 'X' clears the field, and and 'R' restores the field to its initial value (that is, the value it had when the page was loaded).
  4. An information icon is a link to the portion of the Cemeteries help page that describes the changes to the Cemeteries search form - particularly the controls that follow the information icon.
  5. A dynamic list of the fields that are searched by the search key. When you select place component values (Country, state, etc.) from the drop-down menus, those fields are removed from this list.
  6. These two checkboxes indicate whether the corresponding fields are searched. The default values for the two checkboxes are controlled by a Mod Parameter.
  7. The Results Per Page field, which defaults to the system-wide "Max Search Results" parameter value at the beginning of a browser session, and its attached field buttons.
  8. Checkboxes that determine whether certain columns are included in the search results. The default values of these boxes are determined by a Mod Parameter. Note that the "Notes" checkbox here controls whether the Notes are in the results table, whereas the "notes" checkbox just above (#6) determines whether the Notes field is searched. In the visualization, the Geocodes will be omitted, and the Associated Places and Notes will be included in the table. (A visualization below explains why "Associated Places" is plural).
  9. Two checkboxes determine whether the results will show the number of burials at a cemetery and/or the number of headstone photos associated with the cemetery. When either checkbox is selected, an additional set of controls appears next to them. Those additional controls are shown in another visualization below.
  10. If either of the counts (#9) is selected, you can sort the results by one of the counts (but not both). See the Sorting Results section of this article for more details.
  11. A drop-down selection list determines a second sort key order (after the count - if a count is selected). Again, see the Sorting Results section of this article for more details.
  12. The search parameters including the sort order, are listed just above the results table.
  13. The new "Place" column displays the cemetery's Associated Placename, and is displayed only if the Associated Places checkbox (#8) is selected. If the Geocodes checkbox (also #8) is selected, the geocodes for the Associate Place are displayed, too. The FindAGrave Cemetery hyperlinks in the Notes column are a result of the FindAGrave Links mod. I do not enter a full hyperlink in the Cemetery Notes field. Instead, I just enter a FindAGrame cemetery number in the format "CRid=nnn", and the FindAGrave Links mod converts "CRid=nnn" into a hyperlink to the correct FindAGrave cemetery page.
Mod version 8 Location Selection Controls
Admin cemeteries search8-after2b-placenav.jpg
  1. When a state is selected, but not a county, the City field becomes City and County, so you can select cities without having to select a county first. In this case, I have selected cemeteries in Washington County that are not in a city.
  2. The Location selected by the Location controls is shown in the list of search parameters.
  3. There would ordinarily be a "Location" column between the Cemetery column and the Associated Place column. But, given the selected location, all of the cemeteries in the results table have the same location. Since the location is now shown as a search parameter just above the results table, the Location column is omitted.
Mod version 8: Special Search String Characters
Admin cemeteries search-after3a-specialsearch.jpg

The screen clip above focuses on the search string field and its placeholder message that notes that caret, dollar sign, single quote, double quote, and space have special meanings.

  • The caret and dollar sign have the same meanings they have in regular expressions; that is
    • A caret at the beginning of the string (and only there) says that the string must occur at the beginning of a field.
    • A dollar sign 'at the end of the string (and only there) says that the string must occur at the beginning of a field.
    • A string that begins with ^ and ends with $ must match an entire field exactly.
  • In the Cemeteries Search, the space character changes the search strategy dramatically from the TNG norm. Just as in Google searches, a space here means "search for any of these words", but unlike Google, it also means "the words must all occur in the same field. The latter condition is driven by the fact that the Cemetery search searches several specific fields - the Cemetery Name field, the four location fields, and sometimes the maplink field and the notes field. With a search string such as such as "Bacon Cemetery", the search will look for "Bacon" and "Cemetery" in each field, but not necessarily adjacent to each other.
  • To do a normal substring search, as in Google searches, you can surround your search string with single quotes or double quotes.

Admin cemeteries search-after3b-specialsearch.jpg

  1. In the location controls, only the country has been selected.
  2. The search string is 'Bacon Cemetery' (without the quotes), meaning that the search will look for 'Bacon' and 'Cemetery' separately, but in the same field.
  3. 'Country' has been removed from the list of fieldnames being searched, because a specific value has been selected.
  4. In the search criteria above the search results table, the search string is shown broken into separate words, with a message saying how the search will be conducted.
  5. You can see in the search results that the words "Bacon" and "Cemetery" do not have to be adjacent to each other.
  6. The Burial count is shown in a column titled "Bur". That column is the first data column in the table because the Burial count is the primary sort field. If the Sort By Burial Count checkbox were not checked, the Burial Count column would be to the right of the location.
Mod version 8: Burial Count Controls
Admin cemeteries search-after4-burialcount.jpg

(In this screen clip, the blue numbers continue the numbering of new features from the earlier screen clip with numbers 1-14)

  1. In the location controls, the state of Iowa has been selected.
  2. The "Count burials" checkbox has been checked,
  3. (Blue number 15) Controls that set a criterion on the counts are visible because the "Count burials" checkbox was checked. There are three controls:
    • The checkbox that activates the criterion
    • The comparison operator, where "less than" has been selected, and
    • The value to which the count is compared, which has been set to 10. This is a number field that allows the user to use little arrows to increment or decrement the count.
  4. The Sort by Burial count checkbox has been activated by marking the Count Burials checkbox, and is selected.
  5. The "ASCending/DESCending" sort selection control has been set to "DESCending" for the Burial Count sort.
  6. The search and sort criteria just above the results table show the The Burial count is shown in a column titled "Bur". That column is the first data column in the table because the Burial count is the primary sort field. If the Sort By Burial Count checkbox were not checked, the Burial Count column would be far to the right.
  7. (Blue number 16) Because a partial location has been selected (Iowa, USA), the location column is called "Sub-location" and does not show the full location of the cemetery, but only the portion of the location that is within the selected location. Since the location search criterion is shown just above the results table, users can easily determine the full location if they forget the selected location.
AFTER installing mod version 8:Showing the effect of two trees with the same Associated Place
Admin cemeteries search8-after5-twotrees.jpg
  1. The search string is "lake"
  2. The sort order "Country, State, County, City, Cemetery Name (as opposed to the first option, "Cemetery Name, City, County...) causes the location names to be expressed with Country first. (Note the way we express placenames, with City first, is not really a good sort order.)
  3. The Search and sort options show that the sort order will be country first.
  4. Because the Location is the primary sort key, it is the first data column in the results table. Also, the country (USA) has already been selected, so it is not needed in the Location column, which shows location names with the state first, to be consistent with the sort order.

(The blue numbers continue the numbering of new features)

  1. The Geocodes column abbreviates both the column name and the data values. The superscript 1 refers to a footnote that explains the field contents.
  2. There are two significant aspects of the Associated Place data:
    1. Because the Geocodes column is displayed, the geocodes of the Associated Place are displayed, with the same rounding as in the Geocodes column.
    2. In the second result, there are two values for the Tree and geocodes, because the Associated Place occurs in two trees.
  3. The footnote associated the the Geocodes column explains which values are in the column, and notes the rounding of the latitude and longotude values.
AFTER installing mod version 8: Field Buttons
Admin cemeteries search8-after6a-fieldbuttons.jpg

In the screen clip above, new feature 18 is the field buttons.

  • For the search string field:
    • The X button will clear the search string value.
    • The R button will restore the field to the value it had when the page was loaded.
  • For the Results per page field:
    • The R button, as above, will restore the field to the value it had when the page was loaded.
    • The D button will assign a default value to the field. In this case, the default value is the TNG system parameter "Max Search Results".
    • The A button will assign a value that means "All Items". In this case, that value is 'all'.

Buttons that would not change the value are shaded out, as shown below.
File:Admin cemeteries search8-afterb-fieldbuttons.jpg
In this screenclip, a search has been done with no search string, and with 30 Results per page. As a result:

  • For the search string field:
    • The X button is shaded out because there is no value to clear.
    • The R button is shaded out because we just loaded the page, and the field value is still in its initial state.
  • For the Results per page field:
    • The R button, as above, is shaded out because we just loaded the page.
    • The D button is shaded out because the the field already has the default value (the value of the TNG system parameter "Max Search Results").
    • The A button is visible because the value is not 'all'.

Files Modified

  1. admin_cemeteries.php - The Admin Cemeteries Search page, which is the target of almost all of the changes
  2. adminlib.php - The function tng_adminheader has been modified to install robinmods.css into the css folder, if an appropriate copy of robinmods.css is not already there.
  3. genstyle.css - Style rules that define minimum widths for some result table columns
  4. cemetery_help.php English - Modified fairly extensively to describe the new search form, to describe the meaning of TNG "Cemeteries" vs Burial Places. The help file also now links to two Wiki articles (including this one).
  5. admintext.php English - Around 50 new strings

Files Installed

  1. ajx_admincemeterysearch.php - An AJAX program that reads place jurisdiction values (i.e. a set of states, counties, or cities) that are appropriate for the selection that a user has made in a higher-level jurisdication.
  2. admincemeterysearch.php - A function library used by admin_cemeteries.php and the AJAX program listed just above. It actually has only one function, which is used by admin_cemeteries.php to populate the location drop-down boxes as the page is loaded, and by AJAX OnChange functions that invoke ajx_admincemeterysearch.php to populate lower-ordered location drop-down boxes when a selection is made in a higher-ordered location drop-down box. (See ajx_admincemeterysearch.php for more details.)
  3. css/robinmods.css - Style rules used my several of my (Robin Richmond's) mods.

Installing robinmods.css

I have created a scheme to define these style rules only once in each program that I modify, even if that program is modified by several of my mods. With this scheme, I can avoid multiple duplicate style definitions in

  • genstyles.css,
  • Embedded style sheets (where the rules are hard to override), and/or
  • Program-specific CSS files (where the rules are also hard to override),

and each mod that uses the rules doesn't have to depend on a mod that does nothing more than install style rules.

This scheme utilizes the two TNG system functions that generate a <link> tag for genstyle.css in every TNG program:

  1. tng_adminheader (in adminlib.php) for Admin programs, and
  2. tng_header (in genlib.php) for end-user programs.

It works like this:

  • I keep a central copy of robinmods.css in my mods folder.
  • robinmods.css starts with comment that contains a version number that I update when I modify the central robinmods.css.
  • If a mod needs any of my common styles, I copy the central version of robinmods.css to the mod's subfolder when I update the mod.
  • Mod Manager does not install robinmods.css.
  • Each mod that uses robinmods.css modifies either tng_adminheader (in adminlib.php) or tng_header (in genlib.php) to:
    1. Determine whether robinmods.css exists in the css folder,
    2. Determine whether the mod's copy of robinmods.css is a newer version than the one in the css folder, and
    3. Copy robinmods.css from the mod subfolder to the css folder if (and only if) it needs to.
    4. Place a robinmods.css <link> tag right before the genstyle.css <link> tag,

The result of this scheme is that all programs that need the style rules in robinmods.css use one central copy, and site administrators who want to override any of the rules in robinmods.css can do so in their genstyle.css files.

Styles in robinmods.css

  • The .rrnoprinter class that prevents printing on a printer.
  • Classes for drop-down divs similar to the Search drop-down that is in the topmenu of most end-user programs
  • The .rrinfobutton class that formats little blue circular information buttons.
  • and others

Revision History

Mod Version TNG Version Date Note
Admin Cemeteries List v9.2.0.1 9.2.0 - 10.0.0.1 08 May 2014 Initial release.
Admin Cemeteries List 9.2.0.4 9.2.0 - 10.1 31 Dec 2014 Updated for conformance with v10.1; Changed the Geocode column to round the values to 3 decimal places, and eliminate the keywords.
Admin Cemeteries List 9.2.0.5 download 9.2.0 - 11.0 21 Mar 2016 Converts new lines to <br> tags in the notes field; Depends on [[Show Mod Names|Show Mod Name v2+]; Tested for TNGv11
Admin Cemeteries Search v11.0.0.8 11.0 - 11.1.1+ 5 Sep 2017 Numerous changes:
  • Small changes
    1. Right-justifies the label column in the search form layout table.
    2. Applies a style class (rrnoprinter) to some elements on the Admin Cemeteries Search page so that they do not print.
    3. Removes dependencies on the DisplayModNames and Blue Info Button mods.ppl
  • The big change... added numerous controls to the search form to
    1. Enable new results table columns,
    2. Filter results in new ways,
    3. Sort the results table,
    4. Reveal which database fields are searched by the text search, and
    5. Control which fields are searched by the search string.

The controls are:

  • 3 checkboxes enable or disable 3 optional columns in the results table. The default checkbox status for each of the 3 checkboxes is controlled by a Mod Parameter
    1. Cemetery Notes (new)
    2. Associated Place (new) - Note that, in databases with more than one tree (and where the trees have separate Places lists), identical places in different tree can all be associated with one cemetery.
    3. Geocodes (which is displayed by the Pristine code).
  • 2 checkboxes enable burial counts and headstone counts, which are displayed in the same column.
  • 3 fields in the search table define a new filter on the results table that uses the new burial count and headstone count. These options are visible only if the Burials or Headstones count are enabled. They let the user specify things like "Omit cemeteries where the burial count < 10". The 3 fields are
    1. A checkbox that actives the filter,
    2. A <select> box of comparison operators,
    3. And a value for the comparison.
  • 2 checkboxes allow the results to be sorted by burial OR headstone counts. (The SQL code just can't handle sorting by both.) The checkboxes that enable sorting by burial count OR headstone count are always visible, but are disabled if the corresponding count checkbox is not checked.
  • A seleclooption box allows the user to sort the results by the Cemetery name, Cemetery location, or associated Burial Place (in combination with the Burial or Headstone count)
  • 2 controls specify whether the two sorting options are ascending or descending. These two controls are hyperlinks that toggle the displayed hyperlink text between '(ASC)' and '(DESC)'
  • 4 "smart" selection boxes focus the search by specifying values for Country, State, County, and City. They are "smart" in the sense that if Country=USA, then the States box only offers States in the USA, and if State=Iowa, then the County box only offers counties in Iowa, etc.
  • A control that is not a form field dynamically displays the list of fields that are searched by the text search. As country, state, county, and/or city values are selected by the location controls, those fields are removed from the list.
  • 2 checkboxes in the list of fields searched by the text search string controls whether two fields are searched:
    1. Maplink - the hyperlink to the Cemetery map or photo image, which was searched by the pristine code, and
    2. Notes, which were not searched by the pristine code

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 11.0.0.8 11.1.1 English
MOTYER Family Genealogy John Mark Motyer Public site see here see here EN, DE, RU
Total Family History Scott Bennett Private Site (For right now) 9.2.0.1 TNG 10.0.1 EN
Mitchell Families Online Roger Mitchell Very useful mod 9.2.0.1 10.0.3 EN
The Dutton's of Vermont Darrin Dutton 9.2.0.4 10.1.0 EN
Brady Family Tree in Western Australia Darryl Brady Public site 9.2.0.4 10.1.1 EN, DE
R G Strong Family Genealogy Russell Strong Public site 9.2.0.5 11.0.1 EN, DE, FR, NL
Wortelboer Genealogy Bernard Wortelboer Public site 9.2.0.5 11.0.0 NL, EN
Brabantse Genealogie Rob van Rij Public Site 9.2.0.5 11.0.1 EN,FR,NL
Woking Family History Pete Smee Secure site 9.2.0.5 11.1 EN