VuFind

Add QR code support.

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: Wishlist
  • Component/s: Record
  • Labels:
    None

Description

Stanford's Blacklight instance uses QR codes to send holdings information directly to phones -- for example, see:

http://searchworks.stanford.edu/view/6824053

(it's an option in the "send to" menu).

Seems like this would be a worthwhile addition to VuFind as well.

Activity

Hide
Eoghan Ó Carragáin added a comment -
This is on the KEVEN (Kent Vufind Enhancement project - http://blogs.kent.ac.uk/vufindkeven/) roadmap, but is currently listed as a "non-essential task": http://blogs.kent.ac.uk/vufindkeven/2010/08/17/content-enhancement-tasks/.
Show
Eoghan Ó Carragáin added a comment - This is on the KEVEN (Kent Vufind Enhancement project - http://blogs.kent.ac.uk/vufindkeven/) roadmap, but is currently listed as a "non-essential task": http://blogs.kent.ac.uk/vufindkeven/2010/08/17/content-enhancement-tasks/.
Hide
Sam Moffatt added a comment -
I did a reasonably quick proof of concept of adding a QR Code that linked to the page and this is actually incredibly easy and was achieved with an extra JS function to load the QR code into the YUI popup and pull the QR Code from Google Charts.

As a reasonable proof of concept try the following:
1) Go to a normal VuFind page
2) Inspect the page to get a Javascript console in your browser and put in the following:
lightbox(); document.getElementById('popupbox').innerHTML = '<img src="http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=&#39; + window.location + '&chld=H|0" width="300" height="300" />';
3) The lightbox should display a qr code that links to the page. To me this is more valuable than the unformatted chunk of text that the searchworks example is as it can tie into other services (e.g. mobile friendly maps).

I've done a proof of concept of this for the USQ catalogue in our test environment which appears to work fine. The user doesn't get plain text however if they have a phone capable of reading QR codes they are likely able to handle VuFind's mobile template.
Show
Sam Moffatt added a comment - I did a reasonably quick proof of concept of adding a QR Code that linked to the page and this is actually incredibly easy and was achieved with an extra JS function to load the QR code into the YUI popup and pull the QR Code from Google Charts. As a reasonable proof of concept try the following: 1) Go to a normal VuFind page 2) Inspect the page to get a Javascript console in your browser and put in the following: lightbox(); document.getElementById('popupbox').innerHTML = '<img src="http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=&#39; + window.location + '&chld=H|0" width="300" height="300" />'; 3) The lightbox should display a qr code that links to the page. To me this is more valuable than the unformatted chunk of text that the searchworks example is as it can tie into other services (e.g. mobile friendly maps). I've done a proof of concept of this for the USQ catalogue in our test environment which appears to work fine. The user doesn't get plain text however if they have a phone capable of reading QR codes they are likely able to handle VuFind's mobile template.
Hide
Luke O'Sullivan added a comment - - edited
I have solution for displaying QR Codes for item holdings which uses phpqrcode from sourceforge. It requires the GD library. (Patch for default theme using VuFind1.1 attached)
It could be expanded to provide complete item details like the one shown in the blacklight example (though the QR Code likely to be generated with such data will be huge).

Instructions:

First, make sure you have the GD library:
sudo apt-get install php5-gd (Ubuntu)

Second, install the patch
(if the patch doesn't work (it contains binary files) - download phpqrcode from http://sourceforge.net/projects/phpqrcode/ and extract it to sys/phpqrcode)

Third, assign text to the $qrCodeText variable in holdings.tpl (default is Call Number and truncated title)

{assign var='qrTitle' value=$coreShortTitle|truncate:30}
        
{if $holding.0.callnumber}
    {assign var='qrCodeText' value="`$holding.0.callnumber` : $qrTitle"}
{else}
    {assign var='qrCodeText' value="$qrTitle"}
{/if}

<img alt="{translate text='QR Code'}" class="qrcode" src="{$path}/qrcode.php?text={$qrCodeText|escape:"url"}">
Show
Luke O'Sullivan added a comment - - edited I have solution for displaying QR Codes for item holdings which uses phpqrcode from sourceforge. It requires the GD library. (Patch for default theme using VuFind1.1 attached) It could be expanded to provide complete item details like the one shown in the blacklight example (though the QR Code likely to be generated with such data will be huge). Instructions: First, make sure you have the GD library: sudo apt-get install php5-gd (Ubuntu) Second, install the patch (if the patch doesn't work (it contains binary files) - download phpqrcode from http://sourceforge.net/projects/phpqrcode/ and extract it to sys/phpqrcode) Third, assign text to the $qrCodeText variable in holdings.tpl (default is Call Number and truncated title) {assign var='qrTitle' value=$coreShortTitle|truncate:30}          {if $holding.0.callnumber}     {assign var='qrCodeText' value="`$holding.0.callnumber` : $qrTitle"} {else}     {assign var='qrCodeText' value="$qrTitle"} {/if} <img alt="{translate text='QR Code'}" class="qrcode" src="{$path}/qrcode.php?text={$qrCodeText|escape:"url"}">
Hide
Luke O'Sullivan added a comment -
Qr Code Sample
Show
Luke O'Sullivan added a comment - Qr Code Sample
Hide
Eoghan Ó Carragáin added a comment -
I think, on the whole, having the QR code redirect to the mobile theme on the phone is more useful than capturing title/call-number as text. From the screenshots on their blog, this seems to be what KEVEN were doing too (?). I suppose there may be cases where the user won't have an internet connection on the phone, & maybe I'm missing other use cases where the text option is safer.

Using PHP rather than javascript/google seems like a good idea.
Show
Eoghan Ó Carragáin added a comment - I think, on the whole, having the QR code redirect to the mobile theme on the phone is more useful than capturing title/call-number as text. From the screenshots on their blog, this seems to be what KEVEN were doing too (?). I suppose there may be cases where the user won't have an internet connection on the phone, & maybe I'm missing other use cases where the text option is safer. Using PHP rather than javascript/google seems like a good idea.
Hide
William Denton added a comment -
Going to the new mobile theme would work well. The most important things to get clearly into the phone are location and call number, so the user can either go into the stacks or up to the reserves desk and ask for an item, and the mobile record would show that.

With the mobile theme about ready, having the QR codes to go with would be very nice.
Show
William Denton added a comment - Going to the new mobile theme would work well. The most important things to get clearly into the phone are location and call number, so the user can either go into the stacks or up to the reserves desk and ask for an item, and the mobile record would show that. With the mobile theme about ready, having the QR codes to go with would be very nice.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated: