====== Added Content from Obalkyknih.cz ====== ===== Obalkyknih.cz account ===== If your library wishes to use added content provided by Obalkyknih.cz, you have to create an Obalkyknih.cz account (http://obalkyknih.cz/signup). Please note that the interface is only available in Czech. After logging in your Obalkyknih.cz account, you have to add your IP address and Evergreen server address to your account settings. (In case each library uses an address of its own, all of these addresses have to be added.) ===== Including added content in Evergreen ===== Support for displaying added content provided by Obalkyknih.cz is to be included in future releases of Evergreen ILS (from 2017 onwards). At this stage you need to change Evergreen source code to be able to pull the added content from Obalkyknih.cz. ==== Adding Perl module ObalkyKnih.pm to AddedContent directory ==== Create a file [[http://git.evergreen-ils.org/?p=working/Evergreen.git;a=blob;f=Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/ObalkyKnih.pm;h=b9b34dd02791a3302672b773b5a5cb03561f4df6;hb=961191742329692f6f01f2fa4a794b2fedbf727a | ObalkyKnih.pm]] in /usr/local/share/perl/5.20.2/OpenILS/WWW/AddedContent directory. ==== Customizing online catalog templates ==== === config.tt2=== Add the following code to file ///openils/var/templates/opac/parts/**config.tt2**//: ############################################################################## # Obalkyknih.cz support ############################################################################## # Obalkyknihy.cz is free Czech service providing added content and book covers # Set to 'true' to enable ############################################################################## obalkyknih_cz.enabled = 'true'; === summary.tt2 === Change parts of code in ///openils/var/templates/opac/parts/record/**summary.tt2**// file (in 2.10.5 release it can be located at lines 28 to 33): Delete the following lines:
[% l('Image of item') %]
Replace them with:
[%- INCLUDE "opac/parts/record/jackets.tt2" %]
=== jackets.tt2 === Create a ///openils/var/templates/opac/parts/record/**jackets.tt2**// file with the following contents: [%- IF obalkyknih_cz.enabled == 'true' %] [%- isbnissn = ''; IF attrs.isbns.0; isbnissn = attrs.isbns.0; IF (matches = isbnissn.match('^(.+?)(\s.+)$')); isbnissn = matches.0; END; END; IF attrs.issns.0; isbnissn=attrs.issns.0; END; %] [% l('Image of item') %]
[% ELSE %] [% l('Image of item') %] [%- END %]
==== Adding support for ObalkyKnih.cz to Evergreen configuration ==== To enable Obalkyknih.cz service add the following code to added_content section of configuration file ///openils/conf/**opensrf.xml**//: false true false true At the same time you have to disable added content from Open Library (Evergreen's default added content provider) and enable added content from Obalkyknih.cz instead: OpenILS::WWW::AddedContent::ObalkyKnih === Switching on/off some types of added content === Using default settings for Obalkyknih.cz means all types of added content from Obalkyknih.cz are visible in your online catalog. If the module is enabled, book covers are always displayed. Other types of added content (summaries, ratings or tables of contents) can be: * switched off using "false" option, * switched on again using "true" option. The following types of added content are used: * summary (or annotation) * tocPDF (table of contents available as image) * tocText (table of contents available as text) * review (user reviews) An example of how to switch off summaries: false ===== Getting source file(s) ===== Project's [[http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jkotrla/lp1624366-added_content_obalkyknih | current code]] is available via Git. ===== Česky (Czech) ===== [[doplnky:obalky_knih|Dokumentace v češtině / Documentaion in Czech language]] ^A module for pulling added content from Obalkyknih.cz to Evergreen online catalog has been developed as part of „Enhancing Ján Langoš Library services with the aide of Evergreen free software“ project supported by Public Library Information Services 3 (VISK 3 in Czech) grant scheme. ^