Fix calendar sidebar issue - changed holder from 'contentholder' to 'sidebarholder'
[elgg.git] / _calendar / view_events.php
blobaf77fa1e77f5d58ec076e4cc425e24db4bd14bac
1 <?php
3 require("../includes.php");
5 run("calendar:init");
6 run("profile:init");
7 run("friends:init");
9 define("context", "calendar");
11 //whose calendar are we looking at, defined in calendar:init
12 global $calendar_id;
14 $title = run("profile:display:name") . " :: " . gettext("Calendar");
15 $body = null;
17 if(!isset($_GET["friend_id"]) && !isset($_GET["event_id"]) && !isset($_GET["community_id"])){
18 $selected_month = $_GET["selected_month"];
19 $selected_year = $_GET["selected_year"];
20 $selected_day = $_GET["selected_day"];
21 $context = $_GET["context"];
24 $body = run("calendar:blog:view", array($selected_month, $selected_year, $selected_day, $context));
26 }else if(isset($_GET["friend_id"])){
27 $body = run("calendar:blog:view", array($_GET["friend_id"], "friends"));
28 }else if(isset($_GET["event_id"])){
29 $body = run("calendar:blog:view", array($_GET["event_id"], "tags"));
30 }else if(isset($_GET["community_id"])){
31 $body = run("calendar:blog:view", array($_GET["community_id"], "communities"));
35 $body = run("templates:draw", array(
36 'context' => 'contentholder',
37 'title' => $title,
38 'body' => $body
42 echo run("templates:draw:page", array(
43 $title, $body
47 unset($_SESSION["messages"]);