// update user/group size for checking quota\r
$image_repo_size += $sent_file['size'];\r
\r
- if($img_river_view == "all") {\r
+ // successful upload so check if this is a new album and throw river event if so\r
+ if ($album->new_album == TP_NEW_ALBUM) {\r
+ if (function_exists('add_to_river'))\r
+ add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);\r
+ $album->new_album = TP_OLD_ALBUM;\r
+ }\r
+ \r
+ if ($img_river_view == "all") {\r
add_to_river('river/object/image/create', 'create', $file->getObjectOwnerGUID(), $file->getGUID());\r
}\r
unset($file); // may not be needed but there seems to be a memory leak\r
system_message(elgg_echo('tidypics:upl_success'));\r
}\r
\r
- // successful upload so check if this is a new album and throw river event if so\r
- if ($album->new_album == TP_NEW_ALBUM) {\r
- if (function_exists('add_to_river'))\r
- add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);\r
- $album->new_album = TP_OLD_ALBUM;\r
- }\r
\r
- if(count($uploaded_images) && $img_river_view == "1") {\r
+ if (count($uploaded_images) && $img_river_view == "1") {\r
if (function_exists('add_to_river')) {\r
add_to_river('river/object/image/create', 'create', $file_for_river->getObjectOwnerGUID(), $file_for_river->getGUID());\r
}\r
'image:river:annotate' => "a comment on the image",\r
\r
//albums\r
- 'album:river:created' => "%s created a new photo album: ",\r
+ 'album:river:created' => "%s created a new photo album",\r
+ 'album:river:group' => "in the group",\r
'album:river:item' => "an album",\r
'album:river:annotate' => "a comment on the photo album",\r
\r
$performed_by = get_entity($vars['item']->subject_guid);\r
$album = get_entity($vars['item']->object_guid);\r
\r
+ $group_album = ($album->owner_guid != $album->container_guid);\r
+ if ($group_album) {\r
+ $group = get_entity($album->container_guid);\r
+ $group_name = $group->name;\r
+ $group_link = $group->getURL();\r
+ }\r
+ \r
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";\r
$string = sprintf(elgg_echo("album:river:created"),$url) . " ";\r
$string .= "<a href=\"" . $album->getURL() . "\">" . $album->title . "</a>";\r
+ if ($group_album)\r
+ $string .= ' ' . elgg_echo('album:river:group') . ' ' . "<a href=\"{$group_link}\" >{$group_name}</a>";\r
\r
$album_river_view = get_plugin_setting('album_river_view', 'tidypics');\r
\r
/* ---- tidypics group css ----- */
-#group_albums_widget {
+#tidypics_group_profile {
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
background:white none repeat scroll 0 0;
<?php\r
\r
+/***********************************************\r
+ *\r
+ * This is used on the group profile page\r
+ *\r
+ ***********************************************/\r
+\r
if ($vars['entity']->photos_enable != 'no') {\r
- echo '<div id="group_albums_widget">';\r
+ echo '<div id="tidypics_group_profile">';\r
echo '<h2>' . elgg_echo('album:group') . '</h2>';\r
echo elgg_view('tidypics/albums', array('num_albums' => 5));\r
echo '</div>';\r