Koha

From WikiThing

Jump to: navigation, search

If you're using the Koha version 3.01.00.021 patch install, please follow the Koha patch instructions.

Image:LogoLTFL_small.gif

LibraryThing for Libraries Wiki

Main wiki page | Web page

If you're only installing the Reviews Enhancement and not the Catalog Enhancements, please go here.

[edit] LibraryThing for Libraries enhancements: Installation instructions

[edit] 1. Sign into your account

You should have an email from Abby with your username and password.

[edit] 2. Export file

A MARC21 export can be accomplished by going to

/cgi-bin/koha/tools/export.pl

and selecting marc as the format under Output format.

Important note for Shelf Browse: If you're installing the Shelf Browse Enhancement, you'll need a full MARC export that includes item level call numbers. Before uploading, you'll need to set which type of call number (LC or Dewey) you're using, the call number location in your records, and the subfield for the collection code (if using collections to group items within Shelf Browse). Set this on the Configure tab, under Shelf Browse.

[edit] 3. Upload file

  • Click on the "Upload holdings" link on the Enhancements tab.
  • Choose a file format
  • Choose an action. "Add additional items" adds new items to the list of items you have already uploaded. "Replace all items" deletes previous files and replaces them.
  • Enter your email to get a note telling you that the indexing is done (indexing is processed every evening)
  • Click "Next". The Choose a file to upload page will open
  • Click on the "Get File" button to upload your file from your computer
  • Click the "Browse" button to find the file
  • Click "Begin File Upload" to ... begin the file upload

[edit] 4. Add code to your OPAC

  • You will be copying and pasting a section of javascript, and also div tags into the code of your bibliographic template page.
    • Open your bibliographic template page by going to your opac-tmpl/modules directory, and opening the file opac-detail.tmpl.
  • You will need your LTFL Account Number, which you can find on your account page, on the right-hand column. It will look like this: XXX-XXXXXXXXX
  • Copy the javascript code, and paste it right above the last line of the template.
  <script src="http://ltfl.librarything.com/forlibraries/widget.js?id=XXX-XXXXXXXXX" type="text/javascript"></script><noscript>This page contains enriched content visible when JavaScript is enabled or by clicking <a href="http://ltfl.librarything.com/forlibraries/noscript.php?id=XXX-XXXXXXXXX &accessibility=1">here</a>.</noscript>
    • In the code you've just pasted, look for the placeholders for your account number. There are two of them, and they will look like this: XXX-XXXXXXXXX. Replace the two placeholders with your account number.
  • Paste the div tags at about line 186, or wherever you want the enhancements to display.
    • Tags and Tag Browser
  <div id="ltfl_tagbrowse" class="ltfl"></div>
    • Recommendations (similar books)
  <div id="ltfl_similars" class="ltfl"></div>
    • Other editions and translations
  <div id="ltfl_related" class="ltfl"></div>
  • To make the LTFL enhancements appear like Koha's display, you can add
<span class="results_summary"><div id="ltfl_related" class="ltfl"></div></span>
  • To get ltfl working using the XSLTDetailsDisplay system preference, modify the opac-details.tmpl file by copying the COiNS/OpenURl template block into the XSLTDetailsDisplay block (around line 61), so that it looks like this:
<!-- TMPL_IF NAME="XSLTDetailsDisplay" -->
        <!-- TMPL_VAR NAME="XSLTBloc" -->
    <!-- COinS / OpenURL -->
    <!-- TMPL_IF NAME="ocoins_format" -->
    <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A<!-- TMPL_VAR NAME="ocoins_format" -->&rft.a\
u=<!-- TMPL_VAR NAME="author" -->&rft.btitle=<!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->&rft.date=<!-- TMPL_VAR NAME=\
"publicationyear" -->&rft.pages=<!-- TMPL_VAR NAME="pages" -->&rft.isbn=<!-- TMPL_VAR NAME=amazonisbn -->&rft.aucorp=&rft.place=<!\
-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publishercode" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!\
-- TMPL_VAR NAME="series" -->&rft.genre="></span><!-- /TMPL_IF -->
  • You will probably want to modify the text Koha's templates including regarding Koha's own tag system. Replace:
