aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-07 21:27:47 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-07 21:27:47 +0000
commit4c9f7458a2c6be523dc98cdb9e94af3242a16b9c (patch)
treea7cc859f6fc16f43b446a49779297f1d3536258b
parent28de8d490b284551867be1153747c29a8d59b13c (diff)
downloadelgg-4c9f7458a2c6be523dc98cdb9e94af3242a16b9c.tar.gz
elgg-4c9f7458a2c6be523dc98cdb9e94af3242a16b9c.tar.bz2
added option for turning off ratings
-rw-r--r--actions/settings.php9
-rw-r--r--languages/en.php1
-rw-r--r--views/default/object/image.php9
-rw-r--r--views/default/tidypics/forms/admin.php5
4 files changed, 19 insertions, 5 deletions
diff --git a/actions/settings.php b/actions/settings.php
index 23fade8d9..903802dd8 100644
--- a/actions/settings.php
+++ b/actions/settings.php
@@ -25,13 +25,18 @@
set_plugin_setting('download_link', 'enabled', 'tidypics');
else
set_plugin_setting('download_link', 'disabled', 'tidypics');
-
+
if (is_array(get_input('tagging')))
set_plugin_setting('tagging', 'enabled', 'tidypics');
else
set_plugin_setting('tagging', 'disabled', 'tidypics');
- if (is_array(get_input('exif')))
+ if (is_array(get_input('photo_ratings')))
+ set_plugin_setting('photo_ratings', 'enabled', 'tidypics');
+ else
+ set_plugin_setting('photo_ratings', 'disabled', 'tidypics');
+
+ if (is_array(get_input('exif')))
set_plugin_setting('exif', 'enabled', 'tidypics');
else
set_plugin_setting('exif', 'disabled', 'tidypics');
diff --git a/languages/en.php b/languages/en.php
index 8adcd7577..b85ca205b 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:photo_ratings' => "Enable photo ratings (requires rate plugin of Miguel Montes or comptabile)",
'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):",
diff --git a/views/default/object/image.php b/views/default/object/image.php
index 21ee3ff1d..ebac9c775 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -200,12 +200,15 @@ if ($photo_tags) {
<div id="tidypics_info">
<?php if (!is_null($tags)) { ?>
<div class="object_tag_string"><?php echo elgg_view('output/tags',array('value' => $tags));?></div>
-<?php } ?>
-<div id="rate_container">
+<?php }
+ if (get_plugin_setting('photo_ratings', 'tidypics') != "disabled") {
+?>
+ <div id="rate_container">
<?php echo elgg_view('rate/rate', array('entity'=> $vars['entity'])); ?>
</div>
<?
-
+ }
+
echo elgg_echo('image:by');?> <b><a href="<?php echo $vars['url']; ?>pg/profile/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b> <?php echo $friendlytime;
?>
</div>
diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php
index 64e1ed3d1..c5d71409c 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 .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "</p>";
+ // Download Link
+ $photo_ratings = $plugin->photo_ratings;
+ if(!$photo_ratings) $photo_ratings = "disabled";
+ $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "</p>";
+
// Show EXIF
$exif = $plugin->exif;
if(!$exif) $exif = "disabled";