* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*
* @uses $vars['entity'] The user entity
*/
$icon = elgg_view(
"profile/icon", array(
'entity' => $vars['entity'],
'size' => 'medium',
)
);
$banned = $vars['entity']->isBanned();
$rel = "";
if (page_owner() == $vars['entity']->guid)
$rel = 'me';
else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
$rel = 'friend';
if (!$banned)
$info .= "
getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "
";
else
$info .= "" . $vars['entity']->name . "
".elgg_echo('profile:banned')."
";
// TODO: look into a way to pass $authorised and $event_id in $vars
$authorised = FALSE;
$event_id = get_input('event_id', 0);
if ($event_id) {
if(isadminloggedin()) {
$authorised = TRUE;
} else {
// load the event from the database
$event = get_entity($event_id);
$user_id = get_loggedin_userid();
if ($event && ($event->owner_guid == $user_id)) {
$authorised = TRUE;
}
}
}
if ($authorised) {
$link = 'guid.'); return false;" ';
$link .= ' >';
$link .= ''.elgg_echo('event_calendar:remove_from_the_calendar').'';
$link .= '
';
$info .= $link;
}
// echo elgg_view_listing($icon, $info);
echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info));
?>