";
if (is_array($featured_groups) && sizeof($featured_groups) > 0) {
$featured_group = $featured_groups[0];
$area2 .= "
";
$area2 .= "
";
$area2 .= elgg_view("groups/icon", array('entity' => $featured_group, 'size' => 'large'));
$area2 .= "
";
$area2 .= "
";
}
//$study_groups = get_entities_from_metadata("study", "1", "group", "");
$study_groups = array();
if (is_array($study_groups) && sizeof($study_groups) > 0) {
$study_guids = array();
foreach($study_groups as $group) {
array_push($study_guids, $group->getGUID());
}
$suitable_objects = get_entities("object", "groupforumtopic", $study_guids , 'time_updated desc', 5, 0, false, 0, $study_guids);
if (is_array($suitable_objects) && sizeof($suitable_objects) > 0) {
$area2 .= "
";
/*translation:Stydy groups*/
$area2 .= "
" . elgg_echo("koolielu:heading_study_groups") . "
";
foreach($suitable_objects as $item) {
$area2 .= "
";
}
$area2 .= "
";
}
}
// area4 content
$area4 = "";
$external_groups = get_entities("object", "externalgroup", "", "", 4);//Only need up to 4 external groups
if (is_array($external_groups) && sizeof($external_groups) > 0) {
$area4 .= "";
$area4 .= "";
}
$area2 .= "
";
$area2 .= "";
$body = elgg_view_layout('two_column_community', $area1, $area2, "", $area4);
page_draw($title, $body);
?>