Image Viewer Mod
Image Viewer | |
---|---|
Summary | Provides an easy way to view large images on your TNG website |
Validation | {{{mod_validation}}} |
Mod Updated | {{{mod_last_update}}} |
Download link | media-1_image_viewer_v1.8.1.zip (for TNG V7 only) |
Download stats | {{{download_stats}}} |
Author(s) | Bret Rumsey based on the original implementation by Nicholas B. Flint |
Homepage | Image Viewer Mod (this page) |
Mod Support | TNG Community Forums |
Contact Developer | {{{mod_contact}}} |
Latest Mod | 1.8.1 |
Min TNG V | 7.0.3 |
Max TNG V | 7.1.3 |
Files modified | showmedia.php showmedialib.php |
Related Mods | |
Notes | This mod is obsolete since it is now incorporated into TNG V8 |
Introduction
The TNG Image Viewer provides an easy way to view large images on your TNG website. This is particulary useful for images such as census records, which are unreadable if shrunk to fit on the screen. You can see an example on Bret's site.
Thanks to Nicholas B. Flint who posted the original implementation on which this Image Viewer is based, and to http://persistent.info, from which Bret took the magnifier concept and adapted it for his own use in the Image Viewer.
The following TNG Community Forum entry discusses the Image Viewer
Mod is obsolete since it is now incorporated into TNG V8.
Developer
Bret Rumsey is the developer of the TNG Image Viewer.
Download information
This TNG modification can be downloaded from Bret's site at http://www.rumseyfamily.com/tngmod_img.php
Automated Install
- An installed current version of the Mod Manager.
- Download Image Viewer Note since Bret's download site is currently not available, you can download the Image Viewer V1.8.1 provided by Jerome Liebowitz
- Unzip the downloaded img_viewer.zip file in the admin/mod_folder directory which is where the config file expects to find the different files
- Download the media-1_image_viewer_v1.8.1.zip
- After downloading the config file, unzip it into the admin/mod_folder
- Note that if you only want to use the Image Viewer for certain mediatypeIDs, you need to edit the config file before installing, see Edit Image Viewer Options
- or you can edit the extensions/imageviewer.php file after installation
- and then follow the normal automated installation for Mod Manager mods.
Note that the media-1_image_viewer_v1.8.1.cfg file is part of a series of media display mods where the n in media-n designates the install order of the mods. If you use Bret Rumsey's Image Viewer it must be installed first.
Edit Image Viewer Options
Using Notepad++, TextWrangler or another ASCII text editor, you need to edit the media-1_image_viewer_v1.8.1.cfg file for how you want to use the Image Viewer:
for all media
- if you want to use the Image Viewer for all your media, line 45 in the cfg file (line 11 in extensions/imageviewer.php if you edit after install), should be as follows
echo "<span id=\"msg\" class=\"normal\">Please wait while the image is loaded...</span><iframe name=\"iframe1\" id=\"iframe1\" src=\"img_viewer.php?mediaID=$imgrow[mediaID]&medialinkID=$imgrow[medialinkID]\" width=\"100%\" height=\"1\" onLoad=\"calcHeight(600)\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\"></iframe>";
- line 48 should begin with a block comment /* (line 14 in in extensions/imageviewer.php if you edit after install), as shown below
/* if (($mediatypeID == "documents") || ($mediatypeID == "scan") || ($mediatypeID == "census") || ($mediatypeID == "newspaper"))
- line 52 should end the block comment */ (line 18 in in extensions/imageviewer.php if you edit after install), as shown below
*/
for selected media collections
- if you want to use the Image Viewer for only certain media collections, line 45 in the cfg file (line 11 in extensions/imageviewer.php if you edit after install), should be commented out using a double-slash <nowiki>//</nowiki> as follows
//echo "<span id=\"msg\" class=\"normal\">Please wait while the image is loaded...</span><iframe name=\"iframe1\" id=\"iframe1\" src=\"img_viewer.php?mediaID=$imgrow[mediaID]&medialinkID=$imgrow[medialinkID]\" width=\"100%\" height=\"1\" onLoad=\"calcHeight(600)\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\"></iframe>";
- the beginning block comment /* should be removed from line 48 (line 14 in in extensions/imageviewer.php if you edit after install), as shown below
if (($mediatypeID == "documents") || ($mediatypeID == "scan") || ($mediatypeID == "census") || ($mediatypeID == "newspaper"))
- ending the block comment */ should be removed from line 52 should (line 18 in in extensions/imageviewer.php if you edit after install), so it becomes a blank line.
to dynamically calculate the height
If you want to dynamically set the height of the image change, you will want to change
onLoad=\"calcHeight(600)\"
to
onLoad=\"calcHeight(1)\"
in the section that you chose to implement the Image Viewer
Note that if you chose the option to calculate the height based on the image height, the Image Viewer in the latest version of the code, does not appear to increase the height of the image area when you magnify the image to 200% of its size for example, so you end up viewing a larger image in a smaller area.
Manual Install
Manual install instructions can be found on Bret's site at http://www.rumseyfamily.com/tngmod_img.php in the Modifications Required section
Sites using this mod
- Please add TNG site that you have found that utilize this modification
Site List
- Rumsey Family Pages Bret is the developer of the Image Viewer Add-on mod
- Our Acadian, French Canadian, and Maine Ancestors I use this TNG add-on for my Census, Original Records, and Newspaper Clips media types. (Ken Roy)
- Appalachian Highland Genealogy I use it for all images to allow users to resize all photos.
Related Mods
The following Media mods may be related. The number indicates the install order if you install more than one of these mods: