Placesearch-More Info

From TNG_Wiki
Jump to: navigation, search

In TNGv12 and beyond, this mod uses the new guidelines for TNG v12+ cust_text.php files
If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]


Placesearch-More Info
Summary Modifies placesearch.php to to incorporate places subordinate to the named place, and to do display data info other than the redundant place name in the even details.
Validation
Mod Updated 15 Nov 2018
Download link
v12.0.0.3
TNG 12.0
See Revision History to download older mods
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod v12.0.0.3a
Min TNG V 12.0
Max TNG V at least 12.0.2
Files modified
placesearch.php, cust_text.php English
Related Mods
Notes

Purpose of the Mod

To make placesearch.php (which is, effectively, the "Place Detail" report), more useful by:

  • Displaying the entire Place Note rather than a truncated version.
  • Removing some redundant information from the various event tables,
  • Adding information to the event tables,

and, more significantly

  • Adding the ability to focus on a particular Event type, and
  • Adding the ability to see and report on all of the places that are subordinate to the selected place. That is, given a placename such as "Houston, Harris County, Texas, USA", this modification allows the user to view all placenames within Harris County, e.g. the cities of Houston, Pasadena, etc., as well as cemeteries within those cities and the county.

This rather complex mod makes numerous changes to placesearch.php. It does not substantially alter the basic functionality of placesearch.php, and in particular, it does not re-engineer the user interface (as I do in some mods). The more complex extended functionality is either hidden behind new action buttons or "suppressible" via mod parameters.

The new features are listed in more detail in the Visualizations section below

The entire Place Note

Before displaying the Place note, the native Place Detail report like several other TNG programs, calls the TNG system function truncateIt(). As its name implies, truncateIt truncates the text fields to the length specified by a TNG system parameter. It also removes any HTML tags in the field.

To display the entire Place note, the modified Place Detail report calls a different TNG system function, insertLinks(), which

  • Does not truncate the Notes field or remove existing HTML, and
  • Recognizes web addresses and converts them into hyperlinks. (See Related Mods below.)

Mod Parameters

  1. $maxAutomaticSubordinatePlaces (10) - As noted above, this mod allows users to see places that are subordinate to, or within the selected place. When there are few enough subordinate places, the subordinate places can be displayed automatically. This parameter determines what "few enough" is, when there are more than $maxAutomaticSubordinatePlaces subordinate places, all of the subordinate results will be hidden behind a button. A value of zero means, in effect "Don't ever load subordinate places automatically".
  2. $abbreviatePlacenamesInList (1) - By definition, the selected Placename is a suffix to every subordinate Placename. To save space in the list of subordinate Placenames, that redundant suffix can be hidden. The full Placename will be displayed when you mouse over an abbreviated Placename. The default is to hide those suffixes.
  3. $abbreviatePlacenamesInTables (1) - The redundant Placename suffix can also be hidden in the various results tables that are the core content of the Placesearch report. Note that, when mixed with other Placenames in the results table, the hidden suffixed may result in some confusion. Still, the default value of this parameter hides the suffixes. (See the first "After Installation" visualization below.)

Paths to the Place Detail report

Several execution paths lead you to the Place Detail report. Among them are:

  1. In many places where Place names are listed (for example, the Person Profile, Ancestor & Descendant reports, and the end-user Place List program (browseplaces.php), a small spyglass icon next to the Place name leads to the Place Detail report.
  2. The View/Test button on each result line at Admin >> Places runs the Place Detail report.
  3. In the list of places in the Place Detail report, each Placename is a hyperlink to the Place Detail report.
  4. Portions of the selected Place name at the top of the Place Detail report are hyperlinks to the Place Detail report.

The first two of these paths always select a Place name in a particular tree, and the last two are new features implemented by this mod. (I believe that there is a also path that allows you to select a Place name without specifying a tree, but I can't think of it now.)

Compatibility

This mod incorporates the single change made by Placesearch Entire Note, and is thus not compatible with it.

Related Mods

This mod is not dependent on any other mods, but coordinates with a few:

  1. This mod saves data that can be used by the Show Mod Names utility mod, but Show Mod Names does not need to be installed for this mod to work.
  2. If this mod is installed, Notes-Expand WWW Refs affects the Place Notes field by recognizing web addresses that begin with "www." and converting them into hyperlinks.
  3. Similarly, if this mod is installed, FindAGrave Links affects the Place Notes field by recognizing abbreviated FindAGrave Grave and Cemetery references (CRid=nnnn or GRid=nnnn) and expanding them into hyperlinks.

Note that Notes-Expand WWW Refs and FindAGrave Links affect the TNG system function insertLinks(), and thus automatically affect several TNG programs. They affect the Place Detail only if this mod (Placesearch-More Info) is also installed.

Installation

This mod uses the standard installation process. [Show 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

Placesearch-more info-before1.jpg
The Place Details report before installation of this mod

The two Event tables shown here have 204 and 60 events, and thus require 7 and 2 pages to display. Other Event tables might have 2 events, or 5000.
If you want to focus on the just the nth page of some specific Eventtype table, the program will

  • Take the time to query every type of event, and
  • Display a pagefull of results for every Eventtype that has at least n pages of results.

This report characteristic causes each the page to display more slowly that if it focused on the one Eventtype in which you are interested, and can make it hard for you to find that specific Eventtype.

After Installation: 1. Changes to Event Tables
  1. The Primary instances of TNG's built-in Eventtypes are explicitly labeled.
    • The built-in Eventtypes (Birth, Death, Christening, Burial, Marriage, Divorce, and LDS events). Most, if not all, Person and Family records in a TNG database, are likely to have just one instance of these events.
    • Secondary instances of the built-in Eventtypes are not explicitly labeled as such.
  2. The Placename is now displayed in the heading for each Eventtype.
  3. The redundant event place column has has been removed from each table.
  4. Every event table for personal events now has Birth and Death columns.
    • The redundant placename suffix ", Bradley County, Tennessee, USA" has been removed from the Placename "Cleveland...".
    • This feature can be suppressed by a mod parameter.
  5. To flag cases where the selected Placename is used, it is abbreviated as "(here)". No spyglass is needed for (here).
    • This feature is part of the "abbreviate placenames" feature that can be suppressed by a mod parameter.
  6. When a person has events on consecutive lines, the duplicate Person names, Birth/Death dates, and Birth/Death places have been replaced with ditto marks.
Placesearch-more info-after-AddAndHideData.jpg
After Installation: 2. Focusing on an Event:

In case you are interested in drilling down into only one type of event, a "Focus" button is now placed next to each Event table. When you click on a "Focus" button, the program displays only one event table.

On pages where only one event table is displayed, the program will display a "Show All Events" button in place of the "Focus" button.

If you are looking at, say page 5 of all Eventtypes, and then decide to focus on one Eventtype, the program necessarily takes you back to page 1 of that Eventtype. Similarly, if you are focused on one Eventtype, and are looking at page 5, when you click "Show All Events", you'll be taken back to page 1.

File:Placesearch-more info-after-Focus.jpg
After Installation:3. Bubble-up and Hiding the map:

These two features are manifested at the very top of the Place Details report; hence the very short screen clip just below.

  1. The hyperlinks within the place name at the top of the page let you "bubble-up" to higher-level place names.
    • In this, those higher-level placenames are
      1. Bradley County, Tennessee, USA
      2. Tennessee, USA, and even
      3. USA
    • The place that you bubble-up to does not have to be represented by a Placename in your database! You will see a warning if you bubble-up to a place that isn't in your database, but when you encounter that situation, you can:
      • View (and then select) subordinate places for the new place (as described with the next visualization), or
      • Just bubble-up to another place component.
  2. New "Hide Map" and "Show Map" buttons let you hide (or show) the map - not just for the moment, but for subsequent invocations of the Place Details report.
    • If the map is hidden, you may see an "Always Show Map" button in addition to the "Show Map" button.
  3. The "Include Subordinate Places" button will add all places that are subordinate to (or within) the selected place to be added to the map and to the Event tables. The way that subordinate events are defined and handled are described with the next visualization. The button is highlighted here because the next visualization assumes that the user has clicked on this button.
File:Placesearch-more info-after-BubbleUp.jpg
After Installation: 4. Subordinate Places:

This is the most significant new feature implemented by this mod. It lets you see map pins and events from all Places that are subordinate to (i.e. within) the selected place! [Show all kinds of Details]</div>

If you are looking at a report for "Bradley County, Tennessee, USA", the native TNG code does not show you all events that occurred in Bradley County. Instead, it shows you all events that occurred at the exact placename "Bradley County, Tennessee, USA", excluding events that occur within Bradley County, at places like "Cleveland, Bradley County, Tennessee, USA", "Fort Hill Cemetery, Cleveland, Bradley County, Tennessee, USA", etc.

The modified code lets you see both. It starts with that one placename, but gives you the opportunity to see all subordinate places, as pins on the map, as a list of placenames just below the map, and/or in the Event tables.

Ordinarily, even with the modified program, the Place Details report starts with just one place in the map, and lists only the events that occur at' that place, as illustrated by all three "After Installation" visualizations above. The modified program also has a button that shows the number of subordinate places, e.g. "Include Subordinate Places (35)" (#1 on the screen clip below). When you click on that button, the page reloads and

  1. Displays all of those subordinate places on the map, and
  2. Includes all of those subordinate places in the event search results, but
  3. Does not (necessarily) list all of the Placenames below the map.

Below the map, you'll see another button that says "Show place names" (#2) (see the next visualization).

Special cases

  1. If the selected Placename has only a few subordinate places, the modified code loads them automatically, with a button that says "Exclude Subordinate Places". The meaning of "a few subordinate places" is determined by a mod parameter.# The Place Details report is normally invoked for a specific tree in your database. But when it is invoked without a selected tree:
    • More than one instance of a selected place may be shown on the map (as with the native program), though you would ordinarily expect to see just one pin, as they would ordinarily all be placed at the same geographic coordinates.
    • If (a) no tree has been specified and (b) there are multiple instances of a subordinate Placename in different trees, then the list of subordinates will have multiple instances of the Place name, and each instance of the Place name will be assigned a different pin number.
[Hide Details]

This screen clip represents the Place Detail Report after the user has clicked on the "Show Subordinate Places" button.

  1. The "Show Subordinate Places" button has been replaced with two buttons, "Show full Placenames" and "Exclude Subordinate Places" button.
  2. There are now multiple pins on the map.
    • The selected Place is represented by pin #1
    • Places with the same geolocation utilize one pin. All Placenames associated with that pin are displayed in the pin's popup balloon.
  3. Another new button, "Show place names", causes a list of all of the subordinate Placenames to be displayed. (See the next visualization.)
  4. The Place Detail Report displays a Cemetery table if any cemeteries exist in (or in this case within) the selected Place.
    • The values in the Location column of the Cemeteries table are never abbreviated because, unlike Placenames, Cemetery locations are composed of separate City, County, State, and Country fields.
  5. In the Primary Birth events table, the Birth Place column is displayed because the report is no longer limited to one Placename.
    • When subordinate places are being displayed, the Event Place column necessarily consists of the selected Placename itself (represented by "(here)") and subordinate Placenames.
    • The abbreviation of Placenames can be suppressed by a mod parameter.
File:Placesearch-more info-after-Subordinates.jpg
After Installation: 5. List of Subordinate Places:

When you click the "Show place names" button shown in the previous visualization, the page display a list of the subordinate Placenames. (This button does not cause the page to reload, as most of the other new buttons do. This button simply displays the names, which were already in page, but hidden.)

  1. As in the native code, the geocoordinates associated with a pin are displayed when you mouse over the pin.
    • The geocoordinates are no longer in the pop-up balloon.
  2. A pin's balloon pops up when you click on the pin.
    • When a pin represents more than one Place, each Placename is shown in the balloon.
  3. The "Display place names" button has been replaced by three buttons: "Show full Placenames", "Sort by Placename", and "Hide place names"
    • This "Show full Placenames" button applies only to the list of Placenames, not to the Event tables below.
  4. The selected Placename is shown above a horizontal line, and the subordinate Placenames are show below the line.
    • Each subordinate Placename has an attached spyglass as a hyperlink to its own Place Detail Report. As a result, you can drill down from a County to a City, etc.
    • When you hover overa placename, the full placename is displayed in a popup. (This is not shown)
    • When you click on an abbreviated Placename, the full Placename is displayed, as illustrated by "Charleston, Bradley County, Tennessee, USA"
  5. The Placenames of Places without geocoordinates are shown at the end of the list.
Placesearch-more info-after-SubordinateList.jpg

Styles

This mod does not add style rules to css/genstyle.css because there are already sooo many rules in genstyle.css, and it seems inappropriate to add several new styles that are used by only one program. Instead, the style rules created by this mod are in an embedded style sheet that is positioned in the DOM just ahead of the reference to genstyle.css. As a result, if TNG site administrators want to modify these rules, they can do so by adding rules at the bottom of genstyle.css or their template's mytngstyle.css.     [Show this mod's styles]</div>

/* Create just a little bit of room around <h4> headings */
h4.rrpmi-h4 {margin-top:2px; margin-bottom:2px}
/* Create a minimum width for data cells for dates and places */
table.rrpmi td.placecell {min-width:10em;}
table.rrpmi td.datecell {min-width:1em;}
/* Wrap the event heading and focus button */
.rreventhead {max-width:1000px;}
/* Border between the primary and subordinate place lists.*/
/* Note that the place lists are not HTML lists, but are a series of divs that wrap two
   divs that float next to each other.  That's the only way I could come up with to
   get a pin image next to some items, and a sequence number next to others.*/
#rrpmi-primary {border-bottom:thin solid grey;
}
/* Define a width for the subordinate place list so the right-floated "Focus" buttons don't
   drift too far to the right. And force the subordinate place list into two columns.*/
#rrpmi-subordinate {max-width:80em;
	column-count:2;
	column-gap:3.4em;
}
/* This is the wrapper for each item in a placelist. */
.rrpmi-item { break-inside:avoid;
	overflow:hidden;
}
/* This class is for the pin or number that is listed next to a placename. The width is
   designed to accommodate pins or list item numbers. The pin is actually a background image.*/
