hacking your discovery layer

52
Hacking Your Discovery Layer Fri May 2, 10-10:45am - Joillet Randy Oldham University of Guelph Ontario, Canada [email protected] @roldham

Upload: trella

Post on 23-Feb-2016

51 views

Category:

Documents


0 download

DESCRIPTION

Hacking Your Discovery Layer. Fri May 2, 10-10:45am - Joillet Randy Oldham University of Guelph Ontario, Canada [email protected] @ roldham. All About TUG. TUG: TriUniversity Group Consortia University of Waterloo (Waterloo, Ontario, Canada) – 22,400 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Hacking Your Discovery Layer

Hacking Your Discovery Layer

Fri May 2, 10-10:45am - JoilletRandy Oldham

University of GuelphOntario, Canada

[email protected]@roldham

Page 2: Hacking Your Discovery Layer

All About TUG TUG: TriUniversity Group Consortia

University of Waterloo (Waterloo, Ontario, Canada) – 22,400

Wilfrid Laurier University (Waterloo, Ontario, Canada) – 14,800

University of Guelph (Guelph, Ontario, Canada) – 22,000

Page 3: Hacking Your Discovery Layer

Note Lots of Ex Libris products

Hosted Locally: Voyager Primo

Hosted Provincially: SFX

Page 4: Hacking Your Discovery Layer

Generally Speaking… Locally-hosted

More access to files More potential for hacking

Vendor-hosted Less access to files Less potential for hacking

YOUR MILEAGE MAY VARY… Terms & Licenses

Page 5: Hacking Your Discovery Layer

Full Disclosure This is Matt. Matt is a developer at UG

This is Randy. He’s the web guy at UG Also Primo guy at UG

Then we had a team of folks from the consortia… Alison, Charles, Dillon, Matt

And EX LIBRIS support…

Page 6: Hacking Your Discovery Layer

First Steps… Determine your access to files:

Is there backend administration? Can you modify/include CSS?

Simple colour changes & hide content Can you modify/include HTML files?

Customise headers and footers Include new JS files

Can you modify/include Javascript files? More advanced customisations Programmatically changing things

Can you modify core files? Carte Blanche!

Page 7: Hacking Your Discovery Layer

General customisation notes We had a general approach to

customisations:

Avoid customisations to core files when possible

Keep it simple…as close to stock as possible

Backup…backup…backup Document all changes Share

Page 8: Hacking Your Discovery Layer

Determine What to Customise Just because you CAN doesn’t mean

you SHOULD

Remember: Each hack has to be maintained through upgrades

Driven by usability testing: What would help users? What would increase their success? What would stop them from asking for

help?

Page 9: Hacking Your Discovery Layer

Tools You’ll Need1. Vendor customisation documentation2. Access to customise or include files3. Users4. Knowledge of either:

CSS HTML JAVASCRIPT

5. Firebug addon for Firefox6. 1 bottle beer*7. 1 bottle opener*

Page 10: Hacking Your Discovery Layer

Quick Note on Firebug Extension for Firefox Find div/class names:

To hide To change

Page 11: Hacking Your Discovery Layer

Method One

RTFM Read The Functional Manual Vendors provide limited customisation This is your best bet Vendors support these customisations

through upgrades Reduces your upgrade time

Page 12: Hacking Your Discovery Layer

COMPLEXITY LEVEL: LOWBACKEND ADMINISTRATION

Change Facet Order

Page 13: Hacking Your Discovery Layer

Facet Order Changed Facet Order:

WHY Change? Usability testing, Consortia, Analytics

Before: After:

Page 14: Hacking Your Discovery Layer

Facet Order How to modify FACET ORDER in PRIMO:

Login to the Primo back office Click ONGOING CONFIGURATION WIZARDS Click VIEWS WIZARD Click on EDIT to the right of the view Click SAVE & CONTINUE, CONTINUE,

CONTINUE Select BRIEF DISPLAY from dropdown Click EDIT TILE to the right of REFINE MY

