aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/riverdashboard/index.php')
-rw-r--r--mod/riverdashboard/index.php44
1 files changed, 44 insertions, 0 deletions
diff --git a/mod/riverdashboard/index.php b/mod/riverdashboard/index.php
new file mode 100644
index 000000000..d4be29b85
--- /dev/null
+++ b/mod/riverdashboard/index.php
@@ -0,0 +1,44 @@
+<?php
+
+ /**
+ * Elgg river dashboard plugin index page
+ *
+ * @package ElggRiverDash
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2009
+ * @link http://elgg.org/
+ */
+
+ require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');
+
+ gatekeeper();
+
+ $subtype = get_input('content','');
+ $orient = get_input('display');
+
+ if ($subtype == 'all') $subtype = '';
+
+ switch($orient) {
+ case 'mine':
+ $subject_guid = $_SESSION['user']->guid;
+ $relationship_type = '';
+ break;
+ case 'friends': $subject_guid = $_SESSION['user']->guid;
+ $relationship_type = 'friend';
+ break;
+ default: $subject_guid = 0;
+ $relationship_type = '';
+ break;
+ }
+
+ $river = elgg_view_river_items($subject_guid, 0, $relationship_type, '', $subtype, '');
+ $body = elgg_view('riverdashboard/nav',array(
+ 'subtype' => $subtype,
+ 'orient' => $orient
+ ));
+ $body .= $river;
+
+ echo page_draw(elgg_echo('dashboard'),elgg_view_layout('two_column_left_sidebar','',$body));
+
+?> \ No newline at end of file