Re: [greenstone-users] cover images

From Katherine Don
DateMon, 15 Nov 2004 14:08:35 +1300
Subject Re: [greenstone-users] cover images
In-Reply-To (1100289631-4195165fea692-webmail-gtcinternet-com)
Hi

If you have the source code, you can modify the img tag generated to
display cover images. It is non-trivial to see if there is a cover image
for the collection, so I've just modified the img tag so that the broken
image icon will not be displayed.

in gsdl/src/recpt/browsetools.cpp:

void output_cover_image (cgiargsclass &args, recptproto * /*collectproto*/,
displayclass &disp, outconvertclass &outconvert,
ostream &textout, ostream &/*logout*/) {

if (args["d"].empty()) return;

textout << outconvert << disp << "<img
src="/gsdl/collect/gsarch/index/assoc//cover.jpg"><br> ";
}

change the img tag bit to
<img alt="" onError="src='/gsdl/images/blank.gif'"
src="/gsdl/collect/gsarch/index/assoc//cover.jpg">

Then recompile.

This will put a blank image in place of the missing image. This seems to
work for IE and Mozilla and intermitently for Netscape 4.

Regards,
Katherine Don

richrobinson@gtcinternet.com wrote:
> Hi,
> Is there a way to make the cover image "true" statement apply only if there is
> an image found? With cover image turned on, if a document does not have one,
> it generates a missing image icon.
>
> Rich R.
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>