RESULTS Change the order & enable/disable facets here Click Save & Continue, continue, DEPLOY

Page 15: Hacking Your Discovery Layer

COMPLEXITY LEVEL: LOWBACKEND ADMINISTRATION

Add custom tabs

Page 16: Hacking Your Discovery Layer

Tabs Add tabs (Blended, Primo, Primo

Central)

AFTER:

Why change? Usability testing/staff feedback

Page 17: Hacking Your Discovery Layer

tabs All through back office

Modify your view

Go to the TABS section

Select your search scopes for the tabs

Save & deploy

Page 18: Hacking Your Discovery Layer

Method 2:

CSS Override You must have access to edit CSS files Create your own CSS file and include it Use Firebug Determine div/class name

Visibility:hidden; to HIDE things Change colours Re-position things Replace some images

Page 19: Hacking Your Discovery Layer

COMPLEXITY LEVEL: LOWCSS OVERRIDE

Change versions tab colour

Page 20: Hacking Your Discovery Layer

Versions Tab Colour Versions tab too pale:

If there are multiple copies of the same item, the records are de-duped and all records are displayed behind a VERSIONS tab

Usability testing/comments - users consistently missed this tab… too pale

Page 21: Hacking Your Discovery Layer

Make the VERSIONS tab stand out more

Colour change = CSS override

The Goal

Page 22: Hacking Your Discovery Layer

Versions Tab Colour Instructions are on

Ex Libris Developers Network Essentially, we do the following:

create a new triangle bit change the text colour change the background colour All done with CSS

Page 23: Hacking Your Discovery Layer

Method 3:

Inject JS You must have access to an HTML file

loaded on each page (footer/header) Create a js file and include it in this Possibilities are nearly endless Be prepared to troubleshoot post

upgrades

Page 24: Hacking Your Discovery Layer

COMPLEXITY LEVEL: LOWJAVASCRIPT ADDITION

Remove EXPAND MY RESULTS

Page 25: Hacking Your Discovery Layer

Remove EXPAND… Remove the EXPAND BEYOND facet

Why change? Usability testing/staff feedback

Page 26: Hacking Your Discovery Layer

Remove EXPAND… It’s a pretty simple one line javascript bit$(document).ready(function() {

$('.EXLFacetContainer h3').filter(function(index) { return $(this).text().trim() === "Expand My Results"; }).parent().hide();}); No modifications to EXL files! EXLibris Support = Survives upgrades!*** Code in Ex Libris Developers Network

Page 27: Hacking Your Discovery Layer

COMPLEXITY LEVEL: MEDIUMBACKEND & JS

Customise MORE tab

Page 28: Hacking Your Discovery Layer

Add TUGdoc Tab TUGDoc Request Tab

Consortial interlibrary article lending

Page 29: Hacking Your Discovery Layer

TUGdoc Tab We co-opted the “GetIT! Link 2”…

MORE tab Mapping tables: Delivery: GetIT! Link 2:  changed the “link field in

PNX” to tugdoc for everything except Remote Search Resource

Mapping tables: delivery: templates – mapped tugdoc to the URL template:

  tugdoc 

https://insite.lib.uoguelph.ca/primo/tugdoc/index.cfm?bib={{control/sourcerecordid}}&view=GUELPH               link to TUGDoc request

   to open the tab in new window: Mapping tables: Delivery - URLs

Attributes https://insite.lib.uoguelph.ca/primo/tugdoc       OpenInNewWindow  For the label of the tab: Code tables: Delivery: GetIT! Tab2 – changed

name to TUGDoc Request

Page 30: Hacking Your Discovery Layer

TUGdoc tab TUGdoc tab shows up on every item

We only want folks to use TUGdoc for ARTICLES…not other resource types

So we programmatically HIDE the tab for NON-JOURNAL resources using JAVASCRIPT

Page 31: Hacking Your Discovery Layer

