Skip to content
Snippets Groups Projects
Commit e27ccb1e authored by Demian Katz's avatar Demian Katz
Browse files

Adjusted configuration setting/comments.

parent 1dd6ddb5
Branches
Tags
No related merge requests found
......@@ -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]
......
......@@ -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);
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment