diff options
author | Sem <sembrestels@riseup.net> | 2013-11-09 16:24:39 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2013-11-09 16:24:39 +0100 |
commit | a9ac4c861335e60373c1e99b61372e6e0d6ac9f4 (patch) | |
tree | 84e660ad22367aab1697a1f910125f520243b882 /mod/event_calendar/views/default/event_calendar/groupprofile_calendar.php | |
parent | 1f40407cb2d2f0edfc4cc5346f332f5c6adab022 (diff) | |
parent | b011a80767e1062a394b7bbbc3be3d2959a5f773 (diff) | |
download | elgg-a9ac4c861335e60373c1e99b61372e6e0d6ac9f4.tar.gz elgg-a9ac4c861335e60373c1e99b61372e6e0d6ac9f4.tar.bz2 |
Add 'mod/event_calendar/' from commit 'b011a80767e1062a394b7bbbc3be3d2959a5f773'
git-subtree-dir: mod/event_calendar
git-subtree-mainline: 1f40407cb2d2f0edfc4cc5346f332f5c6adab022
git-subtree-split: b011a80767e1062a394b7bbbc3be3d2959a5f773
Diffstat (limited to 'mod/event_calendar/views/default/event_calendar/groupprofile_calendar.php')
-rw-r--r-- | mod/event_calendar/views/default/event_calendar/groupprofile_calendar.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mod/event_calendar/views/default/event_calendar/groupprofile_calendar.php b/mod/event_calendar/views/default/event_calendar/groupprofile_calendar.php new file mode 100644 index 000000000..c71780be8 --- /dev/null +++ b/mod/event_calendar/views/default/event_calendar/groupprofile_calendar.php @@ -0,0 +1,33 @@ +<?php + +/** + * Elgg event_calendar group profile content + * + * @package event_calendar + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Kevin Jardine <kevin@radagast.biz> + * @copyright Radagast Solutions 2008 + * @link http://radagast.biz/ + * + */ + +elgg_load_library('elgg:event_calendar'); + +$page_owner_entity = elgg_get_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,elgg_get_page_owner_guid()); + + // If there are any events to view, view them + if (is_array($events) && sizeof($events) > 0) { + + foreach($events as $event) { + echo elgg_view("object/event_calendar",array('entity' => $event['event'])); + } + + } +} |