<span class="label">Tags:</span>

with:

<span class="label">Tags from this library:</span>
  • Save the page.

[edit] Reviews Enhancement

  • If you are also installing the Reviews Enhancement, keep the bibliographic template page open.
  • Copy the div tag in the HTML where you'd like the enhancement to appear.
    • Reviews
  <div class="ltfl_reviews"></div> 
  • (Optional) To modify Koha's internal comments system when integrating LTFL Reviews, replace:
<p> Sorry, there are no reviews available for this title. 

with something like:

<p> Sorry, there are no reviews from this library available for this title. 
  • Save the file.

[edit] (Optional)Reviews in the search results/summary page

If you'd like the Reviews Enhancement to appear on the search results summary display:

  • In your opac-tmpl/modules, open opac-results.tmpl.
  • It is imperative that the javascript code only appear once in the HTML output (not multiple times for each item on the summary screen.)
  • Copy and paste this code at about line 295 :
  <script src="http://ltfl.librarything.com/forlibraries/widget.js?id=XXX-XXXXXXXXX" type="text/javascript"></script>
  • Copy the Reviews div tag in the HTML where you'd like the enhancement to appear.
  <div class="ltfl_reviews"></div> 
  • To get ltfl working using the XSLTSearchDisplay system preference, modify the opac-results.tmpl to include the COiNS template block in the XSLTResultsDisplay block (around line 239), so that it looks like this:
<!-- TMPL_IF NAME="XSLTResultsDisplay" -->
                <!-- TMPL_VAR NAME="XSLTResultsRecord" -->
<!-- COinS / OpenURL --><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=<!-- TMPL_VA\
R NAME="author_nospan" -->&rft.btitle=<!-- TMPL_VAR NAME="title_nospan" ESCAPE="url" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->\
&rft.tpages=<!-- TMPL_VAR NAME="size" -->&rft.isbn=<!-- TMPL_VAR NAME="isbn"  ESCAPE="url" -->&rft.aucorp=&rft.place=<!-- TMPL_VAR\
 NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publisher" ESCAPE="url" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!--\
 TMPL_VAR NAME="series" -->&rft.genre="></span>
  • Save the file.
  • If you want to add other Reviews moderators, under the Reviews section, click the "Create/manage moderator accounts" link.
    • You can create the secondary user an account. (What this is doing is creating a LibraryThing.com account.)
    • If the person already has a LibraryThing account (for the main site), they can associate their username to moderate reviews. (It will not affect their LibraryThing.com account.)
  • You can add more people to be alerted when there are reviews to moderate, by adding them in the "Email when moderation needed" text box, with commas between:
  jeremy@librarything.com, casey@librarything.com
  

[edit] Shelf Browse Enhancement

  • If you are also installing the Shelf Browse Enhancement, keep the bibliographic template page open.
  • Copy the following div tag in the HTML where you'd like the enhancement to appear.
<div id="ltfl_shelfbrowse_both" class="ltfl"></div>
  • You could also add the divs individually if you like—"ltfl_shelfbrowse_mini" is the small shelf which appears on the big page and "ltfl_shelfbrowse_large" provides the link to the full-screen shelf. So you would add one or both of the following:
<div id="ltfl_shelfbrowse_large" class="ltfl"></div>
<div id="ltfl_shelfbrowse_mini" class="ltfl"></div>
  • Important: add either the "both" div or the individual ones, but not all of them!
  • Save the file.

Limit items shown by collections and/or collection groups

  • Collections and Collection Groups can be used to limit the items viewed in the Shelf Browse to items in the same collection. If, for example, you are viewing a book in a children's collection, you would only see other children's books around that book. If you do not use Collections and Collection Groups, Shelf Browse will sort your items by call number only, irrespective of collections.
  • Under Shelf Browse > Advanced options on the Configure tab, select whether to use collections and/or collection groups.
  • Click "Manage collections". Here you will see all the collection codes that we've indexed from your data. You can assign human readable names to the collections, and group collections together.

