From 29792a9858484266952a53268e4fd0dd29b2f4a5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 28 Jun 2011 18:12:41 -0400 Subject: moved the code into the base directory so that it is easier to work with --- .../event_calendar/groupprofile_calendar.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 views/default/event_calendar/groupprofile_calendar.php (limited to 'views/default/event_calendar/groupprofile_calendar.php') diff --git a/views/default/event_calendar/groupprofile_calendar.php b/views/default/event_calendar/groupprofile_calendar.php new file mode 100644 index 000000000..175098e0c --- /dev/null +++ b/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