ID; $resource_info = ""; if ($rid) { try { $waramuResource = waramu_getResource('', $rid); /*translation:Featured resource*/ $resource_info .= "

". elgg_echo("koolielu:heading_featured_waramu_resource") ."

"; $resource_info .= "

" . $waramuResource->getTitle() . "

"; $resource_img_url = getImageFileURL($rid . ".jpg", $resource_data->user_guid); $resource_info .= "
{$resource_data->description}
"; } catch ( Exception $e ) { #XXX This is not good and should only happen in case the material gets removed } } $sf = elgg_view('input/text', array('internalname' => 'searchValue', 'value' => '', 'class' => 'fti_search_input')); /*translation:Search*/ $sf .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('koolielu:Search'))); $wfti = elgg_view('input/form', array('action' => "{$CONFIG->wwwroot}action/waramu/search", 'body' => $sf)); $w = waramu_get(); // featured... $c = "
".$resource_info."
"; // search box $c .= "
".$wfti."
"; // tagcloud /* $c .= "
"; $fvoc = $w->getVocabulary("", 2, "keywords"); $gs = $fvoc['vocabulary'][0]['unit']; $top = array_slice($gs, 0, 100); $max = (int) $top[0]['count'][0][0]; $min = (int) $top[count($top)-1]['count'][0][0]; sort($top); foreach( $top as $g ) { $taglabel = $g['element'][0][0]; $tagcount = (int) $g['count'][0][0]; $siz = round((log($tagcount) / log($max)) * 100) + 30; $c .= "".$taglabel.""; $c .= " "; } $c .= "
"; */ $c .= "
"; $subcount = array(); $smax = -1; $smin = 9999999; foreach( getSubjects() as $sub => $v) { $s = getCurriculumSubject($sub); $q = ""; $q .= "".$s[0]->start.""; $q .= "".$s[0]->end.""; $q .= ""; $resp = $w->listIdentifiers("", $q); $idefs = $resp['identifiers'][0]['id']; if ( count($idefs) > $smax ) $smax = count($idefs); if ( count($idefs) < $smin ) $smin = count($idefs); $subcount[] = array(count($idefs), $sub, $s[0]->title); } foreach($subcount as $sub) { $tag = $sub[2]; $tac = $sub[0]; $siz = round((log($tac) / log($smax)) * 100) + 60; $c .= "".$tag.""; $c .= " "; } $c .= "
"; $body = elgg_view_layout('two_column_left_sidebar', "", $c); page_draw($title, $body); ?>