Thank you for the compliments on my site. You sure seemed to have looked around a lot.
Take a look at Norm's "simple/detailed" output mod. I think it's pretty much the same as mine. I got the idea when he asked for help on it here.
Quote:
Now, I have a another request. Maybe this one will be more of a challenge, a curve
ball. You know, you are batting 1000. I would like to display another graphic, this time,
the scanned book cover, a 87x140 thumbnail with a link to the full 292x475 cover
graphic. So, each time there is an available scanned book cover, the thumbnail will appear next to the title with an href to the larger, full image. Is this possible?
Sure! Most anything's possible!
I'm going to make some assumptions in my explanation. First, that you name the thumbnail .gif by the name of the key for that record plus "sm" -- so if your key for the record was "1234," the thumbnail .gif would be "1234sm.gif." The large one would be "1234lg.gif." Also, that you have a field in your db called "Thumbnail" which is either a "Yes" or empty -- probably a checkbox field. If you have a thumbnail available, you would enter "Yes" in that field. (Actually, you could have it equal anything you want.)
Also for shorthand purposes, I'm going to assume that you have defined a variable called $graphic_directory, which is the full URL to the directory where all your graphics are. Define it at the top of the html.pl file under
# Put any globals you like in here for your html pages. It would be something like:
$graphic_directory = 'http://www.yourserver.com/graphics'; Now, in html_record, where you want your thumbnail to appear, add:
if ( $rec{'Thumbnail'} ) {
print qq|<a href="$graphic_directory/$rec{$db_key}lg.gif"><img src="$graphic_directory/$rec{$db_key}sm.gif width=87 height=140 border=0 alt="$rec{'Title'}></a>|;
} You don't have to add the "alt" tag, but it's kinda nice to have.
There's other ways to do it, by entering the name of the thumbnail and the large .gif files in your db, but this is the easiest way, IMO.
I sure want to see your site when it's all finished!
------------------
JPD