Docs: Cover Image Upload documentation
[evergreen-equinox.git] / docs / modules / admin_initial_setup / pages / designing_your_catalog.adoc
1 = Designing your catalog =
2 :toc:
3
4 When people want to find things in your Evergreen system, they will check the
5 catalog. In Evergreen, the catalog is made available through a web interface,
6 called the _OPAC_ (Online Public Access Catalog). In the latest versions of the
7 Evergreen system, the OPAC is built on a set of programming modules called the
8 Template Toolkit. You will see the OPAC sometimes referred to as the _TPAC_.
9
10 In this chapter, we'll show you how to customize the OPAC, change it from its
11 default configuration, and make it your own.
12
13 == Configuring and customizing the public interface ==
14
15 The public interface is referred to as the TPAC or Template Toolkit (TT) within
16 the Evergreen community. The template toolkit system allows you to customize the
17 look and feel of your OPAC by editing the template pages (.tt2) files as well as
18 the associated style sheets.   
19
20 === Locating the default template files ===
21
22 The default URL for the TPAC on a default Evergreen system is
23 _http://localhost/eg/opac/home_ (adjust _localhost_ to match your hostname or IP
24 address).
25
26 The default template file is installed in _/openils/var/templates/opac_.
27
28 You should generally avoid touching the installed default template files, unless
29 you are contributing changes for Evergreen to adopt as a new default. Even then,
30 while you are developing your changes, consider using template overrides rather
31 than touching the installed templates until you are ready to commit the changes
32 to a branch. See below for information on template overrides.
33
34 === Mapping templates to URLs ===
35
36 The mapping for templates to URLs is straightforward. Following are a few
37 examples, where _<templates>_ is a placeholder for one or more directories that
38 will be searched for a match:
39
40 * _http://localhost/eg/opac/home => /openils/var/<templates>/opac/home.tt2_
41 * _http://localhost/eg/opac/advanced =>
42 /openils/var/<templates>/opac/advanced.tt2_
43 * _http://localhost/eg/opac/results => 
44 /openils/var/<templates>/opac/results.tt2_
45
46 The template files themselves can process, be wrapped by, or include other
47 template files. For example, the _home.tt2_ template currently involves a number
48 of other template files to generate a single HTML file.
49
50 Example Template Toolkit file: _opac/home.tt2_.
51 ----
52 [%  PROCESS "opac/parts/header.tt2";
53     WRAPPER "opac/parts/base.tt2";
54     INCLUDE "opac/parts/topnav.tt2";
55     ctx.page_title = l("Home") %]
56     <div id="search-wrapper">
57       [% INCLUDE "opac/parts/searchbar.tt2" %]
58     </div>
59     <div id="content-wrapper">
60         <div id="main-content-home">
61              <div class="common-full-pad"></div>
62              [% INCLUDE "opac/parts/homesearch.tt2" %]
63              <div class="common-full-pad"></div>
64         </div>
65      </div>
66 [% END %]
67 ----
68 Note that file references are relative to the top of the template directory.
69
70 === How to override template files ===
71
72 Overrides for template files or TPAC pages go in a directory that parallels the
73 structure of the default templates directory. The overrides then get pulled in
74 via the Apache configuration.
75
76 The following example demonstrates how to create a file that overrides the
77 default "Advanced search page" (_advanced.tt2_) by adding a new 
78 _templates_custom_ directory and editing the new file in that directory.
79
80 ----
81 bash$ mkdir -p /openils/var/templates_custom/opac
82 bash$ cp /openils/var/templates/opac/advanced.tt2 \
83          /openils/var/templates_custom/opac/.
84 bash$ vim /openils/var/templates_custom/opac/advanced.tt2
85 ----
86
87 === Configuring the custom templates directory in Apache's eg.conf ===
88
89 You now need to teach Apache about the new custom template directory. Edit
90 _/etc/apache2/sites-available/eg.conf_ and add the following _<Location /eg>_
91 element to each of the _<VirtualHost>_ elements in which you want to include the
92 overrides. The default Evergreen configuration includes a VirtualHost directive
93 for port 80 (HTTP) and another one for port 443 (HTTPS); you probably want to
94 edit both, unless you want the HTTP user experience to be different from the
95 HTTPS user experience.
96
97 ----
98 <VirtualHost *:80>
99     # <snip>
100
101     # - absorb the shared virtual host settings
102     Include eg_vhost.conf
103     <Location /eg>
104         PerlAddVar OILSWebTemplatePath "/openils/var/templates_custom"
105     </Location>
106
107     # <snip>
108 </VirtualHost>
109 ----
110
111 Finally, reload the Apache configuration to pick up the changes. You should now
112 be able to see your change at _http://localhost/eg/opac/advanced_ where
113 _localhost_ is the hostname of your Evergreen server.
114
115 === Adjusting colors for your public interface ===
116
117 You may adjust the colors of your public interface by editing the _colors.tt2_
118 file. The location of this file is in 
119 _/openils/var/templates/opac/parts/css/colors.tt2_. When you customize the
120 colors of your public interface, remember to create a custom file in your custom
121 template folder and edit the custom file and not the file located in your default
122 template.    
123
124 === Adjusting fonts in your public interface ===
125
126 Font sizes can be changed in the _colors.tt2_ file located in
127 _/openils/var/templates/opac/parts/css/_. Again, create and edit a custom
128 template version and not the file in the default template.
129
130 Other aspects of fonts such as the default font family can be adjusted in
131 _/openils/var/templates/opac/css/style.css.tt2_. 
132
133 === Media file locations in the public interface ===
134 The media files (mostly PNG images) used by the default TPAC templates are stored
135 in the repository in _Open-ILS/web/images/_ and installed in
136 _/openils/var/web/images/_.
137
138 === Changing some text in the public interface ===
139
140 Out of the box, TPAC includes a number of placeholder text and links. For
141 example, there is a set of links cleverly named Link 1, Link 2, and so on in the
142 header and footer of every page in TPAC. Here is how to customize that for a 
143 _custom templates_ skin.
144
145 To begin with, find the page(s) that contain the text in question. The simplest
146 way to do that is with the grep -s command. In the following example, search for
147 files that contain the text "Link 1":
148
149 ----
150 bash$ grep -r "Link 1" /openils/var/templates/opac
151 /openils/var/templates/opac/parts/topnav_links.tt2
152 4:            <a href="http://example.com">[% l('Link 1') %]</a>
153 ----
154
155
156 Next, copy the file into our overrides directory and edit it with vim.
157
158 Copying the links file into the overrides directory.
159
160 ----
161 bash$ cp /openils/var/templates/opac/parts/topnav_links.tt2 \
162 /openils/var/templates_custom/opac/parts/topnav_links.tt2
163 bash$ vim /openils/var/templates_custom/opac/parts/topnav_links.tt2
164 ----
165
166 Finally, edit the link text in _opac/parts/header.tt2_. Content of the
167 _opac/parts/header.tt2_ file.
168
169 ----
170 <div id="gold-links-holder">
171     <div id="gold-links">
172         <div id="header-links">
173             <a href="http://example.com">[% l('Link 1') %]</a>
174             <a href="http://example.com">[% l('Link 2') %]</a>
175             <a href="http://example.com">[% l('Link 3') %]</a>
176             <a href="http://example.com">[% l('Link 4') %]</a>
177             <a href="http://example.com">[% l('Link 5') %]</a>
178         </div>
179     </div>
180 </div>
181 ----
182
183 For the most part, the page looks like regular HTML, but note the `[%_(" ")%]`
184 that surrounds the text of each link. The `[% ... %]` signifies a TT block,
185 which can contain one or more TT processing instructions. `l(" ... ");` is a
186 function that marks text for localization (translation); a separate process can
187 subsequently extract localized text as GNU gettext-formatted PO (Portable
188 Object) files.
189
190 As Evergreen supports multiple languages, any customization to Evergreen's
191 default text must use the localization function. Also, note that the
192 localization function supports placeholders such as `[_1]`, `[_2]` in the text;
193 these are replaced by the contents of variables passed as extra arguments to the
194 `l()` function.
195
196 Once the link and link text has been edited to your satisfaction, load the page
197 in a Web browser and see the live changes immediately.
198
199 === Adding translations to PO file ===
200
201 After you have added custom text in translatable form to a TT2 template, you need to add the custom strings and its translations to the PO file containing the translations. Evergreen PO files are stored  in _/openils/var/template/data/locale/_ 
202
203 The PO file consists of pairs of the text extracted from the code:  Message ID  denoted as _msgid_ and message string denoted as _msgstr_.  When adding the custom string to PO file: 
204
205 * The line with English expressions must start with _msgid_. The English term must be enclosed in double apostrophes. 
206 * The line with translation start with /msgstr/. The translation to local language must be and enclosed in enclosed in double apostrophes.  
207 * It is recommended to  add a note in which template and on which line the particular string is located. The lines with notes must be marked as comments i.e., start with number sign (#) 
208
209 Example: 
210
211 ----
212
213 # ---------------------------------------------------------------------
214 # The lines below contains the custom strings manually added to the catalog
215 # ---------------------------------------------------------------------
216
217 #: ../../Open-ILS/src/custom_templates/opac/parts/topnav_links.tt2:1
218 msgid "Union Catalog of the Czech Republic"
219 msgstr "Souborný katalog České republiky"
220
221
222 #: ../../Open-ILS/src/custom_templates/opac/parts/topnav_links.tt2:1
223 msgid "Uniform Information Gateway "
224 msgstr "Jednotná informační brána"
225
226 ----
227
228 [NOTE]
229 ====
230 It is good practice to save backup copy of the original PO file before changing it.
231 ====
232
233 After making changes, restart Apache to make the changes take effect. As root run the command:
234
235 ----
236 service apache2 restart
237 ----
238
239 === Adding and removing MARC fields from the record details display page ===
240
241 It is possible to add and remove the MARC fields and subfields displayed in the
242 record details page.  In order to add MARC fields to be displayed on the details
243 page of a record, you will need to map the MARC code to variables in the
244 _/openils/var/templates/opac/parts/misc_util.tt2 file_.
245
246 For example, to map the template variable _args.pubdates_ to the date of
247 publication MARC field 260, subfield c, add these lines to _misc_util.tt2_:
248
249 ----
250 args.pubdates = [];
251 FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="c"]');
252     args.pubdates.push(sub.textContent);
253 END;
254 args.pubdate = (args.pubdates.size) ? args.pubdates.0 : ''
255 ----
256
257 You will then need to edit the 
258 _/openils/var/templates/opac/parts/record/summary.tt2_ file in  order to get the
259 template variable for the MARC field to display.
260
261 For example, to display the date of publication code you created in the
262 _misc_util.tt2_ file, add these lines:
263
264 ----
265 [% IF attrs.pubdate; %]
266     <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
267 [% END; %]
268 ----
269
270 You can add any MARC field to your record details page. Moreover, this approach
271 can also be used to display MARC fields in other pages, such as your results
272 page.
273
274 ==== Using bibliographic source variables ====
275
276 For bibliographic records, there is a "bib source" that can be associated with
277 every record. This source and its ID are available as record attributes called
278 _bib_source.source_ and _bib_source.id_.  These variables do not present
279 themselves in the catalog display by default.
280
281 .Example use case
282 ****
283
284 In this example, a library imports e-resource records from a third party and
285 uses the bib source to indicate where the records came from. Patrons can place
286 holds on these titles, but they must be placed via the vendor website, not in
287 Evergreen. By exposing the bib source, the library can alter the Place Hold
288 link for these records to point at the vendor website.
289
290 ****
291
292 == Setting the default physical location for your library environment ==
293
294 _physical_loc_ is an Apache environment variable that sets the default physical
295 location, used for setting search scopes and determining the order in which
296 copies should be sorted. This variable is set in
297 _/etc/apache2/sites-available/eg.conf_. The following example demonstrates the
298 default physical location being set to library ID 104:
299
300 ----
301 SetEnv physical_loc 104
302 ----
303
304 [#setting_a_default_language_and_adding_optional_languages]
305 == Setting a default language and adding optional languages ==
306
307 _OILSWebLocale_ adds support for a specific language. Add this variable to the
308 Virtual Host section in _/etc/apache2/eg_vhost.conf_.
309
310 _OILSWebDefaultLocale_ specifies which locale to display when a user lands on a
311 page in TPAC and has not chosen a different locale from the TPAC locale picker.
312 The following example shows the _fr_ca_ locale being added to the locale picker
313 and being set as the default locale:
314
315 ----
316 PerlAddVar OILSWebLocale "fr_ca"
317 PerlAddVar OILSWebLocale "/openils/var/data/locale/opac/fr-CA.po"
318 PerlAddVar OILSWebDefaultLocale "fr-CA"
319 ----
320
321 Below is a table of the currently supported languages packaged with Evergreen:
322
323 [options="header"]
324 |===
325 |Language| Code| PO file
326 |Arabic - Jordan| ar_jo | /openils/var/data/locale/opac/ar-JO.po
327 |Armenian| hy_am| /openils/var/data/locale/opac/hy-AM.po
328 |Czech| cs_cz| /openils/var/data/locale/opac/cs-CZ.po
329 |English - Canada| en_ca| /openils/var/data/locale/opac/en-CA.po
330 |English - Great Britain| en_gb| /openils/var/data/locale/opac/en-GB.po
331 |*English - United States| en_us| not applicable
332 |French - Canada| fr_ca| /openils/var/data/locale/opac/fr-CA.po
333 |Portuguese - Brazil| pt_br| /openils/var/data/locale/opac/pt-BR.po
334 |Spanish| es_es| /openils/var/data/locale/opac/es-ES.po
335 |===
336 *American English is built into Evergreen so you do not need to set up this
337 language and there are no PO files. 
338
339 === Updating translations in Evergreen using current translations from Launchpad ===
340
341 Due to Evergreen release workflow/schedule, some language strings may already have been translated in Launchpad,
342 but are not yet packaged with Evergreen. In such cases, it is possible to manually replace the PO file in
343 Evergreen with an up-to-date PO file downloaded from Launchpad. 
344
345 . Visit the Evergreen translation site in https://translations.launchpad.net/evergreen[Launchpad] 
346 . Select required language (e.g. _Czech_ or _Spanish_)
347 . Open the  _tpac_  template  and  then select option _Download translation_. Note: to be able to download the translation file you need to be logged in to Launchpad.
348 . Select _PO format_ and submit the _request for download_ button. You can also request for download of all existing templates and languages at once, see https://translations.launchpad.net/evergreen/master/+export. The download link will be sent You to email address provided. 
349 . Download the file and name it according to the language used (e.g., _cs-CZ.po_ for Czech or  _es-ES.po_ for Spanish)  
350 . Copy the downloaded file to  _/openils/var/template/data/locale_. It is a good practice to backup the original PO file before.
351 . Be sure that the desired language is set as default, using the xref:#setting_a_default_language_and_adding_optional_languages[Default language] procedures.
352
353 Analogously, to update the web staff client translations, download the translation template _webstaff_ and copy it to _openils/var/template/data/locale/staff_.
354
355
356 Changes require web server reload to take effect. As root run the command 
357
358 ----
359 service apache2 restart
360 ----
361
362 == Change Date Format in Patron Account View ==
363 Libraries with same-day circulations may want their patrons to be able to view
364 the due *time* as well as due date when they log in to their OPAC account.  To
365 accomplish this, go to _opac/myopac/circs.tt2_.  Find the line that reads:
366
367 ----
368 [% date.format(due_date, DATE_FORMAT) %]
369 ----
370
371 Replace it with:
372
373 ----
374 [% date.format(due_date, '%D %I:%M %p') %]
375 ----
376
377
378 == Including External Content in Your Public Interface ==
379
380 The public interface allows you to include external services and content in your
381 public interface. These can include book cover images, user reviews, table of
382 contents, summaries, author notes, annotations, user suggestions, series
383 information among other services. Some of these services are free while others
384 require a subscription.    
385
386 The following are some of the external content services which you can configure
387 in Evergreen.
388
389 === OpenLibrary ===
390
391 The default install of Evergreen includes OpenLibrary book covers. The settings
392 for this are controlled by the <added_content> section of
393 _/openils/conf/opensrf.xml_. Here are the key elements of this configuration:
394
395 ----
396 <module>OpenILS::WWW::AddedContent::OpenLibrary</module>
397 ----
398
399 This section calls the OpenLibrary perl module. If you wish to link to a
400 different book cover service other than OpenLibrary, you must refer to the
401 location of the corresponding Perl module. You will also need to change other
402 settings accordingly.
403
404 ----
405 <timeout>1</timeout>
406 ----
407
408 Max number of seconds to wait for an added content request to return data. Data 
409 not returned within the timeout is considered a failure.
410 ----
411 <retry_timeout>600</retry_timeout>
412 ----
413
414 This setting is the amount of time to wait before we try again.
415
416 ----
417 <max_errors>15</max_errors>
418 ----
419
420 Maximum number of consecutive lookup errors a given process can have before
421 added content lookups are disabled for everyone. To adjust the site of the cover
422 image on the record details page edit the config.tt2 file and change the value
423 of the record.summary.jacket_size. The default value is "medium" and the
424 available options are "small", "medium" and "large."   
425
426 === ChiliFresh ===
427
428 ChiliFresh is a subscription-based service which allows book covers, reviews and
429 social interaction of patrons to appear in your catalog. To activate ChiliFresh,
430 you will need to open the Apache configuration file _/etc/apache2/eg_vhost.conf_
431 and edit several lines:
432
433 . Uncomment (remove the "#" at the beginning of the line) and add your ChiliFresh
434 account number:
435
436 ----
437 #SetEnv OILS_CHILIFRESH_ACCOUNT
438 ----
439
440 . Uncomment this line and add your ChiliFresh Profile:
441
442 ----
443 #SetEnv OILS_CHILIFRESH_PROFILE
444 ----
445
446 Uncomment the line indicating the location of the Evergreen JavaScript for
447 ChiliFresh:
448
449 ----
450 #SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site /js/evergreen.js
451 ----
452
453 . Uncomment the line indicating the secure URL for the Evergreen JavaScript :
454
455 ----
456 #SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
457 ----
458
459 [id="_content_cafe"]
460 Content Café
461 ~~~~~~~~~~~~
462
463 Content Café is a subscription-based service that can add  jacket images,
464 reviews, summaries, tables of contents and book details to your records.
465
466 In order to activate Content Café, edit the _/openils/conf/opensrf.xml_ file and
467 change the _<module>_ element to point to the ContentCafe Perl Module:
468
469 ----
470 <module>OpenILS::WWW::AddedContent::ContentCafe</module>
471 ----
472
473 To adjust settings for Content Café, edit a couple of fields with the
474 _<ContentCafe>_ Section of _/openils/conf/opensrf.xml_.
475
476 Edit the _userid_ and _password_ elements to match the user id and password for
477 your Content Café account.
478
479 This provider retrieves content based on ISBN or UPC, with a default preference
480 for ISBNs.  If you wish for UPCs to be preferred, or wish one of the two identifier
481 types to not be considered at all, you can change the "identifier_order" option
482 in opensrf.xml.  When the option is present, only the identifier(s) listed will
483 be sent.
484
485 === Obalkyknih.cz ===
486
487 ==== Setting up Obalkyknih.cz account ====
488
489 If your library wishes to use added content provided by Obalkyknih.cz, a service based in the Czech Republic, you have to http://obalkyknih.cz/signup[create an Obalkyknih.cz account].
490 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.
491 (In case each library uses an address of its own, all of these addresses have to be added.) 
492
493 ==== Enabling Obalkyknih.cz in Evergreen ====
494
495 Set obalkyknih_cz.enabled to true in '/openils/var/templates/opac/parts/config.tt2':
496
497 [source,perl]
498 ----
499 obalkyknih_cz.enabled = 'true';
500 ----
501
502 Enable added content from Obalkyknih.cz in '/openils/conf/opensrf.xml' configuration file (and – at the same time – disable added content from Open Library, i.e., Evergreen's default added content provider):
503
504 [source,xml]
505 ----
506 <!-- <module>OpenILS::WWW::AddedContent::OpenLibrary</module> -->
507 <module>OpenILS::WWW::AddedContent::ObalkyKnih</module>
508 ----
509
510 Using default settings for Obalkyknih.cz means all types of added content from Obalkyknih.cz are visible in your online catalog.
511 If the module is enabled, book covers are always displayed. Other types of added content (summaries, ratings or tables of contents) can be: 
512
513 * switched off using _false_ option,
514 * switched on again using _true_ option.
515
516 The following types of added content are used: 
517
518 * summary (or annotation)
519 * tocPDF (table of contents available as image)
520 * tocText (table of contents available as text)
521 * review (user reviews)
522
523 An example of how to switch off summaries: 
524
525 [source,xml]
526 ----
527 <summary>false</summary>
528 ----
529
530
531 === Google Analytics ===
532
533 Google Analytics is a free service to collect statistics for your Evergreen
534 site. Statistic tracking is disabled by default through the Evergreen 
535 client software when library staff use your site within the client, but active 
536 when anyone uses the site without the client. This was a preventive measure to 
537 reduce the potential risks for leaking patron information. In order to use Google 
538 Analytics you will first need to set up the service from the Google Analytics 
539 website at http://www.google.com/analytics/. To activate Google Analytics you 
540 will need to edit _config.tt2_ in your template. To enable the service set 
541 the value of google_analytics.enabled to true and change the value of 
542 _google_analytics.code_ to be the code in your Google Analytics account.
543
544 === Matomo Analytics ===
545
546 Matomo Analytics (https://matomo.org/) is free software that you can host
547 yourself, so that you can collect web site statistics without sharing your
548 users' data with third parties.  Statistic tracking is disabled by default
549 through the Evergreen client software when library staff use your site within
550 the client, but active when anyone uses the site without the client.  This was
551 a preventive measure to reduce the potential risks for leaking patron
552 information. To use Matomo Analytics you need to:
553
554 . Set up a hosted instance of Matomo
555 . Add your Evergreen catalog as a site
556 . Use the Library Settings Editor to add a Matomo URL and Site ID for your library.
557
558 Typically, Matomo will give you a block of javascript you can insert into
559 web sites. One line will look like:
560
561 var u="http://mylibrary.lib/matomo/";
562
563 The full URL in the double quotes will be your URL.  Another line
564 will look like:
565
566 _paq.push(['setSiteId', '1']);
567
568 In this case the number 1 will be your site ID.
569
570
571 === NoveList ===
572
573 Novelist is a subscription-based service providing reviews and recommendation
574 for books in you catalog. To activate your Novelist service in Evergreen, open
575 the Apache configuration file _/etc/apache2/eg_vhost.conf_ and edit the line:
576
577 ----
578 #SetEnv OILS_NOVELIST_URL
579 ----
580
581 You should use the URL provided by NoveList.
582
583 === RefWorks ===
584
585 RefWorks is a subscription-based online bibliographic management tool. If you
586 have a RefWorks subscription, you can activate RefWorks in Evergreen by editing
587 the _config.tt2_ file located in your template directory. You will need to set
588 the _ctx.refworks.enabled_ value to _true_. You may also set the RefWorks URL by
589 changing the _ctx.refworks.url_ setting on the same file. 
590
591 === SFX OpenURL Resolver ===
592
593 An OpenURL resolver allows you to find electronic resources and pull them into
594 your catalog based on the ISBN or ISSN of the item. In order to use the SFX
595 OpenURL resolver, you will need to subscribe to the Ex Libris SFX service.  To
596 activate the service in Evergreen edit the _config.tt2_ file in your template.
597 Enable the resolver by changing the value of _openurl.enabled_ to _true_ and
598 change the _openurl.baseurl_ setting to point to the URL of your OpenURL
599 resolver. 
600
601 === Syndetic Solutions ===
602
603 Syndetic Solutions is a subscription service providing book covers and other
604 data for items in your catalog. In order to activate Syndetic, edit the
605 _/openils/conf/opensrf.xml_ file and change the _<module>_ element to point to
606 the Syndetic Perl Module:
607
608 ----
609 <module>OpenILS::WWW::AddedContent::Syndetic</module>
610 ----
611
612 You will also need to edit the  _<userid>_ element to be the user id provided to
613 you by Syndetic.
614
615 Then, you will need to uncomment and edit the _<base_url>_ element so that it
616 points to the Syndetic service:
617
618 ----
619 <base_url>http://syndetics.com/index.aspx</base_url>
620 ----
621
622 For changes to be activated for your public interface you will need to restart
623 Evergreen and Apache.
624
625 The Syndetic Solutions provider retrieves images based on the following identifiers
626 found in bibliographic records:
627
628 * ISBN
629 * UPC
630 * ISSN
631
632
633 === Clear External/Added Content Cache ===
634
635 On the catalog's record summary page, there is a link for staff that will forcibly clear 
636 the cache of the Added Content for that record. This is helpful for when the Added Content 
637 retrieved the wrong cover jacket art, summary, etc. and caches the wrong result.
638
639 image::media/clear-added-content-cache-1.png[Clear Cache Link]
640
641 Once clicked, there is a pop up that will display what was cleared from the cache. 
642
643 image::media/clear-added-content-cache-2.jpg[Example Popup]
644
645 You will need to reload the record in the staff client to obtain the new images from your 
646 Added Content Supplier.
647
648
649 === Configure a Custom Image for Missing Images ===
650
651 You can configure a "no image" image other than the standard 1-pixel
652 blank image.  The example eg_vhost.conf file provides examples in the
653 comments.  Note: Evergreen does not provide default images for these.
654
655
656 == Including Locally Hosted Content in Your Public Interface ==
657
658 It is also possible to show added content that has been generated locally 
659 by placing the content in a specific spot on the web server.  It is 
660 possible to have local book jackets, reviews, TOC, excerpts or annotations.
661
662 === File Location and Format ===
663
664 By default the files will need to be placed in directories under 
665 */openils/var/web/opac/extras/ac/* on the server(s) that run Apache.
666
667 The files need to be in specific folders depending on the format of the 
668 added content.  Local Content can only be looked up based on the 
669 record ID at this time.
670
671 .URL Format:
672 \http://catalog/opac/extras/ac/*\{type}/\{format}/r/\{recordid}*
673
674  * *type* is one of *jacket*, *reviews*, *toc*, *excerpt* or *anotes*.
675   * *format* is type dependent:
676     - for jacket, one of small, medium or large
677     - others, one of html, xml or json ... html is the default for non-image added content
678   * *recordid* is the bibliographic record id (bre.id).
679
680 === Example ===
681
682 If you have some equipment that you are circulating such as a 
683 laptop or eBook reader and you want to add an image of the equipment 
684 that will show up in the catalog.
685
686 [NOTE]
687 =============
688 If you are adding jacket art for a traditional type of media 
689 (book, CD, DVD) consider adding the jacket art to the http://openlibrary.org 
690 project instead of hosting it locally.  This would allow other 
691 libraries to benefit from your work.
692 =============
693
694 Make note of the Record ID of the bib record.  You can find this by 
695 looking at the URL of the bib in the catalog.  
696 http://catalog/eg/opac/record/*123*, 123 is the record ID.  
697 These images will only show up for one specific record.
698
699 Create 3 different sized versions of the image in png or jpg format.
700
701  * *Small* - 80px x 80px - named _123-s.jpg_ or _123-s.png_ - This is displayed in the browse display.
702  * *Medium* - 240px x 240px - named _123-m.jpg_ or _123-m.png_ - This is displayed on the summary page.
703  * *Large* - 400px x 399px - named _123-l.jpg_ or _123-l.png_ - This is displayed if the summary page image is clicked on.
704
705 [NOTE] 
706 The image dimensions are up to you, use what looks good in your catalog.
707  
708 Next, upload the images to the evergreen server(s) that run apache, 
709 and move/rename the files to the following locations/name.  
710 You will need to create directories that are missing.
711  
712  * Small - Move the file *123-s.jpg* to */openils/var/web/opac/extras/ac/jacket/small/r/123*
713  * Medium - Move the file *123-m.jpg* to */openils/var/web/opac/extras/ac/jacket/medium/r/123*.
714  * Large - Move the file *123-l.jpg* to */openils/var/web/opac/extras/ac/jacket/large/r/123*.
715
716 [NOTE]
717 The system doesn't need the file extension to know what kind of file it is.
718  
719 Reload the bib record summary in the web catalog and your new image will display.
720
721 [NOTE]
722 As of version 3.9, staff with appropriate permissions can directly add images to a bibliographic record. These images are stored locally. For more information, see xref:cataloging:cover_image_upload.adoc[Cover Image Uploader].
723
724 == Styling the searchbar on the homepage ==
725
726 The `.searchbar-home` class is added to the div that
727 contains the searchbar when on the homepage.  This allows
728 sites to customize the searchbar differently on the
729 homepage than in search results pages, and other places the
730 search bar appears.  For example, adding the following CSS
731 would create a large, Google-style search bar on the homepage only:
732
733 [source,css]
734 ----
735 .searchbar-home .search-box {
736   width: 80%;
737   height: 3em;
738 }
739
740 .searchbar-home #search_qtype_label,
741 .searchbar-home #search_itype_label,
742 .searchbar-home #search_locg_label {
743   display:none;
744 }
745 ----
746