aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-14 22:29:02 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-14 22:29:02 +0000
commitde4945a1bb1b627a530048c7dece50805d06f1ee (patch)
treeeda6ce8951ba37fdc43af3aeca1e2b5f81a6871a
parent1681015db9a4c9d91337f634b6f2c20a63a549f1 (diff)
downloadelgg-de4945a1bb1b627a530048c7dece50805d06f1ee.tar.gz
elgg-de4945a1bb1b627a530048c7dece50805d06f1ee.tar.bz2
highest ratings submenu controlled by plugin settings
-rw-r--r--views/default/object/album.php9
-rw-r--r--views/default/tidypics/forms/admin.php2
2 files changed, 7 insertions, 4 deletions
diff --git a/views/default/object/album.php b/views/default/object/album.php
index 9a34e3d5f..1e8ff9dc9 100644
--- a/views/default/object/album.php
+++ b/views/default/object/album.php
@@ -60,9 +60,12 @@
// individual album view
$page = get_input("page");
list($album_placeholder, $album_id, $album_title) = split("/", $page);
- add_submenu_item( elgg_echo("tidypics:highestrated"),
- $CONFIG->wwwroot . "pg/photos/highestrated/group:" . $album_id,
- 'photos');
+
+ $photo_ratings = get_plugin_setting('photo_ratings', 'tidypics');
+ if ($photo_ratings == "enabled")
+ add_submenu_item( elgg_echo("tidypics:highestrated"),
+ $CONFIG->wwwroot . "pg/photos/highestrated/group:" . $album_id,
+ 'photos');
?>
<div class="contentWrapper">
<div id="tidypics_breadcrumbs">
diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php
index a67d320d5..564b89987 100644
--- a/views/default/tidypics/forms/admin.php
+++ b/views/default/tidypics/forms/admin.php
@@ -45,7 +45,7 @@
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
+ // Ratings
$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>";