aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/settings.php5
-rw-r--r--languages/en.php1
-rw-r--r--start.php3
-rw-r--r--views/default/tidypics/forms/admin.php5
4 files changed, 13 insertions, 1 deletions
diff --git a/actions/settings.php b/actions/settings.php
index 79839ceef..23fade8d9 100644
--- a/actions/settings.php
+++ b/actions/settings.php
@@ -36,6 +36,11 @@
else
set_plugin_setting('exif', 'disabled', 'tidypics');
+ if (is_array(get_input('grp_perm_override')))
+ set_plugin_setting('grp_perm_override', 'enabled', 'tidypics');
+ else
+ set_plugin_setting('grp_perm_override', 'disabled', 'tidypics');
+
// image sizes
$image_sizes = array();
diff --git a/languages/en.php b/languages/en.php
index 863fe554e..1b760e7a7 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -45,6 +45,7 @@
'tidypics:settings:download_link' => "Show download link",
'tidypics:settings:tagging' => "Enable photo tagging",
'tidypics:settings:exif' => "Show EXIF data",
+ 'tidypics:settings:grp_perm_override' => "Allow group members full access to group albums",
'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/start.php b/start.php
index 3a78700c6..2d4d40782 100644
--- a/start.php
+++ b/start.php
@@ -49,7 +49,8 @@
if (function_exists('add_group_tool_option'))
add_group_tool_option('photos',elgg_echo('tidypics:enablephotos'),true);
- register_plugin_hook('permissions_check', 'object', 'tidypics_permission_override');
+ if (get_plugin_setting('grp_perm_override', 'tidypics') != "disabled")
+ register_plugin_hook('permissions_check', 'object', 'tidypics_permission_override');
// Register for notifications
if (is_callable('register_notification_object')) {
diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php
index af84def00..64e1ed3d1 100644
--- a/views/default/tidypics/forms/admin.php
+++ b/views/default/tidypics/forms/admin.php
@@ -96,6 +96,11 @@
$form_body .= 'height: <input style="width: 20%;" type="text" name="thumb_height" value=' . "\"{$image_sizes['thumb_image_height']}\"" . ' class="input-text" /></p>';
+ // Group permission override
+ $grp_perm_override = $plugin->grp_perm_override;
+ if(!$grp_perm_override) $grp_perm_override = "enabled";
+ $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "</p>";
+
$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); \ No newline at end of file