Cemetery Map and Images

From TNG_Wiki
(Redirected from Cemetery Map And Image)
Jump to navigation Jump to search
Cemetery Map and Images
Summary In the cemetery detail page, optionally, if the cemetery image is larger than the dimensions specified by a mod setting, it is resized to dimensions specified by additional mod settings and displayed with a button that enlarges it.

Floats the notes and cemetery image side-by-side if there is room. Makes several changes to the pin ballons for the sake of readability. Adds a cemetery pin if there are headstone pins, and displays an explanation above the map.

Renames the Cemetery Images display table to "Other Cemetery Media" if it contains media items that are not images.
Validation
Mod Updated 11 Nov 2023
Download link v14.0.1.3f
TNG 14.0.1
Download stats
Author(s) Robin Richmond
Homepage this page
Mod Support My Mod Support form
Contact Developer My Mod Support form
Latest Mod 14.0.1.3f
Min TNG V 13.0
Max TNG V 14.0.3
Files modified
showmap.php, admin_genconfig.php, admin_updateconfig.php
Related Mods
Notes

Purpose of the Mod

To make several small enhancements and simplifications to the information on the Cemetery Detail page (showmap.php):

  1. Makes sure that the cemetery is pinned to the map. In the native code, if any headstones have coordinates, the headstones are mapped but the cemetery isn't.
    • An optional message above the map tells users about the map pins.
  2. The map pin balloons are reworked a bit. The cemetery notes and geocoordinates are not shown in the pin balloon since they are displayed right below the map.
  3. (Optionally) Scales down large cemetery "map" images.
    (TNG refers to the main cemetery image as a "map", meaning a map of the cemetery, but a photo of the cemetery is often used.)
  4. Changes the name of the "Cemetery Photos" table if there is a cemetery "map" image, or if non-images are linked directly to the cemetery.
  5. In the "Location" column of the Headstone Photos table, displays the pin number as a pin icon and abbreviates "Latitude" and "Longitude"

Mod Options

  1. A checkbox: Whether to display an informative message above the map when there are pins for the headstones and the cemetery.
  2. A checkbox: Shrink large cemetery images, with suboptions:
    • Resize the cemetery image if its dimensions exceed a specified width or a specified height
    • Limit the rezized image to a specified width and a specified height.
    • Whether to display a button that restores a resized image to its full size.

CemeteryMapAndImagesMSB.png

Other Mods

Related Mods

  1. Cemetery Headstones controls the display of the Headstone Photos tables in both showmap.php and headstones.php. This mod (Cemetery Map and Images) changes one column in the Headstone Photos table, while maintaining compatibility with Cemetery Headstones.
  2. Cemetery Burials Table reworks the All Burials table in showmap.php. It doesn't really interact with this mod, though this mod was originally spun off from it.
  3. The Mod Settings Blocks mod packages this mod's options into what I call a "Mod Settings Block", which is a set of form fields that formatted and labeled so that it stands out among other options in an Admin>>Setting form. Mod Settings Blocks is a prerequisite for this mod; it must be installed before this mod can be installed.

Compatibility

Installation

This mod includes a typical mod subfolder, with the same base name as the mod's .cfg file. The subfolder is atypical in that no files in it are installed to working TNG folders. However, it does contain critical files that contain the mod's language strings, which the mod does not add to standard cust_text.php files. Instead, the PHP code modified by this mod loads the language strings from files in the mod's languages/ subfolder. Read more about this technique.

[Show Standard Installation Process]

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

The map pin balloon in showmap.php, before installation

Note that the small text box in the balloon can't hold the whole note, and wraps all text, and the full, cleanly formatted note is on the page below the map. Cemetery photo-before-notes.jpg

The map pin balloon in showmap.php, after installation

Cemetery photo-after-notes.jpg

The Cemetery "map" image, before installation

This screenshot shows (part of) a large image that either doesn't fit in the window or enlarges the browser window, and takes up too much space on the page. The tiny text reveals the scale of this screenshot, from a web browser whose window was expanded by the large image.
Cemetery photo-before-photo.jpg

The Cemetery "map" image, after installation

This screen shot is at a normal scale, with the button that, of course, shows the image in its full size.
Cemetery photo-after-photo.jpg

