* @copyright Radagast Solutions 2008 * @link http://radagast.biz/ * */ $page_owner_entity = page_owner_entity(); if (event_calendar_activated_for_group($page_owner_entity)) { $num = 5; // Get the upcoming events $start_date = time(); // now $end_date = $start_date + 60*60*24*365*2; // maximum is two years from now $events = event_calendar_get_events_between($start_date,$end_date,false,$num,0,page_owner()); // If there are any events to view, view them if (is_array($events) && sizeof($events) > 0) { echo '
'; echo '

'.elgg_echo("event_calendar:groupprofile").'

'; foreach($events as $event) { echo elgg_view("object/event_calendar",array('entity' => $event)); } echo '
'.elgg_echo('event_calendar:view_calendar').'
'; echo "
"; } else if (get_plugin_setting('group_always_display', 'event_calendar') == 'yes') { echo '
'; echo '

'.elgg_echo("event_calendar:groupprofile").'

'; echo '
'.elgg_echo('event_calendar:no_events_found').'
'; echo "
"; } } ?>