Here is a quick start guide to setup the Drupal-opac module with a demo Integrated Library System (ILS). You will not find lot of explanation about how things works or why we do things a certain way because this is a step-by-step guide allowing you to quickly set up the module.

You should have a drupal (7.x) site working. For more information about Drupal-opac, go to the drupal project page: http://drupal.org/sandbox/AlexArnaud/1570572.

1) Create the bibliographic content type.

For that you can download and enable the OPAC Bibliographic record feature which is a default content type with basic fields such as ISBN, Author etc ... And taxonomy.

You will need to have the Features and Strongarm modules enabled to satisfy the dependencies.

2) Download and enable Drupal-opac


First, get the module by cloning the source from drupal.org repository:

cd /path/to/drupal/sites/all/modules/

<code>git clone --branch 7.x-1.x http://git.drupal.org/sandbox/AlexArnaud/1570572.git opac


Once your are done, go to the modules page (Admin > Modules) and enable only the main module, opac, in the OPAC package. Leave opac cover, opac items, opac users and opac marc disabled for the moment.

3) Configure Drupal-opac.

Go to Admin > Config and click on General Settings in the OPAC section of the page.

Here we have to define in which fields the module will find the bibliographic record identifier and the ILS server identifier. So, in Fields setting section:

  • Record identifier field: This the unique id of the record in the ILS server. If you have created the content type using the OPAC Bibliographic record feature, you shoud have a field labeled Biblio identifier. Select this one.
  • Server identifier field: Drupal-opac can work with as many ILS servers as you want. Then, the module must know which ILS a node/bibliographic record is from. Then, the biblio identifier and the server identifier combined represent the full identifier of the record. Here select the Server identifier field.

Finaly, enter whatever you want (a numeric value) in Harvest Batch size textbox, which is the number of the record that will be retrieved by request when harvesting.

4) Create an ILS server.

Go back to the configuration page and click on OPAC servers in the OPAC section. Click on New OPAC server and fill out the form following these steps:

  • OPAC server name: You can choose whatever you want. We will use a demo system named Koha as ILS back-end. You can type "Koha demo ILS",
  • Host: Here you must enter the url of the remote ILS catalog. Type the url the Koha demo: http://demo.biblibre.com/,
  • ILS Connector: Drupal-opac uses connectors to be compliant with many ILS. For the moment the module ships with a connector for Koha using ILSDI discover services (web services). So select ILSDI Connector 2.0 for koha OPAC,
  • First record number and Last record number: This is not required because you can specify them as parameters of the drush command opac_harvest. But for harvesting via drupal user interface, it must be set. You can enter 1 for the first and 10 for the last. So we will harvest 10 records.
  • Enabled ?: Check it ! So the server will be enabled and can be harvested.

5) Attach the content type to the server.

Edit your server and click on the "Content types" tab and on "Add content type":

Content type: Select the content type you have created.
Matching field: Select the document type field.
Field value(s): Just type /^LIV$/
Weight: Leave the default

6) Configure the mapping.

The mapping with Drupal-opac is a way to link ILS record fields with Drupal node fields. In the configuration page of your Drupal site, click on OPAC servers again. On the content type you've just attached, click the "Mapping" link.

In the 2nd part, click on ISBN field (Assuming you have enabled OPAC Bibliographic record). In the "Mapped with" dropdown list, select ISBN (Fields in "Mapped with" dropdown are those of the ILS. This is the connector that returns them). So here we just indicating that we want map the ISBN field of the Drupal nodes with the ISBN field of the ILS records.

Click on Principal author field in the 2nd part. Mapping form should be quite a bit different. This is because Principal author field is related to a vocabulary. Then you can see a fieldset named Taxonomy rule for vocabulary Authors at the bottom. Authors is the vocabulary name to which the field is related. For more information about the way taxonomy works with Drupal-opac, read the documentation.

  • In Mapped with list: Select Principal author,
  • In Term field to compare list: Select Term name,
  • In No match rule: Select Create new term,

Do the same for Secondary authors field but select Secondary authors in the Mapped with list.

And finally, map the Publisher field with Editor.

7) Harvest bibliographic records.

You must have drush installed (v. >= 4). Type the following command:

drush opac-harvest --from=1 --to=20 --print-id -v

This will harvest 10 bibliographic records from the ILS previously created.

8) Use opac items module.

Enable Opac items module and go to Admin > Config > OPAC server. Click on the edit link of your ILS server and choose items mapping. Click on Add rule and fill out the form in the following way:

  • Item field: Here is which field to display in items table. Select Barcode,
  • Displayed name: This is the displayed name of the column header. Type "Barcode",
  • Weight: You can define this to manage the order columns are displayed. Stronger values will display a column at the right. You can also change this by the dragging and dropping method in the mapping overview page.
  • Linked to vocabulary: Note that you can link an item field to a vocabulary like we did for bibliographic records.
  • Save.

Do the same like this:

ILS item field Header Linked to a vocabulary ?
barcode Barcode no
holdingbranchname Holding branch no
itemcallnumber Call number no
date_due Date due no

Now look at a bibliographic node and click on the items tab. Make sure your user has the appropriate permission for viewing items (View opac items).

9) Get bibliographic cover

First, enable the Opac cover module.

Create a new field for the OPAC bibliographic content type:

  • Label: Cover,
  • Machine name: field_cover,
  • Type: Text,
  • Widget: Medium cover.

Once you're done, click on the "manage display" tab of the content type and make the "Cover" field being displayed with Medium cover format (or small, big, etc.).

Now go to admin>config>opac>cover and fill out the form like:

  • Field to use: Select ISBN. We use the ISBN value to get a cover via Amazon service,
  • Field for cover: The field named Cover you've just created,
  • Save.

Look at a bibliographic node. When the ISBN value has not been able to get a cover (ISBN is wrong formatted or not existing), a default "no cover" image is displayed.

10) OPAC users

Enable the Opac users module and go to 'admin>config>opac>opac-users'. In "Authentication" fieldset, select "Use drupal account as library account," save and quit. Now create a drupal user with login: demo and password: demo. Clear the cache and login with the demo user.

Now you should have "My checkouts" and "My holds" menu entry in user menu.

Comments

schnydszch’s picture

Hi! I'm having problem harvesting record. I get this:
46425 coming from house_of_representatives_library server. Title: .
Switch this record
WD OPAC HARVEST: Can't determine the content type for record n° [warning]
46426 coming from house_of_representatives_library server. Title: .
Switch this record
....
Switch this record
=> 0 imported/updated
Thanks in advance!

Anonymous’s picture

The link for the OPAC Bibliographic record-feature is dead.

manish17’s picture

can you explain in deeply how i integrated drupal with koha , i have a large amount of data in koha but i want the user search in drupal and then data is fetched from koha and the result is show in drupal interface.