aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages/en.php2
-rw-r--r--start.php9
-rw-r--r--views/default/tidypics/groupprofile_albums.php4
3 files changed, 11 insertions, 4 deletions
diff --git a/languages/en.php b/languages/en.php
index 90c2c8b5a..0ba223a8c 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -20,7 +20,7 @@
'item:object:image' => "Photos",
'item:object:album' => "Albums",
'tidypics:settings:maxfilesize' => "Maximum file size in kilo bytes (KB):",
-
+ 'tidypics:enablephotos' => 'Enable Group Photo Albums',
'tidypics:editprops' => 'Edit Image Properties',
//actions
diff --git a/start.php b/start.php
index a0162319c..660e20de5 100644
--- a/start.php
+++ b/start.php
@@ -40,6 +40,7 @@
register_entity_type('object','image');
register_entity_type('object','album');
+ add_group_tool_option('photos',elgg_echo('tidypics:enablephotos'),true);
}
/**
@@ -94,9 +95,11 @@
}
if (isloggedin() && ($page_owner instanceof ElggGroup)) {
- add_submenu_item(sprintf(elgg_echo("album:user"),$page_owner->name),
- $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username,
- 'photo_albums');
+ if ($page_owner->photos_enable != "no") {
+ add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name),
+ $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username,
+ 'photo_albums');
+ }
}
}
diff --git a/views/default/tidypics/groupprofile_albums.php b/views/default/tidypics/groupprofile_albums.php
index ea11006fa..ff63a38d1 100644
--- a/views/default/tidypics/groupprofile_albums.php
+++ b/views/default/tidypics/groupprofile_albums.php
@@ -1,4 +1,7 @@
<?php
+
+if ($vars['entity']->photos_enable != 'no') {
+
//the number of files to display
$number = (int) $vars['entity']->num_display;
//if no number has been set, default to 5
@@ -57,4 +60,5 @@
}
//close group_albums_widget div
echo "</div>";
+}
?> \ No newline at end of file