Beispiel #1
0
<?php

/**
 * Wall post tag river item
 */
namespace hypeJunction\Wall;

elgg_push_context('wall');
// River access level will vary from that of the original post
$ia = elgg_set_ignore_access(true);
$tagged_user = $vars['item']->getSubjectEntity();
$wall_post = $vars['item']->getObjectEntity();
$poster = $wall_post->getOwnerEntity();
$tagged_user_link = elgg_view('output/url', array('text' => $tagged_user->name, 'href' => $tagged_user->getURL()));
$poster_link = elgg_view('output/url', array('text' => $poster->name, 'href' => $poster->getURL()));
$wall_post_link = elgg_view('output/url', array('text' => elgg_echo('wall:tag:river:post'), 'href' => $wall_post->getURL()));
$summary = elgg_echo('wall:tag:river', array($poster_link, $tagged_user_link, $wall_post_link));
elgg_set_ignore_access($ia);
echo elgg_view('river/item', array('item' => $vars['item'], 'summary' => $summary, 'message' => format_wall_message($wall_post), 'attachments' => format_wall_attachments($wall_post)));
elgg_pop_context();
Beispiel #2
0
<?php

/**
 * Add tagged friends and embeddable content to wire posts
 */
namespace hypeJunction\Wall;

$entity = elgg_extract('entity', $vars);
$tagged_friends = get_tagged_friends($entity, 'links');
if ($tagged_friends) {
    echo '<span class="elgg-subtext wall-tagged-friends">' . elgg_echo('wall:with', array(implode(', ', $tagged_friends))) . '</span>';
}
$attachments = format_wall_attachments($entity);
if ($attachments) {
    echo $attachments;
}