TUGdoc Tab The code is in

Ex Libris Developers Network It’s a pretty simple one line javascript bit$(document).ready(function() { $('.EXLMoreTab').not('tr.EXLResultMediaTYPEjournal > td > div > div > ul > li').hide();}); No modifications to EXL files! Vendor Support = Survives upgrades!***

Page 32: Hacking Your Discovery Layer

COMPLEXITY LEVEL: MEDIUMJAVASCRIPT ADDITION

Boolean Search Example

Page 33: Hacking Your Discovery Layer

Boolean Search Example Add a boolean search example

AFTER:

Why change? Staff request

Page 34: Hacking Your Discovery Layer

Boolean Search Example Relatively simple one line of JS $('<div

class="TUGSearchFieldRibbonBooleanExample">e.g., king AND shakespeare NOT lear</div>').insertBefore(".EXLSearchFieldRibbonAdvancedSearchLink");

We find div on the screen and then insert a div just before it. We give our div a class so that we can style it. We specify the content of the div

Page 35: Hacking Your Discovery Layer

COMPLEXITY LEVEL: MEDIUMJAVASCRIPT ADDITION

New Search Tab

Page 36: Hacking Your Discovery Layer

New Search Link New Search Link Added

Why Change? Staff request Takes users back to search startpage Requires JSP file modifications Contact me for more information

Page 37: Hacking Your Discovery Layer

COMPLEXITY LEVEL: HIGHJAVASCRIPT ADDITION

Where is it? integration

Page 38: Hacking Your Discovery Layer

Where is it feature Patrons/staff said… cool… I have a call

number… but where is the thing!? Guelph/Waterloo/Laurier were different

Guelph had a CF web app which supported URL var and form input

Waterloo had a different CF web app which supported form input

Laurier had static floor maps

Page 39: Hacking Your Discovery Layer

Where is it? Primo has the call number… Our consortia has apps (or static maps)

that can take call numbers and show building locations for materials…

How doth we marry these things!?

Page 40: Hacking Your Discovery Layer

Where is it? Some JAVASCRIPT!

Read in item type Read in location, and call number Do something based on some logic EG:If you find BOOK, then:

If UG/UW: create link which submits call number to CF apps via URL

If WLU: create static link to floor map of proper call number range

EG 2: If you find ANNEX, then always: Display NOTE text instead of LINK.

Page 42: Hacking Your Discovery Layer

Where is it? And one with a note…

Page 43: Hacking Your Discovery Layer

Method 4:

Edit HTML You must have access to HTML files Add logos, customise headers/footers These are least likely to survive

upgrades Be prepared to troubleshoot post

upgrades

Page 44: Hacking Your Discovery Layer

COMPLEXITY LEVEL: MEDIUMJAVASCRIPT ADDITION

Customised Help

Page 45: Hacking Your Discovery Layer

Help Doc Updates Customised discovery layer =

customised help Updated screen caps Updated instructions /exlibris/primo/p4_1/ng

/primo/home/system/thirdparty/jbossas/server/search/deploy/primo_library-app.ear/primo_library-libweb.war/static_htmls/

SEARCH TIPS: /help/search.html

Page 46: Hacking Your Discovery Layer

PRIMO INTEGRATION

Page 47: Hacking Your Discovery Layer

Search box Add a simple primo search box to

Library website

AODA…avoid iFRAMES

Page 48: Hacking Your Discovery Layer

New Books

Page 50: Hacking Your Discovery Layer

New Books cont.. RSS feed integrated

Pulls covers in from Google Books

Can limit to LC classification range

Can limit to library

Page 51: Hacking Your Discovery Layer

What about you?

What are some customisations you folks have done?

What would you like to see?

Will you share on Ex Libris Developers Network?

Page 52: Hacking Your Discovery Layer

THANK YOU! Thanks for listening!

If anything piqued your interest and you’d like some more info, feel free to drop me an email:

[email protected] @roldham