From e6728ce892f06633827264e3b47e1f7bcebae780 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 27 Mar 2009 12:00:43 +0000 Subject: can now enable/disable photo albums for groups --- languages/en.php | 2 +- start.php | 9 ++++++--- views/default/tidypics/groupprofile_albums.php | 4 ++++ 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 @@ 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 ""; +} ?> \ No newline at end of file -- cgit v1.2.3