";
$latest = discussions_get_last_commented_from_metadata('section', $skey, 'object', 'disctopic', 0, 1, 0);
if ($latest && is_array($latest) && sizeof($latest)>0) {
$objs .= "
";
$latest_owner = $latest[0]->getOwnerEntity();
$objs .= "
getURL()}\">{$latest[0]->title}";
$objs .= "
";
/*translation:Author*/
$objs .= elgg_echo("koolielu:vauthor").": ";
if ($latest_owner) {
$objs .= $latest_owner->name;
} else {
$objs .= $latest[0]->discauthor;
}
/*translation:Creation date*/
$objs .= " ".elgg_echo("koolielu:label_added_date").": ".date("d.m.Y", $latest[0]->time_created);
$objs .= "
";
$latest_comment = get_annotations($latest[0]->guid, "", "", "generic_comment", "", "", 1, 0, "desc");
if ($latest_comment && is_array($latest_comment) && sizeof($latest_comment)>0) {
/*translation:Last commented*/
$objs .= elgg_echo('koolielu:discussions:last_commented').": ";
if ($latest_comment[0]->owner_guid > 0) {
$lc_owner = get_user($latest_comment[0]->owner_guid);
$objs .= $lc_owner->name;
} else {
$anon_data = split(";", $latest_comment[0]->value, 3);
$objs .= $anon_data[0];
}
/*translation:Creation date*/
$objs .= " ".elgg_echo("koolielu:label_added_date").": ".date("d.m.Y", $latest_comment[0]->time_created);
}
$objs .= "
";
$objs .= "