The Map with Headstone pin and a Cemetery pin
  • The "Mod Information" menu in the dark blue bar comes from the Inner Mod Menus mod, and is visible (as is the entire blue bar) only to site administrators. See the last visualization.
  • The first message above the map comes from the mod Google Maps - Cemetery Message.
  • The second message, about the map pins, is generated by this mod. It appears only when at least one headstone photo has geocoordinates, and it can be suppressed altogether by a mod option.
  • Note that, even at this zoom level, one of the headstone pins is covered by one of the other pins.

Cemetery photo-after-map-pins.jpg

The enhancements to the Location column of the Headstones Photos table

Cemetery photo-after-headstones-table.jpg

The options in the mod settings block

Here, you see the this mod's Mod Settings Block, in admin_genconfig.php, at Admin>>Setup>>General Settings. The triangular arrow next to the subfolder heading Mod Settings Blocks is pointing to the right, meaning that the subform is not open, and that your site's other mod settings blocks are not visible. If you were to open the subform by clicking on the heading, you would see the mod settings blocks for other mods that you have installed.
Cemetery map and images-msb.jpg

The showmap.php Inner Mod Menu
  • showmap.php is changed by Cemetery Burials Table and Headstones Report as well as by Cemetery Map and Images, so the Inner Mod Menu lists all three mods.
  • The screenshot shows the popup box that is generated by clicking on the "What has changed" link below "Cemetery Map and Images"
  • The "Mod Information" link and the Inner Mod Menu are visible only to site administrators.
  • This list of changes is very similar to the "Purpose of the mod" section of this article, but is presented here in the page where the mod's effects are visible.

Cemetery photo-imm.jpg

Language Strings

This mod stores its language strings (for all languages) in the languages folder within the mods subfolder, in files named {language}_custtext.php (e.g English_custtest.php, French_UTF8-custtext.php). There is typically no need for separate file for English-UTF8.

This technique for storing custom text files has several advantages, including that translators can create, test, and edit language files without having to uninstall and reinstall the mod.

Specifying site-specific overrides to language strings is not as straightforward as it is with conventional cust_text.php files. Read about the problem and the solution.

Revision History

Mod Version TNG Version Date Note
v14.0.1.3f 14 11 Nov 2023 In the cemetery detail page, optionally, if the cemetery image is larger than the dimensions specified by a mod setting, it is resized to dimensions specified by additional mod settings and displayed with a button that enlarges it.
v14.0.1.3e 14 23Sep2023 Corrected location string.
v14.0.1.3c

rr

12Mar2023 Upgrade to TNGv14
v14.0.3b 14 04Nov2021 Upgrade to TNGv14; No changes in functionality
v13.1.0.2b 13.1 04Nov2021 Changed one line in the showmap.php target location 3 search text to accommodate TNGv13.1
v13.0.0.3 13.0-13.0.4 25Jul2021 Updated one location accommodate TNG13.0.4 and to maintain compatibility with TNG13.0-TNG13.0.3. Now changes showmedia.lib to convert URLs in the note to hyperlinks.
v13.0.0.2 13.0-13.0.3 2Apr2021
[Show Details]
  1. Changed the title of the Cemetery Photos table to "Cemetery Media" if it contains non-images or to "Other Cemetery Photos" if there is a primary cemetery photo (the so-called "cemetery map")
  2. This mod rather than Cemetery Headstones now resizes the main cemetery image.
  3. Defined mod options to make the resizing of the main cemetery image both optional and configurable.
  4. Made readability modifications to the map pin balloons and the location column of the Headstones table.
  5. Added the pin icon to the 'location' column of the headstones table, and abbreviates the words "latitude and longitude"
  6. Moved language strings to the mod subfolder like most of my other mods
  7. Placed a map pin for the cemetery itself even when there are headstone pins.
  8. Optionally added an optional informational message above the map when the map contains both headstone pins and a cemetery pin.
[Hide Details]
13.0.0.1 13 19Oct2020 Initial release; spun off from Cemetery Burials Table

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
A Cemetery on Robin's Roots Robin Richmond Mod developer 14.0.1.3f 14.0.3 English
Huygens - Van de Moortel Tom Huygens Public/Private on WordPress 13.1.0.2b 13.1.2 NL
Kielakowie.com Janusz Kielak Public site 13.1.0.2b 14.0.1 PL, EN, DE
Auf den Spuren meiner Ahnen Michael Klein Public/Private site 14​.0​.1​.3e
TNG 14.0.3
EN, DE