Exemple #1
0
function shoutout_get_view_page($guid)
{
    elgg_extend_view('forms/comments/add', 'shoutout/add_river_flag');
    $title = elgg_echo('shoutout:view_title');
    $shoutout = get_entity($guid);
    if (elgg_instanceof($shoutout, 'object', 'shoutout')) {
        $content = '<div class="shoutout-view-wrapper">' . parse_urls($shoutout->description) . '</div>';
        $content .= shoutout_get_attachment_listing($shoutout);
        $list = shoutout_list_attached_entities($shoutout);
        if ($list) {
            $content .= '<br />' . $list;
        }
        $content .= elgg_view_comments($shoutout);
    } else {
        $content = elgg_echo('shoutout:bad_shoutout');
    }
    elgg_push_breadcrumb(elgg_echo('shoutout:listing_title'), 'shoutout/activity');
    $params = array('title' => $title, 'content' => $content, 'filter' => '');
    $body = elgg_view_layout("content", $params);
    return elgg_view_page($title, $body);
}
Exemple #2
0
<?php

/**
 * Shoutout river view.
 */
// TODO: add video view
elgg_load_library('elgg:shoutout');
$object = $vars['item']->getObjectEntity();
$excerpt = parse_urls(elgg_get_excerpt($object->description));
if (substr($excerpt, strlen($excerpt) - 3) == '...') {
    $more_bit = ' <a href="' . $object->getURL() . '">' . elgg_echo('shoutout:more') . '</a>';
    $excerpt .= $more_bit;
}
$excerpt .= shoutout_get_attachment_listing($object);
$excerpt .= shoutout_get_video_display($object);
echo elgg_view('river/elements/layout', array('item' => $vars['item'], 'message' => $excerpt));
echo shoutout_list_attached_entities($object);