From e27ccb1e590a68d9f9cf90612dc37237f1f6cb01 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 28 Aug 2015 08:35:30 -0400 Subject: [PATCH] Adjusted configuration setting/comments. --- config/vufind/config.ini | 24 +++++++++---------- .../src/VuFind/View/Helper/Root/OpenUrl.php | 8 +++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/config/vufind/config.ini b/config/vufind/config.ini index b67567b724e..aa43cf35834 100644 --- a/config/vufind/config.ini +++ b/config/vufind/config.ini @@ -745,9 +745,18 @@ window_settings = "toolbar=no,location=no,directories=no,buttons=no,status=no,me ; If you want to display a graphical link to your link resolver, uncomment the ; settings below. graphic should be a URL; graphic_width and graphic_height ; should be sizes in pixels. -; graphic = "http://myuniversity.edu/images/findIt.gif" -; graphic_width = 50 -; graphic_height = 20 +;graphic = "http://myuniversity.edu/images/findIt.gif" +;graphic_width = 50 +;graphic_height = 20 + +; If your link resolver can render an image in response to an OpenURL, you can +; specify the base URL for image generation here: +;dynamic_graphic = "http://my-link-resolver/image" + +; If dynamic_graphic is set above, the dynamic image can be used instead of the +; standard text or static-image-based OpenURL link (true), it can be disabled +; (false), or it can be displayed in addition to the regular link ("both"). +;image_based_linking_mode = both ; The following settings control where OpenURL links are displayed: show_in_results = true ; include in search results @@ -782,15 +791,6 @@ embed_auto_load = false ; URLs associated with a record (true) or IN ADDITION TO other URLs (false). replace_other_urls = true -; If your link resolver can render an image in response to an OpenURL, you can -; specify the base URL for image generation here: -;dynamic_image_url = "http://my-link-resolver/image" - -; If dynamic_image_url is set above, this setting controls how image-based links are -; used. True = display them instead of regular OpenURL links; false = disable them; -; "both" = display both image and regular links. -;image_based_linking_mode = both - ; EZproxy is optional. This section only needs to exist if you ; are using EZProxy to provide off-site access to online materials. ;[EZproxy] diff --git a/module/VuFind/src/VuFind/View/Helper/Root/OpenUrl.php b/module/VuFind/src/VuFind/View/Helper/Root/OpenUrl.php index 66b024f539a..83eb8c27bdf 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/OpenUrl.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/OpenUrl.php @@ -124,13 +124,13 @@ class OpenUrl extends \Zend\View\Helper\AbstractHelper $imagebasedopenurl = null; if ($imagebased) { - if (!isset($this->config->dynamic_image_url)) { + if (!isset($this->config->dynamic_graphic)) { // if imagebased linking is forced by the template, but it is not // configured properly, throw an exception throw new \Exception( 'Template tries to display OpenURL as image based link, but Image based linking is not configured! Please set parameter - dynamic_image_url in config file.' + dynamic_graphic in config file.' ); } @@ -141,7 +141,7 @@ class OpenUrl extends \Zend\View\Helper\AbstractHelper // Concatenate image based OpenUrl base and OpenUrl // to a usable image reference - $base = $this->config->dynamic_image_url; + $base = $this->config->dynamic_graphic; $imageOpenUrl = $params['openUrlImageBasedOverride'] ? $params['openUrlImageBasedOverride'] : $params['openUrl']; $params['openUrlImageBasedSrc'] = $base @@ -239,7 +239,7 @@ class OpenUrl extends \Zend\View\Helper\AbstractHelper */ public function imageBasedLinkingIsActive() { - return isset($this->config->dynamic_image_url); + return isset($this->config->dynamic_graphic); } /** -- GitLab