LibraryThing and Sirsi/Dynix @ACPL Part III

Well all is good. The perl code I wrote worked and the collection indexed over the weekend. I then went to the Librarything website and there is some very good information about how to add the javascript. I am just going to add it here for completeness

[Documentation from LibraryThing Site]

iBistro Widget Placement

From a helpful Sirsi customer: “The file that needs modifying is called viewtop.h which is found in the /Unicorn/Webcat/Pages_deliv/Elib_revC/ directory on the Sirsi server.

This file needs to be copied from this location to the /Unicorn/Webcat/Pages_custom/Elib_revC/ directory before it is modified. The file in the custom directory is used in preference to the one in the deliv directory so the original file should be left in this directory.

Once in this location viewtop.h requires the LTFLs code ‘<script src=”….’ to be added to the end of the file and the LTFL widget code to be added, dependant on where you want the widgets to be displayed on the item holdings page in the catalogue. I have included ours immediately below the ‘<SIRSI_Include File=”dspholdings.h”>’ line in this file which displays a list of an item’s holdings in our library service.

Note: The code above in the <script scr ‘ is below

function LT_get_widget_logic()
	var t = new Date();
	var wl = document.createElement("script");
	wl.type = "text/javascript";
	wl.src="\'&t=" + t.getTime();


LTFL widgets should now display on the item holdings page in the iBistro catalogue. It may be necessary to first reload the webpage or clear the web browsers cache in order to display the LTFL widgets.”

[edit] ISBN URL

http://<your catalog server>/uhtbin/cgisirsi/x/0/0/5/?searchdata1=MAGICNUMBER

[Documentation from LibraryThing site]

So what has been done? I made a copy of the viewtop.h file and copied it into the /Unicorn/Webcat/Pages_custom/Elib_revC/ directory. I then copied the javascript code to the bottom of the page of viewtop.h.

So it looks like this

[Snippet from viewtop.h]]

<SIRSI_Conditional IF Environ=”DISPONORDER^1″>
<SIRSI_Conditional IF DC_Exists=”Lz”>
<SIRSI_Include File=”dsporders.h”>
<script src=”
” type=”text/javascript”></script><noscript>This page contains enriched content visible when JavaScript is enable
d or by clicking <a href=”
“>here</a>.</noscript>[snippet from viewtop.h]

[snippet of widget placement from viewtop.h]

<SIRSI_Conditional IF NOT DC_Comp=”nI^N”> <!– show holdings –>
<SIRSI_Conditional IF Environ=”SUMMARY_HOLDINGS^0″>
<SIRSI_Include File=”dspcopyholdings.h”>
<SIRSI_Conditional ELSE>
<SIRSI_Include File=”dspholdings.h”>
<div id=”ltfl_related” class=”ltfl”></div>
<div id=”ltfl_similars” class=”ltfl”></div>
<div id=”ltfl_tagbrowse” class=”ltfl”></div>
[snippet of widget placement from viewtop.h]

Ok so everything works almost :-). The widgets show up but I am still having a problem with the links from the widgets. They do no refer to back to the catalog. I am sure there is something that I am missing. I have played around with the function script code but I have not been able to make it work. Again the staff at LibraryThing have been a joy to work with.

Leave a Reply

Your email address will not be published.