Browse Source

Test and add configuration.

pull/126/head
Adam Vessey 13 years ago
parent
commit
8bd4b29e38
  1. 3
      fedora_repository.module
  2. 15
      formClass.inc

3
fedora_repository.module

@ -2426,7 +2426,8 @@ function _fedora_repository_render_image($tn_path, $imagecache_preset = 'fedora_
if ($thumbnail === NULL &&
module_exists('imagecache_external') &&
is_callable('theme_imagecache_external_image') &&
variable_get('fedora_repository_use_imagecache_external_in_collection_view', FALSE)) {
variable_get('fedora_repository_use_imagecache_external_in_collection_view', FALSE) &&
imagecache_external_can_fetch($tn_path, TRUE)) {
$thumbnail = theme('imagecache_external_image', $imagecache_preset, $tn_path, $truncated_title, $title);
}
if ($thumbnail === NULL) {

15
formClass.inc

@ -324,6 +324,21 @@ class formClass {
'#description' => t('When enabled, restricts access to fedora object datastreams that are not listed in the Islandora Content Model for the object (unless the user is an administrator).'),
);
$form['advanced']['fedora_repository_use_imagecache_external_in_collection_view'] = array(
'#type' => 'checkbox',
'#title' => t('Allow imagecache_external use for thumbnails in collection view'),
'#default_value' => variable_get('fedora_repository_use_imagecache_external_in_collection_view', FALSE),
'#description' => t('If enabled, the default collection list view (or ' .
'anywhere the function "@function" is used) will try to use ' .
'imagecache_external, defaulting to the "@preset" preset. Note that ' .
'this means it will NOT (currently) work with collections rendered via "@xsl".',
array(
'@function' => '_fedora_repository_render_image()',
'@preset' => 'fedora_repository_collection_thumbnail',
'@xsl' => 'sparql_to_html.xsl',
)),
);
$form['advanced']['fedora_collection_display_list'] = array(
'#type' => 'select',
'#title' => t('Display Collection List Behaviour'),

Loading…
Cancel
Save