Second Site supports image and text exhibits linked to people, events, citations, sources, and places. This page describes general topics about exhibits that may influence how you build your site or manage your TMG exhibits. The Exhibits Section describes the specific controls in that section.
Second Site supports images associated with your genealogical data when they are stored as external exhibits.
If you have internal image exhibit that you would like to include in your site, you can use TMG Utility to convert internal images to external images. The same TMG Utility feature will also create resized images for the Alternate Image Folder.
There are six classes of image exhibits:
- The primary image linked to a person.
- Other images linked to a person.
- Images linked to an event.
- Images linked to a citation.
- Images linked to a source.
- Images linked to a place.
For each of those classes you have the option to
- Ignore the image, in which case Second Site will not include the image in the output,
- Embed the image on the page, in which case Second Site will copy the image to the output directory and add the proper HTML to display the image on the page, or
- Link the image from the page, in which case Second Site will copy the image to the output directory, create an HTML page exclusively for the image, and add the proper HTML to display a camera icon on the page that is a link to the dedicated image page.
Second Site supports special codes you can place in the Description field of TMG's Exhibit record to override the Embed and Link options. Using those codes, you can set the option to either Embed or Link, but override that choice for selected images. See the Exhibit Codes on the Second Site-Only Formatting Codes page.
In general, Web browsers will include images on a page for a limited set of image formats. The most widely accepted formats are JPEG/JPG, GIF and PNG. For that reason, Second Site honors the Embed option for those file types only. For other file types, it treats Embed as Link. When the user clicks on the icon, the browser will do what it is able to do with that filetype.
The icon used for linked images defaults to "picicon.gif" . You can customize the icon by creating an icon file that begins with the file extension followed by "icon.gif". For example, "jpgicon.gif", "pngicon.gif".
Second Site has an Exhibit Gallery User Item you can use to make a list of image exhibits. The list includes a thumbnail version of the image and the image caption. The exhibits can be filtered to create logical sets of images.
Second Site supports exhibit captions. TMG captions are stored one of two places based on version number.
In TMG v6 or greater, TMG exhibits have an explicit Caption field. If that field is empty, Second Site uses the exhibit Name as the caption. If you do not want a caption, you should specify "--" as the first two characters in the Caption field.
Prior to TMG v6, captions are stored in the exhibit's Description field. If the exhibit Description begins with "CAPTION:", Second Site treats the subsequent text as a caption. The caption ends at the next carriage return character or at the end of the Description field, whichever comes first. If the exhibit Description does not start with "CAPTION:", Second Site uses the exhibit Name as the exhibit caption. If you do not want a caption, you should specify "CAPTION:" at the beginning of the Description field and follow that with a carriage return.
For linked exhibits, Second Site uses the exhibit caption as the "Title" text that some browsers display when you position the mouse over the icon.
Second Site detects IPTC headers, also known as IPTC metadata, in certain image files. Second Site will use the IPTC caption if the TMG exhibit record does not contain a caption, and an IPTC caption exists. Second Site also loads other IPTC data and exposes it to scripts via the Exhibit object.
If the IPTC Caption is empty or not present, Second Site will load the Exif Description field, if any, and use that as the caption.
Image Document Transcriptions
Second Site recognizes text documents that are associated with images via a naming convention. For example, if you have an external exhibit
c:\exhibits\john smith letter.png
then you can transcribe the document and store the text in
c:\exhibits\john smith letter.txt
Note You don't have to use the text file for transcriptions, and other uses may be appropriate, but transcriptions are the main purpose of this feature.
You can use the following filetypes for transcriptions: TXT, HTM, or HTML.
For linked exhibits, and for embedded exhibits on source pages, the transcription text will be included below the image. For exhibits embedded on other pages, the text will not appear in the box with the image; the box will contain the image and the caption only. When using the Resize Embedded Images option, the text transcription will appear in the lightbox when the user clicks the image to view the full size version.
Transcription text is wrapped in a DIV element with the CSS class "exh-text". No special text formatting is applied to the class, but you may do so via a User Style.
Second Site will detect HTML image maps stored in the description field of an exhibit. You can use my TMG Utility program to create image maps by drawing rectangles over a read-only version of the image. You can also create the HTML image map manually or using another image map editor.
For exhibits replaced by a file in the Alternate Image Folder, Second Site will use an image map stored in a ".map" file in the same folder as the image. For example, the HTML image map for "c:\ssexhibits\p5138.jpg" should be stored in the file "c:\ssexhibits\p5138.map".
Second Site supports a special form of the HREF property in the AREA tags that are part of an HTML image map. If you enter "p#" followed by the TMG ID of a person in the site, Second Site will transform the HREF into the proper value to open the person page entry for the person with the given ID number. Example:
For image maps defined in the Exhibit description, specify the HTML image map within TMG's [HID:] and [:HID] codes:
[HID:]<map> <area href="p#2" alt="Mary" shape="rect" coords="9,84,66,156"/> <area href="p#3" alt="Joe" shape="rect" coords="90,13,120,111"/> </map>[:HID]
Here's how to create an image map for an exhibit in a TMG v5+ project. Each step is preceded by a code that indicates which program to use to accomplish the task. "TMG" is The Master Genealogist, Version 5+. "TMGU" is TMG Utility. "SS" is Second Site.
- TMG: Open the project.
- TMG: If you haven't done so already, add an external image exhibit.
- TMG: Make a note of the TMG ID#s of all the people in the photograph.
- TMG: Close the project.
- TMGU: Open the project.
- TMGU: Choose the Exhibits > Edit Image Map feature, and click the [Edit Exhibit Image Map] button.
- TMGU: Choose the exhibit from the list.
- TMGU: Use the Image Map Editor to create clickable areas of the image. First drag the mouse to create a rectangle. Then double-click the rectangle to set the properties of the rectangle, including the TMG ID# of the person under the rectangle. For detailed instructions, see the TMG Utility help page.
- TMGU: Use the File > Save Image Map & Close command to save the map.
- TMGU: Close TMG Utility.
- SS: Open Second Site and the SDF file for your site.
- SS: Make the site.
Thanks to Astrid Kranzbuhler who wrote the original version of the steps listed above.
If an AREA entry includes an
href="p#nnn" entry for a person who is not included in the site, Second Site will
- omit the AREA element if Show Name when Principal is not checked,
- omit the HREF parameter (and thus, the link) if Show Name when Principal is checked.
See a person page entry on the Second Site demonstration site to see examples of linked and embedded images.
Image Width and Height
For JPG/JPEG, GIF, and PNG images, Second Site includes the WIDTH and HEIGHT parameters on the IMG tag. HTML pages load faster when those optional parameters are specified. If you change an image after Second Site has created the output pages, don't change the dimensions. If you must change the dimensions, you should regenerate the web site.
I recommend embedding only a primary image when you use the Narrative style. If more than one or two images are mixed with the text for a single person, it may take a little tweaking to make the pages look right.
For best results, use relatively small images as the primary person image. Two hundred pixels wide is a reasonable starting point. That's about two inches wide on the average monitor. Your pages will look better if you use images that are approximately the same dimensions. Similar widths are more important than similar heights.
If you have a large or high resolution image attached to an exhibit but you do not want to use it with Second Site, you can place a smaller version of the image in the Alternate Image Folder and Second Site will use that one instead. See the Exhibits Section.
If you have many images for a person, add an HTML event for that person that contains a link to a page of images. Use a Custom Page User Item. Use the
<%=Page.PersonHREF(id)%> method to create a link back to the person page entry for the subject.
Second Site supports both internal and external text exhibits.
There are six classes of text exhibits:
- The primary text exhibit linked to a person.
- Other text linked to a person.
- Text linked to an event.
- Text linked to a source.
- Text linked to a citation.
- Text linked to a place.
For each of those classes you have the same Ignore, Embed, and Link options described for image exhibits.
Unlike image exhibits, Second Site does not copy (or create) a file in the Output folder solely for the text exhibit. When a text exhibit is embedded, the text is integrated into the person page file or source page file. When a text exhibit is linked, the text is integrated into the exhibit page.
Text and HTML
Second Site attempts to determine whether an exhibit contains HTML:
- If a text exhibit is embedded and it contains HTML, Second Site will include either either all the text, or if a BODY element exists, the portion of the file between the
- If a text exhibit is linked and does not include any HTML, Second Site will use the User Pages Page Set.
- If a text exhibit is linked and it contains HTML, Second Site will create the page using the User Pages Page Set unless the HTML includes an
<html>tag. In that case, Second Site will not assign any Page Set, and the text exhibit must include all the HTML for the page.
See the HTML Exhibits page for more details regarding text exhibits that contain HTML.
As of TMG Version 5.08, TMG allows arbitrary file types to be attached as External Text Exhibits. When Second Site processes an external text exhibit that does not have a filetype of TXT, HTM, or HTML, Second Site assumes the file does not contain plain text and makes a link to the file rather than attempting to embed the text on the page. You can use this capability to add PDF, DOC, XLS, RTF, SID, or any other file types to your site.
The icon used for linked text files defaults to "docicon.gif" (). You can customize the icon by creating an icon file that begins with the file extension followed by "icon.gif". For example, "pdficon.gif", "rtficon.gif". The icon file should be placed in the Input (-i) folder. Second Site will copy if to the Output (-o) folder when the site is made.
Second Site attempts to minimize the number of exhibit files that are copied to the output folder.
- If the same image file is referenced by multiple exhibits, Second Site makes a single copy of the image file. For linked exhibits, however, Second Site will create an HTML page for each exhibit.
Second Site detects duplicate file names and renames the second or subsequent files. This can happen when the source files come from different folders. Note that only the output files are changed; the original files are unchanged.
- For linked exhibits attached to an event where the event has multiple principals and/or witnesses, Second Site will create a single HTML page: the link from each person will lead to a single page.
Second Site supports TMG's Exhibit Folder preference setting. If an exhibit is not found in the path specified by the exhibit record, Second Site will look for the file in the folder specified in TMG's Preferences > Current Project Options > Advanced > Exhibit folder.
Second Site supports embedding for both audio and video exhibits. In practice, embedding video is challenging. All modern browsers support the HTML5 video element, but as of January, 2016, there is no single video format that is supported by all the popular browsers. The HTML5 specification supports specifying multiple source files for a single video element so that a particular browser can choose a video file that is encoded in a format it supports, but that means that a site has to supply multiple versions of a video file in order to ensure that the video is viewable by most visitors.
According to one web resource, sites should include three video formats:
- One file using the WebM (VP8 + Vorbis) format
- One file using the H.264 for video and AAC for audio in an MP4 container
- One file using Theora video and Vorbis audio in an Ogg container
Unfortunately, TMG's exhibit record does not include the ability to specify multiple source files for a video exhibit. Second Site has a workaround for that limitation: you can use the Alternate Image Folder to supply multiple versions of video files.
For example, let's assume you have a TMG video exhibit that specifies the video file
c:\exhibits\family.webm. Let's further assume that you have assigned
c:\exhibits-ss as your Alternate Image Folder, and that folder contains both
family.ogg. Under those conditions, Second Site will copy three files to the Exhibit folder under the Output (-o) folder:
Second Site will construct the appropriate HTML to designate the three files as alternate sources of the same video content. The browser will choose which of the three files, if any, that it can play.
Unfortunately, it's beyond the scope of this help page to describe how to create multiple format files of the same video content. There are many guides on the Internet; choose one that makes the most sense to you.
As described above, Second Site supports embedding for both audio and video exhibits. The most widely supported format for audio files is MP3, and I suggest you use that format for audio. If you use any other format, I suggest that you supply multiple versions of the audio content using the technique described above in the Video Exhibits section: place alternate versions of the file in the Alternate Image Folder.
This page last changed on 19 Feb 2018.