aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/admin/settings.php6
-rw-r--r--languages/en.php1
-rw-r--r--pages/upload.php7
-rw-r--r--views/default/tidypics/forms/settings.php7
4 files changed, 20 insertions, 1 deletions
diff --git a/actions/admin/settings.php b/actions/admin/settings.php
index 2c529d950..d3801f655 100644
--- a/actions/admin/settings.php
+++ b/actions/admin/settings.php
@@ -51,6 +51,12 @@ if (is_array(get_input('view_count'))) {
set_plugin_setting('view_count', 'disabled', 'tidypics');
}
+if (is_array(get_input('uploader'))) {
+ set_plugin_setting('uploader', 'enabled', 'tidypics');
+} else {
+ set_plugin_setting('uploader', 'disabled', 'tidypics');
+}
+
if (is_array(get_input('grp_perm_override'))) {
set_plugin_setting('grp_perm_override', 'enabled', 'tidypics');
} else {
diff --git a/languages/en.php b/languages/en.php
index fce4b392a..d9c9a302b 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -71,6 +71,7 @@ $english = array(
'tidypics:settings:photo_ratings' => "Enable photo ratings (requires rate plugin of Miguel Montes or compatible)",
'tidypics:settings:exif' => "Show EXIF data",
'tidypics:settings:view_count' => "View counter",
+ 'tidypics:settings:uploader' => "Use Flash uploader",
'tidypics:settings:grp_perm_override' => "Allow group members full access to group albums",
'tidypics:settings:maxfilesize' => "Maximum image size in megabytes (MB):",
'tidypics:settings:quota' => "User/Group Quota (MB) - 0 equals no quota",
diff --git a/pages/upload.php b/pages/upload.php
index b6a828cf9..7ac4930b5 100644
--- a/pages/upload.php
+++ b/pages/upload.php
@@ -14,7 +14,12 @@ if (!$album_guid) {
forward();
}
-$uploader = get_input('uploader', 'ajax');
+if (get_plugin_setting('uploader', 'tidypics') != "disabled") {
+ $uploader = get_input('uploader', 'ajax');
+} else {
+ $uploader = 'basic';
+}
+
$album = get_entity($album_guid);
diff --git a/views/default/tidypics/forms/settings.php b/views/default/tidypics/forms/settings.php
index c8a1b4bd9..5eae9becc 100644
--- a/views/default/tidypics/forms/settings.php
+++ b/views/default/tidypics/forms/settings.php
@@ -48,6 +48,13 @@ if (!$view_count) {
}
$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "</p>";
+// Use flash uploader
+$uploader = $plugin->uploader;
+if (!$uploader) {
+ $uploader = "enabled";
+}
+$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:uploader') => 'enabled'), 'internalname' => 'uploader', 'value' => $uploader )) . "</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>";