.rrpmi-num {float:left;
	width:2.2em;
	text-align:right;
	background-repeat:no-repeat;
	break-inside:avoid;
}
/* When a placename in a place list has a pin, a spacer gif image is placed in the floating div
   where the pin is a background image.  The spacer gif dimensions cut off part of the tip of
   the pin to avoid excessive whitespace between placename. */
.rrpmi-num img {width:20px; height:20px;}
}
/* The placenames are put in divs with the rrpmi-name class. */
.rrpmi-name {float:left;
	font-weight:bold;
	margin-left:2.2em;
	break-inside:avoid;
}
/* When a placename in a place list has a pin, this class makes sure that the placename div is
   tall enough to accommodate the truncated pin in the div with class=rrpmi-num. */
.rrpmi-pin { min-height:25px;
}
[Hide the styles]

Revision History

Mod Version TNG Version Date Note
12.0.0.2 12.0-12.0.1+ 15Nov2018
  • Simplified the map popup balloons. Geocodes and notes are no longer in the balloons.
  • When a pin represents multiple Places, all of the Placenames are listed in the popup balloon.
  • Added mod parameters that suppress the abbreviation of Placenames
  • Added a button to "Show full Placenames" or "Show short Placenames"
  • Placenames are no longer links to their own Place Details report. Instead, the standard spyglass serves as the hyperlink to a Place Details report.
  • Individual abbreviated Placenames now
    • Pop-up the full Placename when you mouse over them, and
    • Are changed to the full Placename when you click on them.
  • When Places have notes, a link that says "Notes" is displayed, and the note is displayed when you click on the link.
  • One very large target location replacement has been broken into two locations to accommodate the OpenStreetMap mod.
11.1.1.2a 11.1.1-11.1.2 3Sep2018 Some fixes for v12.0.0.2 were omitted from v11.1.1.2. So v11.1.1.2a just brings my TNv11 version of the mod into sync with my TNGv12 version.
12.0.0.2 12.0+ 28Jun2018 No functional design changes, but did fix a problem. That is,

the program wasn't always working correctly when deciding whether to automatically display place pins and/or placenames when the number of places below the location exceed a certain number. That logic was reworked substantially.
Also made technical changes described in the .cfg file. In particular, I made the mod compatible with new TNGv12 Mod Manager specs.

11.1.1.2 11.1.1 - 11.1.1.2 17Dec2017 Implemented the mod parameter,and made these subtle changes:
  • Fixed the location count, which was out of sync with the pin count
  • Inserted call to insertLinks in place of the call to truncateIt so that the entire Place note can be displayed.
  • The pins in the list of places are implemented as backgrounds.
11.1.0.1 11.1.0 - 11.1.0.1 11May2017 New mod.

Sites using this mod

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

URL User Note Mod-Version TNG-Version User-language
Robin Richmond's Genealogy Database Robin Richmond Mod developer 11.1.0.2 11.1.2 English
Cole / Tanner Family Tree David Cole Public/Private see here see here English
KK's Family History Kathy Kult Private Site; 11.1.1.2 needs an update on line #923 to add <image> tag which was added to placesearch.php in TNG v12.0. 11.1.1.2 12.0 English