aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-21 13:53:40 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-21 13:53:40 +0000
commitf162f786a0b152e37eed2b0e4ec89b51958ac023 (patch)
tree3938d09fca99d939e85cac451bb387907e88448c
parentfef76848f2e6f52d5f4941b9b519aadf996070cf (diff)
downloadelgg-f162f786a0b152e37eed2b0e4ec89b51958ac023.tar.gz
elgg-f162f786a0b152e37eed2b0e4ec89b51958ac023.tar.bz2
improved group code including river view
-rw-r--r--actions/upload.php17
-rw-r--r--languages/en.php3
-rw-r--r--views/default/river/object/album/create.php9
-rw-r--r--views/default/tidypics/css.php2
-rw-r--r--views/default/tidypics/groupprofile_albums.php8
5 files changed, 28 insertions, 11 deletions
diff --git a/actions/upload.php b/actions/upload.php
index 1b8776075..65005671a 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -190,7 +190,14 @@
// update user/group size for checking quota
$image_repo_size += $sent_file['size'];
- if($img_river_view == "all") {
+ // successful upload so check if this is a new album and throw river event if so
+ if ($album->new_album == TP_NEW_ALBUM) {
+ if (function_exists('add_to_river'))
+ add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
+ $album->new_album = TP_OLD_ALBUM;
+ }
+
+ if ($img_river_view == "all") {
add_to_river('river/object/image/create', 'create', $file->getObjectOwnerGUID(), $file->getGUID());
}
unset($file); // may not be needed but there seems to be a memory leak
@@ -218,14 +225,8 @@
system_message(elgg_echo('tidypics:upl_success'));
}
- // successful upload so check if this is a new album and throw river event if so
- if ($album->new_album == TP_NEW_ALBUM) {
- if (function_exists('add_to_river'))
- add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
- $album->new_album = TP_OLD_ALBUM;
- }
- if(count($uploaded_images) && $img_river_view == "1") {
+ if (count($uploaded_images) && $img_river_view == "1") {
if (function_exists('add_to_river')) {
add_to_river('river/object/image/create', 'create', $file_for_river->getObjectOwnerGUID(), $file_for_river->getGUID());
}
diff --git a/languages/en.php b/languages/en.php
index e0201dc46..fb7fa7182 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -124,7 +124,8 @@
'image:river:annotate' => "a comment on the image",
//albums
- 'album:river:created' => "%s created a new photo album: ",
+ 'album:river:created' => "%s created a new photo album",
+ 'album:river:group' => "in the group",
'album:river:item' => "an album",
'album:river:annotate' => "a comment on the photo album",
diff --git a/views/default/river/object/album/create.php b/views/default/river/object/album/create.php
index e4e2ce4bb..9c2486fa2 100644
--- a/views/default/river/object/album/create.php
+++ b/views/default/river/object/album/create.php
@@ -3,9 +3,18 @@
$performed_by = get_entity($vars['item']->subject_guid);
$album = get_entity($vars['item']->object_guid);
+ $group_album = ($album->owner_guid != $album->container_guid);
+ if ($group_album) {
+ $group = get_entity($album->container_guid);
+ $group_name = $group->name;
+ $group_link = $group->getURL();
+ }
+
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("album:river:created"),$url) . " ";
$string .= "<a href=\"" . $album->getURL() . "\">" . $album->title . "</a>";
+ if ($group_album)
+ $string .= ' ' . elgg_echo('album:river:group') . ' ' . "<a href=\"{$group_link}\" >{$group_name}</a>";
$album_river_view = get_plugin_setting('album_river_view', 'tidypics');
diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php
index 3ade75ff4..440edb5ab 100644
--- a/views/default/tidypics/css.php
+++ b/views/default/tidypics/css.php
@@ -147,7 +147,7 @@ font-size:1em;
/* ---- tidypics group css ----- */
-#group_albums_widget {
+#tidypics_group_profile {
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
background:white none repeat scroll 0 0;
diff --git a/views/default/tidypics/groupprofile_albums.php b/views/default/tidypics/groupprofile_albums.php
index 060c540d4..7f28705c7 100644
--- a/views/default/tidypics/groupprofile_albums.php
+++ b/views/default/tidypics/groupprofile_albums.php
@@ -1,7 +1,13 @@
<?php
+/***********************************************
+ *
+ * This is used on the group profile page
+ *
+ ***********************************************/
+
if ($vars['entity']->photos_enable != 'no') {
- echo '<div id="group_albums_widget">';
+ echo '<div id="tidypics_group_profile">';
echo '<h2>' . elgg_echo('album:group') . '</h2>';
echo elgg_view('tidypics/albums', array('num_albums' => 5));
echo '</div>';