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 you rsite or manage your TMG exhibits. The Exhibits Section describes the specific controls in that section.
Image Exhibits
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.
Image Options
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.
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".
Exhibit Galleries
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.
Image Captions
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 "Alt" text that some browsers display when you position the mouse over the icon.
IPTC Headers
Second Site detects "IPTC headers" 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 the IPTC Writer/Editor field and exposes it to scripts via the Exhibit object. In the future, Second Site may expose more IPTC meta data to scripts.
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
The transcription will be included after the image wherever the image appears. You can use the following filetypes for transcriptions: TXT, HTM, or HTML. You don't have to use the file for transcriptions, and other uses may be appropriate, but that is the main purpose of this feature.
Image Maps
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:
p#75
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+. "U" 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.
- U: Open the project.
- U: Choose the Exhibits > Edit Image Map feature, and click the [Edit Exhibit Image Map] button.
- U: Choose the exhibit from the list.
- U: 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.
- U: Use the File > Save Image Map & Close command to save the map.
- U: 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 tag if Show Excluded Principals is not checked,
or
- omit the HREF parameter (and thus, the link) if Show Excluded Principals is checked.
Image Examples
I have included an example of an embedded primary image and an example of a linked primary image to illustrate the difference between those two options.
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.
Image Recommendations
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.
Text Exhibits
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.
Text Options
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 "<BODY>" and "</BODY>" tags.
- 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> element. 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.
External Files
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.
File Handling
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.
