John Miedema
unread,Feb 2, 2011, 4:15:33 PM2/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openbook4wordpress
Peter Murray noticed that he could not find ISBNs that had been
created with dashes in them. Until now, it was assumed by OpenBook
that Open Library cleaned out dashes. This does not appear to be the
case.
I plan a fix, but if you need to solve this problem now, Peter's
workaround is as follows:
1. Look for this code in the OpenBook file openbook_openlibrary.php
<code>
//clean ISBN
$isbn = str_replace("-", "", $isbn); //dash - 13-digit ISBNs often
have one, but not used by Open Library
$isbn = str_replace(" ", "", $isbn); //spaces
$isbn = str_replace("'", "", $isbn); //single quote - prevent problems
with string concatenation
</code>
2. add the // comment marks before the line that cleans up dashes
<code>
//clean ISBN
//$isbn = str_replace("-", "", $isbn); //dash - 13-digit ISBNs often
have one, but not used by Open Library
$isbn = str_replace(" ", "", $isbn); //spaces
$isbn = str_replace("'", "", $isbn); //single quote - prevent problems
with string concatenation
</code>