From 8ef053df0c982c2e2ffddc04a89b578ec36ec969 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 6 Jun 2009 20:14:42 +0000 Subject: added admin setting for exif --- actions/settings.php | 5 +++++ languages/en.php | 1 + views/default/object/image.php | 3 +++ views/default/tidypics/forms/admin.php | 5 +++++ 4 files changed, 14 insertions(+) diff --git a/actions/settings.php b/actions/settings.php index 29a77577f..79839ceef 100644 --- a/actions/settings.php +++ b/actions/settings.php @@ -31,6 +31,11 @@ else set_plugin_setting('tagging', 'disabled', 'tidypics'); + if (is_array(get_input('exif'))) + set_plugin_setting('exif', 'enabled', 'tidypics'); + else + set_plugin_setting('exif', 'disabled', 'tidypics'); + // image sizes $image_sizes = array(); diff --git a/languages/en.php b/languages/en.php index 6b2281110..863fe554e 100644 --- a/languages/en.php +++ b/languages/en.php @@ -44,6 +44,7 @@ 'tidypics:settings:image_lib' => "Image Library: ", 'tidypics:settings:download_link' => "Show download link", 'tidypics:settings:tagging' => "Enable photo tagging", + 'tidypics:settings:exif' => "Show EXIF data", 'tidypics:settings:maxfilesize' => "Maximum image size in megabytes (MB):", 'tidypics:settings:watermark' => "Enter text to appear in the watermark - ImageMagick must be selected for the image library", 'tidypics:settings:im_path' => "Enter the path to your ImageMagick commands", diff --git a/views/default/object/image.php b/views/default/object/image.php index 5787bb39f..21ee3ff1d 100644 --- a/views/default/object/image.php +++ b/views/default/object/image.php @@ -187,6 +187,8 @@ if ($photo_tags) { 'owner' => $owner, ) ); } + + if (get_plugin_setting('exif', 'tidypics') != "disabled") { ?>
+
$tags));?>
diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php index c5e7c68d0..d4c9e1b5b 100644 --- a/views/default/tidypics/forms/admin.php +++ b/views/default/tidypics/forms/admin.php @@ -45,6 +45,11 @@ if(!$download_link) $download_link = "enabled"; $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "

"; + // Show EXIF + $exif = $plugin->exif; + if(!$exif) $exif = "disabled"; + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "

"; + // Watermark Text $form_body .= "

" . elgg_echo('tidypics:settings:watermark') . "
"; $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "

"; -- cgit v1.2.3