How to include more fields into the OPAC Web
Tags: aleph
, perl
, opac
, sql
Last Updated:Dec 09, 2011 00:51
Description
By connecting to Oracle through Perl using an external JavaScript, you can include more information in the Web OPAC, by consulting the table fields of the Aleph's Oracle database.
In the following example is presented how to include the barcode of an item (xxx50.z30_barcode) into the Current Loans screen (www_f_eng/bor-loan-body).
However, adapting the script and creating new ones, you can include any field (or fields) from any other table (xxx01.Z00R, xxx01.z13, xxx50.z30).
To include more fields, I suggest to run only one select to bring the data and them treat the javascript output (document.write(var) or document.write(var.substring...).
- Add more fields into Aleph's OPAC Web
Tested on version 500.20.
Version 1.0
----
- Author: Michelangelo Mazzardo Marques Viana - Additional author(s):
- Institution: Pontificia Universidade Catolica RS
- Year: 2011
- License: MPL 1.1 / GPL 2.0
- Short description: Use, modification and distribution of the code are permitted provided the copyright notice, list of conditions and disclaimer appear in all related material.
- Link to terms: MPL 1.1, GPL 2.0
- Skill required for using this code: intermediate
State
Stable (in production use)
Programming language
PERL, Javascript
Software requirements
Tested with Aleph500 version 20, under Linux Red Hat.
Screen captures
Author(s) homepage
http://www.linkedin.com/pub/michelangelo-mazzardo-marques-viana/3/723/857
Download
http://www.exlibrisgroup.org/download/attachments/36668154/include_more_fields_into_the_opac.zip
Using the following Ex Libris open interfaces
None so far.
Changes
Version 1.0 (November, 2011)
- Initial release.
Release notes
Version 1.0 (Nov 2011) was the initial release.
Installation instructions
1. Create a folder in the Aleph’s Apache path to store your Perl scripts.
In this example we created one called “dun-mod-perl”
/exlibris/aleph/u20_1/alephe/apache/dun-mod-perl
(dun is because this script was inspired by Matthew Phillips, which worked to University of Dundee and created the Other Books script and others.)
2. Then, inside /exlibris/aleph/u20_1/alephe/apache/conf/httpd.conf, insert these codes to allow the PERL scripts execution:
3. After that, to be able to use this new path, which will be
http://aleph_server_url/dun-mp/
you need to restart your Apache (util-w-3-6).
Note that if Aleph’s HTTPD_PORT is lower than 1024, you will need root privileges to do it.
4. store a file “itembarcode.pl”, the main script, inside
/exlibris/aleph/u20_1/alephe/apache/dun-mod-perl/itembarcode.pl
See contents attached.
5. store a file called “reports_config”, the required settings, inside
/exlibris/aleph/u20_1/alephe/reports_config
See contents attached.
6. Inside
/exlibris/aleph/u20_1/alephe/www_f_eng/bor-loan-head
add a new TH (table head) for "Item barcode" after "Description"
7. Inside
/exlibris/aleph/u20_1/alephe/www_f_eng/bor-loan-body
After
add a new TD (table division) and the following code, to call the script using Javascript’s external script:
8. Log into your borrower account > Loans to see the barcode of the loaned items.
Configuration
Follow the steps above.
Comments

