Bug 3634 - Adding OpenURL link to XSLT ISSN/ISBN
Summary: Adding OpenURL link to XSLT ISSN/ISBN
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: PC All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Jane Wagner
QA Contact:
Depends on:
Reported: 2009-09-15 02:08 UTC by Jane Wagner
Modified: 2012-10-26 00:51 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:

patch file against current head (12.70 KB, patch)
2010-07-30 12:24 UTC, Jane Wagner
Details | Diff | Splinter Review
Screen shot of link resolver display (8.88 KB, image/jpeg)
2010-07-30 12:24 UTC, Jane Wagner
revised patch file (13.98 KB, patch)
2010-08-31 17:57 UTC, Jane Wagner
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:13:07 UTC

---- Reported by jwagner@ptfs.com 2009-09-15 14:08:07 ----

I'd like to get some feedback as to whether people think this would be useful.  One of my sites asked for a search link from Koha to their SFX OpenURL resolver. (They're using the COinS / OpenURL now, but that apparently requires a browser plugin -- they want a permanent link available to all users.)  They want to do this for both ISSN and ISBN because they manage ebooks through SFX as well.

I succeeded in modifying the MARC21slim2OPACDetail.xsl file to wrap the ISSN in the syntax to make a call to the SFX server.  I'm wondering if (a) people would find this useful as a general patch, and (b) how to set it up to be relatively generic.  I'm thinking of two sysprefs (one each for ISBN and ISSN) where the site could fill in the URL of the OpenURL plus the search syntax as a prefix.  For example: 


Then, if there is a value in the syspref, pass it into XSLT and make the ISSN/ISBN a link with that syntax.

I haven't worked with other OpenURL systems besides SFX.  Is this kind of syntax generic enough?  Do other systems require any kind of postfix (text after the ISSN/ISBN) as well as a prefix?

Ideas? Comments?

--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:13 UTC  ---

This bug was previously known as _bug_ 3634 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3634

Unknown operating system Windows 2000. Setting to default OS "All".
Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was jwagner@ptfs.com.
The original assignee of this bug does not have
   an account here. Reassigning to the default assignee
   for the component, chris@bigballofwax.co.nz.
   Previous assignee was jwagner@ptfs.com.

Comment 1 Jane Wagner 2010-07-30 12:23:30 UTC
I worked up a patch which I think will allow for any link resolver.  There are two system preferences: OPAClinkresolver (for whether or not to use it) and OPAClinkresolverURL (to enter the URL and parameters for the link resolver).  If the feature is turned on, and there is an ISSN in the MARC record, a "Check Full Text Availability" link will show in the upper right box on the details page, along with the Place Hold, Print, etc. links.  I designed the layout so that both the generic image and the wording can be changed by stylesheet and jquery settings.  This would allow a site to use, say, the SFX logo and a local wording like Check Our Databases instead.

Note: this could have been accomplished by adding an entry into the OPACSearchForTitleIn setup.  I chose to do it separately for two reasons -- to make it more prominent on the page (instead of hidden in the More Searches pulldown), and so that it would only display if the feature was turned on and there was an ISSN in the record.
Comment 2 Jane Wagner 2010-07-30 12:24:07 UTC
Created attachment 2435 [details] [review]
patch file against current head
Comment 3 Jane Wagner 2010-07-30 12:24:35 UTC
Created attachment 2436 [details]
Screen shot of link resolver display
Comment 4 Jane Wagner 2010-08-31 17:57:47 UTC
Created attachment 2591 [details] [review]
revised patch file

Patch file revised to add support for 3.2 sysprefs editor.
Comment 5 Jared Camins-Esakov 2011-03-17 14:00:27 UTC
This patch does not apply. Also, it renames a file, which seems strange. Here are the messages I got:

Commit Body is:
Bug 3634 REVISED Add support for link resolver such as SFX

Creates two sysprefs to enable link resolver and enter a URL for the link resolver server.

Link will appear in righthand box on the details page, along with Place Hold, Print, etc.
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all a
Applying: Bug 3634 REVISED Add support for link resolver such as SFX
Using index info to reconstruct a base tree...
<stdin>:125: trailing whitespace.
            - "</code>example: <code>http://mysfxserver.com/sfxlcl3/?sfx.ignore_date_threshold=1&issn=</code>" 
<stdin>:32: new blank line at EOF.
<stdin>:43: new blank line at EOF.
<stdin>:74: new blank line at EOF.
warning: 4 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Renaming koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref => koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref
Auto-merging admin/systempreferences.pl
Auto-merging installer/data/mysql/de-DE/mandatory/sysprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/de-DE/mandatory/sysprefs.sql
Auto-merging installer/data/mysql/en/mandatory/sysprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/en/mandatory/sysprefs.sql
Auto-merging installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
Auto-merging installer/data/mysql/pl-PL/mandatory/sysprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/pl-PL/mandatory/sysprefs.sql
Auto-merging installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
CONFLICT (content): Merge conflict in installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
Auto-merging installer/data/mysql/updatedatabase.pl
Auto-merging koha-tmpl/opac-tmpl/prog/en/css/opac.css
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/prog/en/css/opac.css
Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
Auto-merging opac/opac-detail.pl
Failed to merge in the changes.
Comment 6 Jared Camins-Esakov 2012-02-10 15:05:30 UTC
I don't think this is a sufficiently general solution. A better option would be to add ISSN as a token for More searches, and use that in the site-appropriate manner for OpenURL resolvers.