[edit] Series and Awards Enhancements

  • If you are also installing the Shelf Browse Enhancement, keep the bibliographic template page open.
  • Copy the following div tags in the HTML where you'd like the enhancement to appear.
<div id="ltfl_series" class="ltfl"></div>
<div id="ltfl_awards" class="ltfl"></div>

[edit] Lexile Measures

  • This is a FREE enhancement for anyone using any of the other LTFL in-catalog enhancements. To add it to your OPAC, just include the div tag on your bibliographic template page, wherever you'd like it to appear:
<div id="ltfl_lexile" class="ltfl"></div>

If you want to make the Lexile search available on its own, just include a link like this:

<a href="#" onclick="LibraryThingConnector.widgets.wiki.showLexile('');">LexileFramework search</a>
  • We can also help you add the appropriate code to non-catalog pages.

[edit] 5. Add the ISBN-based URL

You will fill in the ISBN-based URL within your LTFL account, on the Enhancements tab, in the section Global Configuration. Absolute url:

http://<your catalog server>/cgi-bin/koha/opac-search.pl?idx=nb&q=MAGICNUMBER

Relative url:

/cgi-bin/koha/opac-search.pl?idx=nb&q=MAGICNUMBER

If you are installing the Shelf Browse Enhancement, you will also need to fill in the Title based URL and Keyword based URL on the Configure tab, under Global Configuration. Those URLs should be:

https://<Your catalog URL>/cgi-bin/koha/opac-search.pl?idx=ti&q=TITLE
https://<Your catalog URL>/cgi-bin/koha/opac-search.pl?&q=KEYWORDS
  • If you're not sure how to find your library's link, read here.


[edit] 6. Configure the enhancements

Control how the enhancements look by clicking on the Enhancements tab and then under "Configure" at the top of your account page.

  • Make changes to the Global Editing section
  • You can add, change, and edit the Cascading Style Sheets (meaning: change the way the LTFL text looks to match your existing catalog page)
  • If you have one of the OPACs listed on the configure page, and would like to prepopulate the CSS fields, click on the appropriate link.
    • You can continue to edit the CSS after clicking the link - it's a great starting point.
    • If you click the link again, any editing you did will revert to the generic settings for your OPAC, erasing anything you'd edited - so beware.


[edit] 7. Testing LTFL

[edit] Testing mode

For each of our enhancements, we have 'testing' mode. On the Enhancements tab, under Account > Settings, you can switch each enhancement on, off, or to testing mode.

  • You can test the enhancements without needing a development or testing server with this. In 'testing mode', the enhancements only show up if you manually add &testing=1 to the end of the bib result page URL. Example:
  URL from catalog:
  http://durfingtonpl.com/ipac20/ipac.jsp?index=ISBNEX&term=0765318741
  Now modified to show LTFL:
  http://durfingtonpl.com/ipac20/ipac.jsp?index=ISBNEX&term=0765318741&testing=1


Everything will look and work the way it would if it were live, including the tag browser, and links to similar titles.

  • If you will be using a development server, you'll turn the enhancements from 'off' or 'testing' to 'on'.

[edit] Test on a development server

  • On the development server, modify your templates to include the HTML for the reviews link (and our javascript, if it's not already there).
    • If you already have the catalog enhancements, make sure 'auto-insert review link' setting on the Configure page is set to off. If this setting is on and the reviews feature is on and you already have the catalog enhancements, it will try to automatically show the reviews feature on your production server.
    • Make sure the reviews feature is turned to on (not testing).

[edit] Live Testing

  • We offer 30 days of live testing.

[edit] 8. Go live!

  • Go to Accounts > Settings and switch the enhancements to "on" - LTFL content should now appear in your OPAC.

[edit] 9. (Optional) Add widgets

Recent library reviews widget
Instructions on how to set up the widget to show recent reviews from your patrons, to put on your library's front page (or wherever you like.)


Help/FAQs | About | Privacy/Terms | Blog | Contact | APIs | WikiThing | Common Knowledge | Legacy Libraries | 70,044,468 books!