Including Locally Hosted Content in Your Public Interface

It is also possible to show added content that has been generated locally by placing the content in a specific spot on the web server. It is possible to have local book jackets, reviews, TOC, excerpts or annotations.

File Location and Format

By default the files will need to be placed in directories under /openils/var/web/opac/extras/ac/ on the server(s) that run Apache.

The files need to be in specific folders depending on the format of the added content. Local Content can only be looked up based on the record ID at this time.

URL Format: http://catalog/opac/extras/ac/{type}/{format}/r/{recordid}

  • type is one of jacket, reviews, toc, excerpt or anotes.
  • format is type dependent:

    • for jacket, one of small, medium or large
    • others, one of html, xml or json … html is the default for non-image added content
  • recordid is the bibliographic record id (bre.id).

Example

If you have some equipment that you are circulating such as a laptop or eBook reader and you want to add an image of the equipment that will show up in the catalog.

Note

If you are adding jacket art for a traditional type of media (book, CD, DVD) consider adding the jacket art to the http://openlibrary.org project instead of hosting it locally. This would allow other libraries to benefit from your work.

Make note of the Record ID of the bib record. You can find this by looking at the URL of the bib in the catalog. http://catalog/eg/opac/record/123, 123 is the record ID. These images will only show up for one specific record.

Create 3 different sized versions of the image in png or jpg format.

  • Small - 80px x 80px - named 123-s.jpg or 123-s.png - This is displayed in the browse display.
  • Medium - 240px x 240px - named 123-m.jpg or 123-m.png - This is displayed on the summary page.
  • Large - 400px x 399px - named 123-l.jpg or 123-l.png - This is displayed if the summary page image is clicked on.

Note

The image dimensions are up to you, use what looks good in your catalog.

Next, upload the images to the evergreen server(s) that run apache, and move/rename the files to the following locations/name. You will need to create directories that are missing.

  • Small - Move the file 123-s.jpg to /openils/var/web/opac/extras/ac/jacket/small/r/123
  • Medium - Move the file 123-m.jpg to /openils/var/web/opac/extras/ac/jacket/medium/r/123.
  • Large - Move the file 123-l.jpg to /openils/var/web/opac/extras/ac/jacket/large/r/123.

Note

The system doesn’t need the file extension to know what kind of file it is.

Reload the bib record summary in the web catalog and your new image will display.