aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/addalbum.php10
-rw-r--r--languages/en.php6
-rw-r--r--views/default/river/object/album/create.php15
-rw-r--r--views/default/tidypics/css.php9
4 files changed, 32 insertions, 8 deletions
diff --git a/actions/addalbum.php b/actions/addalbum.php
index f2d423abd..23fdfd22d 100644
--- a/actions/addalbum.php
+++ b/actions/addalbum.php
@@ -38,12 +38,12 @@
// Set its owner to the current user
$album->container_guid = $container_guid;
$album->owner_guid = $_SESSION['user']->getGUID();
- // For now, set its access to public (we'll add an access dropdown shortly)
$album->access_id = $access;
// Set its title and description appropriately
$album->title = $title;
$album->description = $body;
- // Before we can set metadata, we need to save the blog post
+
+ // Before we can set metadata, we need to save the album
if (!$album->save()) {
register_error(elgg_echo("album:error"));
forward(get_input('forward_url', $_SERVER['HTTP_REFERER'])); //failed, so forward to previous page
@@ -53,8 +53,14 @@
if (is_array($tagarray)) {
$album->tags = $tagarray;
}
+
+ // add to river (check to make sure we're running > Elgg 1.5 first)
+ if (function_exists('add_to_river'))
+ add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
+
// Success message
system_message(elgg_echo("album:created"));
+
// Remove the album post cache
unset($_SESSION['albumtitle']);
unset($_SESSION['albumbody']);
diff --git a/languages/en.php b/languages/en.php
index 7e8d67f39..90c2c8b5a 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -67,12 +67,12 @@
//images
'image:river:created' => "%s uploaded",
'image:river:item' => "an image",
- 'image:river:annotate' => "%s commented on",
+ 'image:river:annotate' => "a comment on the image",
//albums
- 'album:river:created' => "%s created",
+ 'album:river:created' => "%s created a new photo album: ",
'album:river:item' => "an album",
- 'album:river:annotate' => "%s commented on",
+ 'album:river:annotate' => "a comment on the photo album",
// Status messages
diff --git a/views/default/river/object/album/create.php b/views/default/river/object/album/create.php
index 68553309c..fcc87277d 100644
--- a/views/default/river/object/album/create.php
+++ b/views/default/river/object/album/create.php
@@ -1,13 +1,22 @@
<?php
+if (function_exists('add_to_river')) { // Elgg 1.5
+ $performed_by = get_entity($vars['item']->subject_guid);
+ $album = get_entity($vars['item']->object_guid);
+
+ $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>";
+} else { // Elgg 1.2
$statement = $vars['statement'];
$performed_by = $statement->getSubject();
$object = $statement->getObject();
-
+
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("album:river:created"),$url) . " ";
- $string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("album:river:item") . "</a>";
+ $string .= "<a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+}
- echo $string;
+echo $string;
?> \ No newline at end of file
diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php
index a682ff677..c1957d5d9 100644
--- a/views/default/tidypics/css.php
+++ b/views/default/tidypics/css.php
@@ -121,6 +121,15 @@
.river_album_create {
background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_album.gif) no-repeat left -1px;
}
+.river_object_album_create {
+ background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_album.gif) no-repeat left -1px;
+}
+.river_object_image_comment {
+ background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px;
+}
+.river_object_album_comment {
+ background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px;
+}
.pagination {
clear:both !important;