@@ -, +, @@ https://github.com/fredericd/coce - CoceHost - URL of Coce server - CoceProviders - Ordered list of requested providers. For example gb,aws,ol, will return the first available URL from those providers. - If a book cover is not available from a provider, but is available from another one, Koha will be able to display a book cover, which isn't the case now - Since URLs are cached, it isn't necessary for each book cover to request, again and again, the provider, and several of them if necessary. - Amazon book covers are retrieved with Amazon Product Advertising API, which means that more covers are retrieved (ISBN13). - Apply this patch, and test with 'Bootstrap' themes - You can verify that nothing has changed on OPAC result and detail page, since new syspref haven't been filled - Install Code: https://github.com/fredericd/coce Or ask me directly for the URL of a Coce server - In sysprefs, tab Enhanced content, modify: CoceHost -- enter the URL of your Coce server CoceProviders -- fill with: gb,aws,ol - Do a search. On result page, and detail page, you will see cover images originating from the 3 providers: fly over the image to see its URL. Try to compare with a Koha with just GoogleJacket or Amazon cover to confirm that you have more images. Verify that it's quick, and even quicker for cached images URLs. --- C4/Auth.pm | 2 ++ .../admin/preferences/enhanced_content.pref | 9 +++++ .../bootstrap/en/includes/opac-bottom.inc | 9 +++++ .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 7 ++++ .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 9 +++++ .../opac-tmpl/prog/en/includes/doc-head-close.inc | 3 ++ koha-tmpl/opac-tmpl/prog/en/js/coce.js | 42 ++++++++++++++++++++++ 7 files changed, 81 insertions(+) create mode 100644 koha-tmpl/opac-tmpl/prog/en/js/coce.js --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -351,6 +351,8 @@ sub get_template_and_user { "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), GoogleJackets => C4::Context->preference("GoogleJackets"), + CoceHost => C4::Context->preference("CoceHost"), + CoceProviders => C4::Context->preference("CoceProviders"), OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:undef), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref @@ -337,3 +337,12 @@ Enhanced Content: - "Show items from the OverDrive catalog of library #" - pref: OverDriveLibraryID - . + Coce Cover images cache: + - + - Coce server URL + - pref: CoceHost + class: url + - + - Providers + - pref: CoceProviders + - 'separated by comma, for example: aws,gb. Leave empty not to activate this service.' --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -166,6 +166,15 @@ $.widget.bridge('uitooltip', $.ui.tooltip); //]]> [% END %] +[% IF CoceProviders %] + + +[% END %] + [% IF OpenLibraryCovers %] [% END %] +[% IF CoceProviders %] + +[% END %] [% IF OpenLibraryCovers %]