]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
improved group code including river view
authorCash Costello <cash.costello@gmail.com>
Sun, 21 Jun 2009 13:53:40 +0000 (13:53 +0000)
committerCash Costello <cash.costello@gmail.com>
Sun, 21 Jun 2009 13:53:40 +0000 (13:53 +0000)
actions/upload.php
languages/en.php
views/default/river/object/album/create.php
views/default/tidypics/css.php
views/default/tidypics/groupprofile_albums.php

index 1b877607523e47d2f4bca52cb8529bede39018b6..65005671af0a1e369226c00305737c1f9d373dfb 100644 (file)
                // 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
index e0201dc4619ab40b572bd93720c8d19294f43146..fb7fa7182b49efbe4e7c33e11b61bd7049db8b98 100644 (file)
                        '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
index e4e2ce4bba7144e76f984a29d3a6684e8b2f51b8..9c2486fa2b9e707e192dddc2a2212825659e0904 100644 (file)
@@ -3,9 +3,18 @@
        $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
index 3ade75ff4dc37588989d33b98dfcbe251b30e50f..440edb5ab4019f401952a93d6e218578c816ac35 100644 (file)
@@ -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;
index 060c540d41839a0a592705b55bfc832ea0faf0dc..7f28705c7b4446c9b78e0454a0c2fa4bb6486e3c 100644 (file)
@@ -1,7 +1,13 @@
 <?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