From c07218b9c7b256e998f0a31c0226b3bd6d8011d7 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Mon, 27 Jun 2011 12:49:05 +0200 Subject: added main code --- .../event_calendar/groupprofile_calendar.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 trunk/views/default/event_calendar/groupprofile_calendar.php (limited to 'trunk/views/default/event_calendar/groupprofile_calendar.php') diff --git a/trunk/views/default/event_calendar/groupprofile_calendar.php b/trunk/views/default/event_calendar/groupprofile_calendar.php new file mode 100644 index 000000000..175098e0c --- /dev/null +++ b/trunk/views/default/event_calendar/groupprofile_calendar.php @@ -0,0 +1,42 @@ + + * @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 ''; + 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 "
"; + } +} + +?> \ No newline at end of file -- cgit v1.2.3