aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/settings.php5
-rw-r--r--languages/en.php5
-rw-r--r--views/default/tidypics/forms/admin.php43
3 files changed, 44 insertions, 9 deletions
diff --git a/actions/settings.php b/actions/settings.php
index 2c043426f..427ca2520 100644
--- a/actions/settings.php
+++ b/actions/settings.php
@@ -17,6 +17,11 @@
}
+ if (get_input('download_link') == true)
+ error_log('download link is on');
+ if (get_input('tagging') == true)
+ error_log('tagging is on');
+
system_message(elgg_echo('tidypics:settings:save:ok'));
forward($_SERVER['HTTP_REFERER']);
diff --git a/languages/en.php b/languages/en.php
index 3d8216bb8..ffa13b3a2 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -20,7 +20,10 @@
'item:object:image' => "Photos",
'item:object:album' => "Albums",
'tidypics:adminsettings' => 'Tidypics Settings',
- 'tidypics:settings:download_link' => "Show download link:",
+ 'tidypics:admin:instructions' => 'These are the core Tidypics settings. Change them for your setup and then click save.',
+ 'tidypics:settings:image_lib' => "Image Library: ",
+ 'tidypics:settings:download_link' => "Show download link",
+ 'tidypics:settings:tagging' => "Enable photo tagging",
'tidypics:settings:maxfilesize' => "Maximum file 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/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php
index 7e1c2bf53..69089c877 100644
--- a/views/default/tidypics/forms/admin.php
+++ b/views/default/tidypics/forms/admin.php
@@ -12,11 +12,11 @@
$action = $vars['url'] . 'action/tidypics/settings';
$plugin = find_plugin_settings('tidypics');
-
- $image_lib = $plugin->image_lib;
- if (!$image_lib) $image_lib = 'GD';
+
// Image Library
+ $image_lib = $plugin->image_lib;
+ if (!$image_lib) $image_lib = 'GD';
$form_body = 'Not functional!!!!!!! <p>' . elgg_echo('tidypics:settings:image_lib');
$form_body .= elgg_view('input/pulldown', array(
'internalname' => 'params[image_lib]',
@@ -29,19 +29,46 @@
));
$form_body .= '</p>';
+ // Image Magick Path
+ $im_path = $plugin->im_path;
+ if(!$im_path) $im_path = "/usr/bin/";
+ $form_body .= "<p>" . elgg_echo('tidypics:settings:im_path') . "<br />";
+ $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "</p>";
+
// Tagging
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => true), 'internalname' => 'tagging', 'value' => ($plugin->tagging ? true : false) )) . "</p>";
+ $tagging = $tagging;
+ if(!$tagging) $tagging = "enabled";
+ $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => true), 'internalname' => 'tagging', 'value' => ($tagging=='enabled' ? true : false) )) . "</p>";
// Download Link
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download') => true), 'internalname' => 'download_link', 'value' => ($plugin->download_link ? true : false) )) . "</p>";
+ $download_link = $download_link;
+ if(!$download_link) $download_link = "enabled";
+ $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => true), 'internalname' => 'download_link', 'value' => ($download_link=='enabled' ? true : false) )) . "</p>";
// Watermark Text
$form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->$watermark_text)) . "</p>";
+ $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>";
// Max Image Size
- $form_body .= "<p>" . elgg_echo('tidypics:settings:img_size') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $plugin->$maxfilesize)) . "</p>";
+ $maxfilesize = $plugin->maxfilesize;
+ if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB
+ $form_body .= "<p>" . elgg_echo('tidypics:settings:maxfilesize') . "<br />";
+ $form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "</p>";
+
+ // River options
+ $river_view = $plugin->river_view;
+ if (!$river_view) $river_view = '1';
+ $form_body .= '<p>' . elgg_echo('tidypics:settings:river_view');
+ $form_body .= elgg_view('input/pulldown', array(
+ 'internalname' => 'params[river_view]',
+ 'options_values' => array(
+ 'all' => 'all',
+ '1' => '1',
+ 'none' => 'none',
+ ),
+ 'value' => $river_view
+ ));
+ $form_body .= '</p>';
// Thumbnail sizes