[Koha] images

Owen Leonard oleonard at athenscounty.lib.oh.us
Thu Jan 22 06:34:36 NZDT 2004


> I'm new to the Koha community and am looking for 
> details about using Koha to catalog images, or 
> associating an image with each catalogued record. 

I can't advise you on cataloging images, but I can tell you how we came up with 
a way to associate images with item types in search results and with individual 
titles as well.

The key is to use Koha's templating system to do the work for you.  We wanted 
to have an image associated with each item type in the catalog (book, video, 
dvd, etc.).  A bug in the current version prevented us from using the mechanism 
at work in HLT's OPAC (http://opac.library.org.nz/cgi-bin/koha/opac-
detail.pl?bib=12180), but by naming each image according to the corresponding 
item type, we were able to put this in the template:

<img src="<TMPL_VAR NAME='themelang'>/images/<TMPL_VAR NAME="itemtype">.gif" 
alt="" />
 
The templating system replaces '<TMPL_VAR NAME="itemtype">' with "Book on Tape" 
or "Videorecording", and that points the image tag to the right file.  See it 
in action here:

http://66.213.78.60/cgi-bin/koha/opac-
searchresults.pl?type=opac&keyword=moon+is+a+harsh+mistress

The same function will allow us to retrieve book cover images for individual 
titles.  We'll save with images with filenames corresonding to the ISBN of the 
title.  Then when the item detail screen is pulled up, the ISBN can be used in 
the image tag to pull the right image file (I know I first saw this method on a 
German Koha installation--maybe someone remembers the address of that?).

The current barrier to using this method for us is the fact that if there is no 
image for a particular ISBN, you get a broken image.  If we can get that ironed 
out, we can start going with it.

I hope that helps with at least part of your question.

  -- Owen

----
Nelsonville Public Library
http://www.athenscounty.lib.oh.us



More information about the Koha mailing list