Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Book preview

Help
Saldanha
2012-04-10
2013-05-30
  • Saldanha
    Saldanha
    2012-04-10

    Hi,

    I have made some work for preview bibliographies which have a link in the field '856q' with:

    <?php
    if (isset($biblioFlds["856q"]))
      {
      echo "Pré-visualização <br><br>";
      if ($tipo == "doc" || $tipo == "docx" || $tipo == "xls" || $tipo == "xlsx" || $tipo == "ppt" || $tipo == "pptx" || $tipo == "pdf" || $tipo == "pdf" || $tipo == "pages" || $tipo == "ai" || $tipo == "psd" || $tipo == "tiff" || $tipo == "dxf" || $tipo == "svg" || $tipo == "eps" || $tipo == "ps" || $tipo == "ttf" || $tipo == "xps" || $tipo == "zip" || $tipo == "rar")
        {
        echo "<iframe src='http://docs.google.com/viewer?url=$link&embedded=true' width='600' height='780' style='border: none'></iframe>";
        }
      elseif ($tipo == "html")
        {
        echo "<object data=$link width='1000' height='780'> <embed src=$link width='1000' height='780'> </embed> Error: Embedded data could not be displayed. </object>";
        }
      elseif ($tipo == "Google Book")
        {
        echo "<script type='text/javascript' src='http://books.google.com/books/previewlib.js'></script><script type='text/javascript'>GBS_insertEmbeddedViewer('$link',600,780);</script>";
        }
      elseif ($tipo == "mp3")
        {
        echo "<embed type='application/x-shockwave-flash' flashvars='audioUrl=$link' src='http://www.google.com/reader/ui/3523697345-audio-player.swf' width='400' height='27' quality='best'></embed>";
        }
      elseif ($tipo == "Youtube")
        {
        echo "<iframe width='560' height='315' src='http://www.youtube.com/embed/$link' frameborder='0' allowfullscreen></iframe>";
        }
      else
        {
      echo "Sem visualização possível";
        }
      }
    ?>
    

    I would like to try something with the Google Book preview,  http://code.google.com/intl/pt-BR/apis/books/docs/preview-wizard.html.

    What is the ISBN field name?

    By the way, 0.7.1 is great!! Thanks!

     
  • Fred LaPlante
    Fred LaPlante
    2012-04-11

    I like this.  Great idea.  With your permission I think I will add something similar into the alpha version of OB1.0 that I am working with. Can you give me the title or isbn for a few books that use MARC tag 856 so I can test my work on this. None of the 1300 items in my library have that tag.

    in version 0.7 the ISBN is stored in the mySQL database 'biblio_field' table with tag='20', and subfield_cd='a'. I have no idea what the PHP name that it is given.

    Fred LaPlante

     
  • Saldanha
    Saldanha
    2012-04-17

    Hi Fred,

    Thanks! Sure you can use this. Sorry for the late reply, I didn't see you response (I think that the 'Monitor this' doesn't worked for me).

    I have found some books on the Internet (free), and stored the link on these field. By example: http://www.history.army.mil/html/bookshelves/collect/usaww2.html . So, I don't know if I can help you with an example.

    The book preview by ISBN or some kind of direct link is, in some way, better than just show the book cover. I think this can be a nice feature.

    Count with me for any help!