If you’re using Presto for DB/TextWorks as the web search interface to your database, you can configure it to show Google book covers as well. All you need is our Google book cover script and some experience editing Presto screens.
Here are the steps to take to add Google Book covers to your Presto for DB/TextWorks site.
1. Download the Andornot Google Books script here. As noted in the file, these are offered under an MIT open source license. You are free to use reuse, redistribute, modify etc. this script as long as the license text within it is retained.
3. To use the script, you just need to wrap the ISBN from a record inside a div with the class “isbn”, like this:
To do this, you will need to edit the detail screen for your catalogue content type to add three Custom Value Controls. The Presto Administrator’s Guide has more information and examples of these.
The first custom value control will contain only this bit of HTML: <div class="isbn">
The second custom value control will contain the ISBN data field (you’ll want to select the option to suppress hit highlighting on it).
The third custom value control will contain the closing div: </div>
All three will be associated with the ISBN field, so they will only appear on the detail screen when there’s data in that field.
Our Google Books script will look for the “isbn” div and replace the contents within it with a call to the Google Books API for the cover image, if available.
ISBN’s often have more than just straight numbers in them. Sometimes there’s punctuation or trailing text. Our Google Books script is pretty good at ignoring all of that, so don’t worry about cleaning up your ISBNs first.