[Koha] Thumnail images in catalog search
results? (Was:details automatic
Steven F.Baljkas
baljkas at mts.net
Fri Jan 18 12:16:13 NZDT 2008
Thursday, January 17, 2008 17:05 CDT
Greetings Brooke, et al.!
Just a quick response to your posting ...
> From: "BWS Johnson" <mhelman at illinoisalumni.org>
> Date: 2008/01/16 Wed PM 02:10:58 CST
> To: <koha at lists.katipo.co.nz>
> Subject: Re: Re: [Koha] Thumnail images in catalog search results?
(Was:details automatic
> Salvete!
> Is this in the current version? There are so many new bells and whistles
> it's staggering :)
I know. It's mindboggling to look back over the last several years and see the quantum leaps that the programmers and developpers have achieved. :-)
> > Anyone interested can let me know either on the listserv or off
> > and I'll get to it pronto.
Well, as promised, I found it. More on that in a second.
Since no one else expressed interest but Fred, I only had to forward it to him off listserv. I will post the information I retrieved below in a moment, just in case anyone else is curious or might find it useful to follow up on as Joshua suggested (volunteers?).
> If it's not, I can only imagine there are a lot of folks that are
> interested. There's a way to make images for Patrons show up, and I know
> I'm not a coding guru, but I would think that you might wish to look at
> the way that code is handled in hopes of saving you a bit of time.
As I remarked to Fred, Brooke, that is an EXCELLENT bit of advice. You are the Muse of Koha! :-)
> > up one's own number. That way, items without ISBNs could be made to
> > display something (now or in the future, as one chooses) e.g. CDs,
> > websites. Items with ISBNs could have their numbers copied over into the
> > linking field using a utility like MARCEdit, etc. to make such global
> > changes easier.
> *nod* That sounds great. I abuse the poor 856u field, but this sounds
> more flexible than a URL thang, which is awesome.
No, it's not an abuse. After all, there is a built-in indicator code for other related resource uses so someone at LC must have imagined this possibility somewhere along the way.
> > Very excited about the new release, Joshua. Congratulations to you and
> > all the programmers and developpers who've made this great step forward
> > possible!
> Yes, thanks guys :)
> I have to wonder about folks in the Library community starting a hoot
> and hollerin' over public domain cover images. It seems as though in an
> ideal world LOC would have a bank of images as part of the CIP process
> so that everyone would be able to link or copy to it... (I know this is
> beyond the scope of the Koha project, but heck, it's important enough to
> mention, methinks...)
I adore you! I suggested the very same thing back in library tech training in 1998. People are so visual in their search habits, it really only makes sense. <sigh> Well, maybe one day some big organisation will take it on. Or perhaps the sum total of all the littler players will accomplish the same goal.
It's a nice idea/dream in any case.
And now, back from the reverie to reality: an apology owed Owen.
As I discovered, inevitably, my memory had played some tricks on me again: it was Owen Leonard who had provided the answer, and Stephen Hedges who had forwarded the matter to him. Sorry, Owen. My silly brain tends to label things by the person I first asked for help.
In any case, I did not intend to remove credit where it is due.
The entire contents of the 2 messages (including some irrelevant bits) follows beneath my signature line. Like Brooke, I am no coding guru, but it does seem to me that the last part of his answer below will still apply. In any case, I do hope this helps a bit for anyone interested.
Cheers,
Steven F. Baljkas
library tech at large
Koha neophyte
Winnipeg, MB, Canada
============================================================================
MESSAGES FROM OWEN LEONARD REGARDING AMAZON AND COVER IMAGE LINKING ISSUES
============================================================================
From: Owen Leonard
Date: September 20, 2005 1:46 PM
To: Steven F. Baljkas
CC: Steven F. Baljkas; oleonard at athenscounty.lib.oh.us <oleonard at athenscounty.lib.oh.us>;
jferraro at athenscounty.lib.oh.us <jferraro at athenscounty.lib.oh.us>
Subject: Re: Hopefully simple question re: NPL template book cover images
> > My two 'experts' thought that linking to internal images would be do-able,
> > but suggested I ask a real Koha expert: that means, you! :-D
At one point I'd hatched complex schemes for downloading and storing Amazon
images on our own server so that we'd be hitting them only once. We
switched to direct linking before it could really be developed.
> > Would I need to add a field to the MYSQL table to hold the 001 numbers, or
> > would there be a way of changing the HTML display template simply to look
> > for the number from the 001 as it is in MARC?
One option might be to find a field in the Koha tables that you're not
using for data and re-purpose it for your 001 number. Then you could map
the MARC field to that column in the table. Otherwise you'd have to
re-write the scripts to specifically query that MARC field. Right now the
search results page and the biblio detail page either use the "old" Koha
tables (biblio,biblioitems,items) or query specific areas of the MARC
record (for example, detail.pl uses the getMARCnotes subroutine which grabs
any field between 500 and 599). You'd have to write your own
'getMARCimage' routine or something like it.
> > still not all clear on
> > what it is exactly that Koha does with the MARC records, but I thought it
> > was just reading the info from the MARC into whatever tables it really
> > uses behind the scenes.)
Like I said, for the search results page and the detail page, Koha mostly
relies on the non-MARC tables, using data that has been mapped from the
MARC record to the biblio tables. A couple of subroutines exist to extract
MARC-specific data for the detail page (getMARCnotes and getMARCsubjects),
but otherwise if you're looking at MARC data (like on the MARCdetail page),
you're getting the whole record. That makes it hard to pick and choose
what piece of the record you want to display.
> > one enhancement that DSA and I had discussed: a pop-up window to afford a
> > view of a larger cover image.
Here's one way to do it (using Amazon's images):
<!-- TMPL_IF NAME="isbn" -->
<a href="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn"
-->.01.LZZZZZZZ.jpg"
onclick="window.open('http://images.amazon.com/images/P/<!-- TMPL_VAR
NAME="isbn"
-->.01.LZZZZZZZ.jpg','cover','width=325,height=495,toolbar=false,scrollbars=yes');
return false;">
<img src="http://images.amazon.com/images/P/<!-- TMPL_VAR
NAME="isbn" -->.01.MZZZZZZZ.jpg" alt="Book Cover Image" />
</a><!-- /TMPL_IF -->
-- Owen
============================================================================
From: Owen Leonard
Date: September 21, 2005 9:20 AM
To: Steven F. Baljkas
Subject: Re: Re: Hopefully simple question re: NPL template book cover images
> > switched to direct linking before it could really be developed.
>
> How will it work in the long term, though? As books are no longer published, Amazon.com changes
its numbers from ISBNs to ASINs and deletes the images.
Sure, that's a possibility. That's another reason you might want to store
your images locally.
Won't that mean that patrons will be returning to the OPAC over time but finding the book cover
info available constantly in flux?
>
> > > > Would I need to add a field to the MYSQL table to hold the 001 numbers, or
> > > > would there be a way of changing the HTML display template simply to look
> > > > for the number from the 001 as it is in MARC?
> >
> > One option might be to find a field in the Koha tables that you're not
> > using for data and re-purpose it for your 001 number. Then you could map
> > the MARC field to that column in the table. [snip]
> I can recode MARC records easily enough. Are there particular fields that you would recommend
in the Koha tables, ones normally unused (if that makes sense)? I'm not at all sure I know which
fields in the Koha tables are using what data.
It depends on how you did your MARC setup. For instance, we put our whole
call number in biblioitems.classification rather than using
biblioitems.dewey, biblioitems.subclass, etc. You might have a column that
you're not using for any relevant data.
> Also: wasn't there are diagram of this at some point in the past (vague memory) of the Koha
tables structure? Is something like that still available?
There's the 'database' section (5.3.8) of this document:
http://www.kohadocs.org/Koha_architecture.html
> Does this mean, incidentally, that the problem with the subject headings has been solved? Kim
was asking about that earlier this week, n'est-ce pas?
There have been a couple of changes to the way subjects are handled
recently, so it's possible it is now at a place where it can be considered
solved. I'd have to look at it more closely to be sure.
> Thank you again for the syntax for that. I am sure it will be of help, although I would remain
committed to avoiding use of Amazon.com for cover images.
I absolutely understand your reluctance to use Amazon images. I would have
preferred that we not link to them directly either, but that was just my
personal feeling. The code snippet I sent would only have to be changed
with regard to the image location--point it to the image on your server
rather than Amazon's. The easiest way to accomplish that is to name the
cover images according to the ISBN, or whatever id number you're using to
identify the images.
-- Owen
============================================================================
============================================================================
============================================================================
-------------- next part --------------
_______________________________________________
Koha mailing list
Koha at lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha
More information about the Koha
mailing list