From 43ffa1d95e62f553f7d0d7164c9c1a356abfcf93 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 17 Dec 2010 12:37:21 +0000 Subject: added pages and thewire river entries git-svn-id: http://code.elgg.org/elgg/trunk@7659 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/river/object/page/create.php | 43 ++++++++++++++-------- .../views/default/river/object/page_top/create.php | 9 +---- 2 files changed, 29 insertions(+), 23 deletions(-) (limited to 'mod/pages/views/default') diff --git a/mod/pages/views/default/river/object/page/create.php b/mod/pages/views/default/river/object/page/create.php index 1635de221..032046063 100644 --- a/mod/pages/views/default/river/object/page/create.php +++ b/mod/pages/views/default/river/object/page/create.php @@ -1,22 +1,35 @@ subject_guid); // $statement->getSubject(); -$object = get_entity($vars['item']->object_guid); -$url = $object->getURL(); +$object = $vars['item']->getObjectEntity(); +$excerpt = strip_tags($object->description); +$excerpt = elgg_get_excerpt($excerpt); +$params = array( + 'href' => $object->getURL(), + 'text' => $object->title, +); +$link = elgg_view('output/url', $params); -$url = "getURL()}\">{$performed_by->name}"; -$contents = strip_tags($object->description); //strip tags from the contents to stop large images etc blowing out the river view -$string = elgg_echo("pages:river:created", array($url)) . " "; -$string .= elgg_echo("pages:river:create") . " getURL() . "\">" . $object->title . " ". elgg_view_friendly_time($object->time_created) ." Comment"; -$string .= elgg_view('forms/likes/link', array('entity' => $object)); -$string .= "
"; -$string .= elgg_get_excerpt($contents, 200); -$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)); +} -echo $string; +echo elgg_echo('pages:river:create'); + +echo " $link $group_string"; + +if ($excerpt) { + echo '
'; + echo $excerpt; + echo '
'; +} diff --git a/mod/pages/views/default/river/object/page_top/create.php b/mod/pages/views/default/river/object/page_top/create.php index d951a2f6a..b89eed195 100644 --- a/mod/pages/views/default/river/object/page_top/create.php +++ b/mod/pages/views/default/river/object/page_top/create.php @@ -5,11 +5,4 @@ * @package ElggPages */ -$statement = $vars['statement']; -$performed_by = $statement->getSubject(); -$object = $statement->getObject(); - -$url = "getURL()}\">{$performed_by->name}"; -$string = elgg_echo("pages:river:created", array($url)) . " "; -$string .= elgg_echo("pages:river:create") . "getURL() . "\">" . $object->title . ""; -echo $string; \ No newline at end of file +echo elgg_view('river/object/page/create', $vars); \ No newline at end of file -- cgit v1.2.3