diff options
-rw-r--r-- | languages/en.php | 1 | ||||
-rw-r--r-- | mod/blog/views/default/river/object/blog/create.php | 12 | ||||
-rw-r--r-- | mod/bookmarks/views/default/river/object/bookmarks/create.php | 36 | ||||
-rw-r--r-- | mod/file/languages/en.php | 4 | ||||
-rw-r--r-- | mod/file/views/default/river/object/file/create.php | 42 | ||||
-rw-r--r-- | mod/groups/languages/en.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/river/group/create.php | 33 |
7 files changed, 77 insertions, 53 deletions
diff --git a/languages/en.php b/languages/en.php index f30f8ffd7..9ce523a4e 100644 --- a/languages/en.php +++ b/languages/en.php @@ -385,6 +385,7 @@ $english = array( 'river:posted:generic' => '%s posted', 'riveritem:single:user' => 'a user', 'riveritem:plural:user' => 'some users', + 'river:ingroup' => 'to the group %s', /** * Notifications diff --git a/mod/blog/views/default/river/object/blog/create.php b/mod/blog/views/default/river/object/blog/create.php index 9dc0ffdac..bd2405d42 100644 --- a/mod/blog/views/default/river/object/blog/create.php +++ b/mod/blog/views/default/river/object/blog/create.php @@ -13,10 +13,20 @@ $params = array( ); $link = elgg_view('output/url', $params); +$group_string = ''; +$container = $object->getContainerEntity(); +if ($container instanceof ElggGroup) { + $params = array( + 'href' => $container->getURL(), + 'text' => $container->name, + ); + $group_link = elgg_view('output/url', $params); + $group_string = elgg_echo('river:ingroup', array($group_link)); +} echo elgg_echo('blog:river:create'); -echo " $link"; +echo " $link $group_string"; if ($excerpt) { echo '<div class="elgg-river-content">'; diff --git a/mod/bookmarks/views/default/river/object/bookmarks/create.php b/mod/bookmarks/views/default/river/object/bookmarks/create.php index f30097dd9..bd07db089 100644 --- a/mod/bookmarks/views/default/river/object/bookmarks/create.php +++ b/mod/bookmarks/views/default/river/object/bookmarks/create.php @@ -13,35 +13,23 @@ $params = array( ); $link = elgg_view('output/url', $params); +$group_string = ''; +$container = $object->getContainerEntity(); +if ($container instanceof ElggGroup) { + $params = array( + 'href' => $container->getURL(), + 'text' => $container->name, + ); + $group_link = elgg_view('output/url', $params); + $group_string = elgg_echo('river:ingroup', array($group_link)); +} + echo elgg_echo('bookmarks:river:create'); -echo " $link"; +echo " $link $group_string"; if ($excerpt) { echo '<div class="elgg-river-content">'; echo $excerpt; echo '</div>'; } - -return true; -/** - * Elgg bookmark river entry view - */ - -$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); -$object = get_entity($vars['item']->object_guid); -$is_group = get_entity($object->container_guid); -$url = $object->getURL(); -$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; -$string = elgg_echo("bookmarks:river:created", array($url)) . " "; -$string .= "<a href=\"" . $object->address . "\">" . $object->title . "</a>"; -if (($is_group instanceof ElggGroup) && (elgg_get_context() != 'groups')){ - $string .= " " . elgg_echo('bookmarks:ingroup') . " <a href=\"{$is_group->getURL()}\">" . $is_group->name . "</a>"; -} -$string .= " <span class='entity-subtext'>" . elgg_view_friendly_time($object->time_created); -if (isloggedin()){ - $string .= "<a class='river_comment_form_button link'>Comment</a>"; - $string .= elgg_view('forms/likes/link', array('entity' => $object)); -} -$string .= "</span>"; -echo $string;
\ No newline at end of file diff --git a/mod/file/languages/en.php b/mod/file/languages/en.php index dd317b5c7..1372ae4ce 100644 --- a/mod/file/languages/en.php +++ b/mod/file/languages/en.php @@ -69,9 +69,7 @@ 'file:display:number' => "Number of files to display", - 'file:river:created' => "%s uploaded", - 'file:river:item' => "a file", - 'river:commented:object:file' => 'the file', + 'file:river:create' => 'uploaded the file', 'item:object:file' => 'Files', diff --git a/mod/file/views/default/river/object/file/create.php b/mod/file/views/default/river/object/file/create.php index b9b5c4299..620d1d18c 100644 --- a/mod/file/views/default/river/object/file/create.php +++ b/mod/file/views/default/river/object/file/create.php @@ -1,17 +1,35 @@ <?php +/** + * File river view. + */ - $performed_by = get_entity($vars['item']->subject_guid); - $object = get_entity($vars['item']->object_guid); - $url = $object->getURL(); - $container = get_entity($object->container_guid); +$object = $vars['item']->getObjectEntity(); +$excerpt = strip_tags($object->description); +$excerpt = elgg_get_excerpt($excerpt); - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = elgg_echo("file:river:created", array($url)) . " " . elgg_echo("file:river:item"); - $string .= " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; - if ($container && $container instanceof ElggGroup) { - $string .= ' ' . elgg_echo('groups:river:togroup') . " <a href=\"" . $container->getURL() ."\">". $container->name . "</a>"; - } +$params = array( + 'href' => $object->getURL(), + 'text' => $object->title, +); +$link = elgg_view('output/url', $params); - echo $string; +$group_string = ''; +$container = $object->getContainerEntity(); +if ($container instanceof ElggGroup) { + $params = array( + 'href' => $container->getURL(), + 'text' => $container->name, + ); + $group_link = elgg_view('output/url', $params); + $group_string = elgg_echo('river:ingroup', array($group_link)); +} -?>
\ No newline at end of file +echo elgg_echo('file:river:create'); + +echo " $link $group_string"; + +if ($excerpt) { + echo '<div class="elgg-river-content">'; + echo $excerpt; + echo '</div>'; +} diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php index 3baf02e69..45872277e 100644 --- a/mod/groups/languages/en.php +++ b/mod/groups/languages/en.php @@ -179,8 +179,8 @@ or click below to view the group's join requests: Forum river items */ + 'groups:river:create' => 'created the group', 'groups:river:member' => '%s is now a member of', - 'groups:river:create' => '%s created a new group called', 'groupforum:river:updated' => '%s has updated', 'groupforum:river:update' => 'this discussion topic', 'groupforum:river:created' => '%s has created', diff --git a/mod/groups/views/default/river/group/create.php b/mod/groups/views/default/river/group/create.php index ae55df03b..a70f8b51d 100644 --- a/mod/groups/views/default/river/group/create.php +++ b/mod/groups/views/default/river/group/create.php @@ -1,16 +1,25 @@ <?php +/** + * Group creation river view. + */ - $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); - $object = get_entity($vars['item']->object_guid); - $objecturl = $object->getURL(); +$object = $vars['item']->getObjectEntity(); +$excerpt = strip_tags($object->description); +$excerpt = elgg_get_excerpt($excerpt); - $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = elgg_echo("groups:river:create", array($url)) . " "; - $string .= " <a href=\"" . $object->getURL() . "\">" . $object->name . "</a>"; - $string .= " <span class='entity-subtext'>". elgg_view_friendly_time($object->time_created); - if (isloggedin()) { - $string .= elgg_view('forms/likes/link', array('entity' => $object)); - } - $string .= "</span>"; +$params = array( + 'href' => $object->getURL(), + 'text' => $object->name, +); +$link = elgg_view('output/url', $params); -echo $string;
\ No newline at end of file + +echo elgg_echo('groups:river:create'); + +echo " $link"; + +if ($excerpt) { + echo '<div class="elgg-river-content">'; + echo $excerpt; + echo '</div>'; +} |