Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Add Book Cover Photo from Google to Short View Results in Web OPAC

     

    • Product: Aleph
    • Product Version: 20, 21
    • Relevant for Installation Type: Dedicated-Direct, Direct, Local, Total Care

     

    Desired Outcome Goal:
    Adding book cover photo from Google to short view results in Web OPAC

    Procedure:
    1. Make sure the ISBN is part of the information inserted into the short view by adding a line to www_tab_short.lng
    For example, place this line in www_tab_short.lng:
    9 L GB 00 00 2000 D ## 020

    In this case, the placeholder of the ISBN will be $1100 in short-a-head and short-a-body

    2. In short-a-head make sure a line exists for $1100:
    <th class=text3>$1100</th>

    3. In short-a-body, instead of this line for the placeholder:
    <td class=td1 $3000 nowrap valign=top>$1100 </td>
    Place these lines (similar to what we have in full-set-tail):
    <td class=td1 $3000 nowrap valign=top>
    <a id="ISBN:$1100" style="display:none;" target="_blank">
    <img style="display:none;" id="google_book_$1100"/ >
    </a>
    <script>
    // Function to process GBS info and update the dom.
    function ProcessGBSBookInfo(booksInfo) {
    for (isbn in booksInfo) {
    var url_elem = document.getElementById(isbn);
    var pic_elem = document.getElementById("google_book_$1100");
    var bookInfo = booksInfo[isbn];
    if (bookInfo) {
    url_elem.href = bookInfo.info_url;
    url_elem.style.display = '';
    if (bookInfo.thumbnail_url)
    {
    pic_elem.src = bookInfo.thumbnail_url;
    pic_elem.style.display = '';
    }
    }
    }
    }
    </script>
    <script src="http://books.google.com/books?jscmd=viewapi&bibkeys=ISBN:$1100&callback=ProcessGBSBookInfo"></script>
    </td>

     

     


    • Article last edited: 15-May-2016