title;
if (empty($title)) {
$subtitle = strip_tags($vars['entity']->description);
$title = substr($subtitle, 0, 32);
if (strlen($subtitle) > 32) {
$title .= ' ...';
}
}
$permalink = htmlspecialchars($vars['entity']->getURL());
$pubdate = date('r', $vars['entity']->time_created);
$creator = '';
if ($owner = $vars['entity']->getOwnerEntity()) {
$creator = "{$owner->name}";
}
$georss = '';
if (
($vars['entity'] instanceof Locatable) &&
($vars['entity']->getLongitude()) &&
($vars['entity']->getLatitude())
) {
$latitude = $vars['entity']->getLatitude();
$longitude = $vars['entity']->getLongitude();
$georss = "$latitude $longitude";
}
$extension = elgg_view('extensions/item');
$item = <<<__HTML
-
$permalink
$pubdate
$permalink
description}]]>
$creator$georss$extension
__HTML;
echo $item;