13 digit ISBN's and book covers

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

13 digit ISBN's and book covers

Steve Richardson
ISBN's are being truncated at 10 characters in list-list.tpl

This is preventing our book cover images from displaying for 13
character ISBN's

I made the following change to the book cover section of list-list.tpl

{$record.isbn|regex_replace:"/ .*/":""|truncate:13:""}

I'm not sure what side effects this may have. Our cover images now
display.

I don't know if anyone else is having similar isbn issues

Stephen Richardson
 









-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: 13 digit ISBN's and book covers

Naomi Dushay
It is the practice in our library to sometimes follow the ISBN itself with text:

9780521856683 (hardback)
052185668X (hardback)
9780521672696 (pbk.)
0521672694 (pbk.)

This is not unusual -- see MARC21 guidelines: http://www.loc.gov/marc/bibliographic/bd020.html

A more robust solution would be to look for the patterns:

12 digits immediately followed by check digit (digit or X)
OR
9 digits immediately followed by a check digit.

Perhaps someone who is more familiar with PHP can provide the appropriate regular expression.

- Naomi



On Jun 16, 2008, at 8:59 PM, Steve Richardson wrote:

ISBN's are being truncated at 10 characters in list-list.tpl

This is preventing our book cover images from displaying for 13
character ISBN's

I made the following change to the book cover section of list-list.tpl

{$record.isbn|regex_replace:"/ .*/":""|truncate:13:""}

I'm not sure what side effects this may have. Our cover images now
display.

I don't know if anyone else is having similar isbn issues

Stephen Richardson










-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech

Naomi Dushay




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: 13 digit ISBN's and book covers

Steven McPhillips

On 18/06/2008, at 12:58 AM, Naomi Dushay wrote:


Perhaps someone who is more familiar with PHP can provide the appropriate regular expression.

ours is by no means perfect, but "good enough":

preg_replace ( '/^.*?([0-9]+).*?$/', '$1', $isbn);

This just gets the first chunk of digits. Note that this will break isbns if spaces or dashes are used.

----
Steven McPhillips <[hidden email]>
IT Business Systems
National Library of Australia
Try our new catalogue - http://catalogue.nla.gov.au




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech