aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 22:00:44 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 22:00:44 +0000
commitc2e2d3ae222a55086bed95d897c6e8c50b066c37 (patch)
tree9039f6be684ab133c13e5f4cb8e36ff37f2aec5a /mod/riverdashboard
parentd86408d2662b961645b4ed4cdbd37d5150819cf4 (diff)
downloadelgg-c2e2d3ae222a55086bed95d897c6e8c50b066c37.tar.gz
elgg-c2e2d3ae222a55086bed95d897c6e8c50b066c37.tar.bz2
Converting all line endings to unix style.
git-svn-id: http://code.elgg.org/elgg/trunk@5512 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard')
-rw-r--r--mod/riverdashboard/endpoint/ping.php140
-rw-r--r--mod/riverdashboard/index.php122
-rw-r--r--mod/riverdashboard/languages/en.php78
-rw-r--r--mod/riverdashboard/start.php102
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/container.php104
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/menu.php54
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/nav.php102
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/rivercomment.php28
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/welcome.php14
9 files changed, 372 insertions, 372 deletions
diff --git a/mod/riverdashboard/endpoint/ping.php b/mod/riverdashboard/endpoint/ping.php
index c5613dd0c..d41128e1f 100644
--- a/mod/riverdashboard/endpoint/ping.php
+++ b/mod/riverdashboard/endpoint/ping.php
@@ -1,70 +1,70 @@
-<?php
-/**
- * Check for new activity.
- * Outputs # of new activity items since $_GET['last_checked'] time
- */
-
-// Load Elgg engine will not include plugins
-require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
-// check for last checked time
-if (!$seconds_passed = get_input('seconds_passed', 0)) {
- echo '';
- exit;
-}
-
-$last_reload = time() - $seconds_passed;
-
-//grab any new annotations
-$annotations = count_annotations('', '', '', '', '', '', '', $last_reload);
-if(!$annotations)
- $annotations = 0;
-//grab all new objects created
-$entity_creation = elgg_get_entities(array(
- 'count' => TRUE,
- 'created_time_lower' => $last_reload,
- 'wheres' => array('e.type != \'user\'')
-));
-if(!$entity_creation)
- $entity_creation = 0;
-//grab any entities updated
-$entity_update = elgg_get_entities(array(
- 'count' => TRUE,
- 'modified_time_lower' => $last_reload,
- 'wheres' => array('e.type != \'user\'')
-));
-if(!$entity_update)
- $entity_update = 0;
-//get any relationships, such as friending - this is not working quite right yet
-//$relationship_action = elgg_get_entities_from_relationship(array('count' => TRUE));
-//if(!$relationship_action)
-// $relationship_action = 0;
-
-//sum all totals
-$all_activity = $annotations + $entity_creation + $entity_update;
-
-if ($all_activity > 0) {
- $s = ($all_activity == 1) ? '' : 's';
- echo "<a href='' onClick=\"window.location.reload();\" class='update_link'>$all_activity update$s!</a>";
-?>
- <script type="text/javascript">
- $(document).ready(function(){
-
- var pageTitleSubstring;
- var stringStartPosition = document.title.indexOf("]");
-
- if (stringStartPosition == -1) { // we haven't already altered page title
- pageTitleSubstring = document.title;
- } else { // we previously prepended to page title, need to remove it first
- pageTitleSubstring = document.title.substring( (stringStartPosition+2) );
- }
-
- document.title = "[<?php echo $all_activity; ?> update<?php echo $s; ?>] "+pageTitleSubstring;
- });
- </script>
-
-<?php
-} else {
- echo '';
- exit;
-}
+<?php
+/**
+ * Check for new activity.
+ * Outputs # of new activity items since $_GET['last_checked'] time
+ */
+
+// Load Elgg engine will not include plugins
+require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
+
+// check for last checked time
+if (!$seconds_passed = get_input('seconds_passed', 0)) {
+ echo '';
+ exit;
+}
+
+$last_reload = time() - $seconds_passed;
+
+//grab any new annotations
+$annotations = count_annotations('', '', '', '', '', '', '', $last_reload);
+if(!$annotations)
+ $annotations = 0;
+//grab all new objects created
+$entity_creation = elgg_get_entities(array(
+ 'count' => TRUE,
+ 'created_time_lower' => $last_reload,
+ 'wheres' => array('e.type != \'user\'')
+));
+if(!$entity_creation)
+ $entity_creation = 0;
+//grab any entities updated
+$entity_update = elgg_get_entities(array(
+ 'count' => TRUE,
+ 'modified_time_lower' => $last_reload,
+ 'wheres' => array('e.type != \'user\'')
+));
+if(!$entity_update)
+ $entity_update = 0;
+//get any relationships, such as friending - this is not working quite right yet
+//$relationship_action = elgg_get_entities_from_relationship(array('count' => TRUE));
+//if(!$relationship_action)
+// $relationship_action = 0;
+
+//sum all totals
+$all_activity = $annotations + $entity_creation + $entity_update;
+
+if ($all_activity > 0) {
+ $s = ($all_activity == 1) ? '' : 's';
+ echo "<a href='' onClick=\"window.location.reload();\" class='update_link'>$all_activity update$s!</a>";
+?>
+ <script type="text/javascript">
+ $(document).ready(function(){
+
+ var pageTitleSubstring;
+ var stringStartPosition = document.title.indexOf("]");
+
+ if (stringStartPosition == -1) { // we haven't already altered page title
+ pageTitleSubstring = document.title;
+ } else { // we previously prepended to page title, need to remove it first
+ pageTitleSubstring = document.title.substring( (stringStartPosition+2) );
+ }
+
+ document.title = "[<?php echo $all_activity; ?> update<?php echo $s; ?>] "+pageTitleSubstring;
+ });
+ </script>
+
+<?php
+} else {
+ echo '';
+ exit;
+}
diff --git a/mod/riverdashboard/index.php b/mod/riverdashboard/index.php
index 9fc54dda6..e025850ea 100644
--- a/mod/riverdashboard/index.php
+++ b/mod/riverdashboard/index.php
@@ -1,62 +1,62 @@
-<?php
-
-/**
- * Elgg river dashboard plugin index page
- */
-
-require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');
-
-gatekeeper();
-
-$type = get_input('type');
-$subtype = get_input('subtype');
-$orient = get_input('display');
-if(!$orient)
- $orient = 'all';
-$callback = get_input('callback');
-
-if ($type == 'all') {
- $type = '';
- $subtype = '';
-}
-
-$body = '';
-
-switch($orient) {
- case 'mine':
- $subject_guid = $_SESSION['user']->guid;
- $relationship_type = '';
- $title_wording = elgg_echo('river:mine');
- break;
- case 'friends': $subject_guid = $_SESSION['user']->guid;
- $relationship_type = 'friend';
- $title_wording = elgg_echo('river:friends');
- break;
- default: $subject_guid = 0;
- $relationship_type = '';
- $title_wording = elgg_echo('river:all');
- break;
-}
-
-
-$title = elgg_view_title($title_wording);
-
-$river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, false) . "</div>";
-// Replacing callback calls in the nav with something meaningless
-$river = str_replace('callback=true','replaced=88,334',$river);
-
-$nav = elgg_view('riverdashboard/nav',array('type' => $type,'subtype' => $subtype,'orient' => $orient));
-if(isloggedin()){
- $sidebar = elgg_view("riverdashboard/menu",array('type' => $type,'subtype' => $subtype,'orient' => $orient));
- $sidebar .= elgg_view("riverdashboard/sidebar", array("object_type" => 'riverdashboard'));
-}else{
- $sidebar = '';
-}
-set_context('riverdashboard');
-if (empty($callback)) {
- $body .= elgg_view('riverdashboard/container', array('body' => $nav . $river . elgg_view('riverdashboard/js')));
- page_draw($title_wording,elgg_view_layout('one_column_with_sidebar',$title . $body, $sidebar));
-} else {
- header("Content-type: text/html; charset=UTF-8");
- echo $nav . $river . elgg_view('riverdashboard/js');
+<?php
+
+/**
+ * Elgg river dashboard plugin index page
+ */
+
+require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');
+
+gatekeeper();
+
+$type = get_input('type');
+$subtype = get_input('subtype');
+$orient = get_input('display');
+if(!$orient)
+ $orient = 'all';
+$callback = get_input('callback');
+
+if ($type == 'all') {
+ $type = '';
+ $subtype = '';
+}
+
+$body = '';
+
+switch($orient) {
+ case 'mine':
+ $subject_guid = $_SESSION['user']->guid;
+ $relationship_type = '';
+ $title_wording = elgg_echo('river:mine');
+ break;
+ case 'friends': $subject_guid = $_SESSION['user']->guid;
+ $relationship_type = 'friend';
+ $title_wording = elgg_echo('river:friends');
+ break;
+ default: $subject_guid = 0;
+ $relationship_type = '';
+ $title_wording = elgg_echo('river:all');
+ break;
+}
+
+
+$title = elgg_view_title($title_wording);
+
+$river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, false) . "</div>";
+// Replacing callback calls in the nav with something meaningless
+$river = str_replace('callback=true','replaced=88,334',$river);
+
+$nav = elgg_view('riverdashboard/nav',array('type' => $type,'subtype' => $subtype,'orient' => $orient));
+if(isloggedin()){
+ $sidebar = elgg_view("riverdashboard/menu",array('type' => $type,'subtype' => $subtype,'orient' => $orient));
+ $sidebar .= elgg_view("riverdashboard/sidebar", array("object_type" => 'riverdashboard'));
+}else{
+ $sidebar = '';
+}
+set_context('riverdashboard');
+if (empty($callback)) {
+ $body .= elgg_view('riverdashboard/container', array('body' => $nav . $river . elgg_view('riverdashboard/js')));
+ page_draw($title_wording,elgg_view_layout('one_column_with_sidebar',$title . $body, $sidebar));
+} else {
+ header("Content-type: text/html; charset=UTF-8");
+ echo $nav . $river . elgg_view('riverdashboard/js');
} \ No newline at end of file
diff --git a/mod/riverdashboard/languages/en.php b/mod/riverdashboard/languages/en.php
index 64aabf745..864a8d7a9 100644
--- a/mod/riverdashboard/languages/en.php
+++ b/mod/riverdashboard/languages/en.php
@@ -1,40 +1,40 @@
-<?php
-$english = array(
- 'mine' => 'Mine',
- 'filter' => 'Filter',
- 'riverdashboard:useasdashboard' => "Replace the default dashboard with this activity river?",
- 'activity' => 'Activity',
- 'riverdashboard:recentmembers' => 'Recent members',
-
- /**
- * Site messages
- **/
-
- 'sitemessages:announcements' => "Site announcements",
- 'sitemessages:posted' => "Posted",
- 'sitemessages:river:created' => "Site admin, %s,",
- 'sitemessages:river:create' => "posted a new site wide message",
- 'sitemessages:add' => "Add a site-wide message to the river page",
- 'sitemessage:deleted' => "Site message deleted",
-
- 'river:widget:noactivity' => 'We could not find any activity.',
- 'river:widget:title' => "Activity",
- 'river:all' => "All activity",
- 'river:mine' => "My activity",
- 'river:friends' => "Friends' activity",
- 'river:widget:description' => "Show your latest activity.",
- 'river:widget:title:friends' => "Friends' activity",
- 'river:widget:description:friends' => "Show what your friends are up to.",
- 'river:widgets:friends' => "Friends",
- 'river:widgets:mine' => "Mine",
- 'river:friends' => "My friends' activity",
- 'river:mine' => "My activity",
- 'river:widget:label:displaynum' => "Number of entries to display:",
- 'river:widget:type' => "Which river would you like to display? One that shows your activity or one that shows your friends activity?",
- 'item:object:sitemessage' => "Site messages",
- 'riverdashboard:avataricon' => "Would you like to use user avatars or icons on your site activity stream?",
- 'option:icon' => 'Icons',
- 'option:avatar' => 'Avatars',
-);
-
+<?php
+$english = array(
+ 'mine' => 'Mine',
+ 'filter' => 'Filter',
+ 'riverdashboard:useasdashboard' => "Replace the default dashboard with this activity river?",
+ 'activity' => 'Activity',
+ 'riverdashboard:recentmembers' => 'Recent members',
+
+ /**
+ * Site messages
+ **/
+
+ 'sitemessages:announcements' => "Site announcements",
+ 'sitemessages:posted' => "Posted",
+ 'sitemessages:river:created' => "Site admin, %s,",
+ 'sitemessages:river:create' => "posted a new site wide message",
+ 'sitemessages:add' => "Add a site-wide message to the river page",
+ 'sitemessage:deleted' => "Site message deleted",
+
+ 'river:widget:noactivity' => 'We could not find any activity.',
+ 'river:widget:title' => "Activity",
+ 'river:all' => "All activity",
+ 'river:mine' => "My activity",
+ 'river:friends' => "Friends' activity",
+ 'river:widget:description' => "Show your latest activity.",
+ 'river:widget:title:friends' => "Friends' activity",
+ 'river:widget:description:friends' => "Show what your friends are up to.",
+ 'river:widgets:friends' => "Friends",
+ 'river:widgets:mine' => "Mine",
+ 'river:friends' => "My friends' activity",
+ 'river:mine' => "My activity",
+ 'river:widget:label:displaynum' => "Number of entries to display:",
+ 'river:widget:type' => "Which river would you like to display? One that shows your activity or one that shows your friends activity?",
+ 'item:object:sitemessage' => "Site messages",
+ 'riverdashboard:avataricon' => "Would you like to use user avatars or icons on your site activity stream?",
+ 'option:icon' => 'Icons',
+ 'option:avatar' => 'Avatars',
+);
+
add_translation("en",$english); \ No newline at end of file
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php
index 6badd8393..1377afc37 100644
--- a/mod/riverdashboard/start.php
+++ b/mod/riverdashboard/start.php
@@ -1,51 +1,51 @@
-<?php
-/**
- * Elgg river dashboard plugin
- */
-
-function riverdashboard_init() {
- global $CONFIG;
- // Register and optionally replace the dashboard
- if (get_plugin_setting('useasdashboard', 'riverdashboard') == 'yes') {
- register_page_handler('dashboard','riverdashboard_page_handler');
- } else {
- // Activity main menu
- add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "mod/riverdashboard/");
- }
- // Page handler
- register_page_handler('riverdashboard','riverdashboard_page_handler');
- elgg_extend_view('css','riverdashboard/css');
-}
-
-/**
- * Page handler for riverdash
- *
- * @param unknown_type $page
- */
-function riverdashboard_page_handler($page){
- global $CONFIG;
- include(dirname(__FILE__) . "/index.php");
- return true;
-}
-
-function riverdashboard_dashboard() {
- include(dirname(__FILE__) . '/index.php');
-}
-
-/**
- * For users to make a comment on a river item
- *
- * @param ElggEntity $entity The entity to comment on
- * @return string|false The HTML (etc) for the comment form, or false on failure
- */
-function elgg_make_river_comment($entity){
- if (!($entity instanceof ElggEntity)) {
- return false;
- } else {
- //display the comment form
- $comments = elgg_view('riverdashboard/rivercomment',array('entity' => $entity));
- return $comments;
- }
-}
-
-register_elgg_event_handler('init','system','riverdashboard_init');
+<?php
+/**
+ * Elgg river dashboard plugin
+ */
+
+function riverdashboard_init() {
+ global $CONFIG;
+ // Register and optionally replace the dashboard
+ if (get_plugin_setting('useasdashboard', 'riverdashboard') == 'yes') {
+ register_page_handler('dashboard','riverdashboard_page_handler');
+ } else {
+ // Activity main menu
+ add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "mod/riverdashboard/");
+ }
+ // Page handler
+ register_page_handler('riverdashboard','riverdashboard_page_handler');
+ elgg_extend_view('css','riverdashboard/css');
+}
+
+/**
+ * Page handler for riverdash
+ *
+ * @param unknown_type $page
+ */
+function riverdashboard_page_handler($page){
+ global $CONFIG;
+ include(dirname(__FILE__) . "/index.php");
+ return true;
+}
+
+function riverdashboard_dashboard() {
+ include(dirname(__FILE__) . '/index.php');
+}
+
+/**
+ * For users to make a comment on a river item
+ *
+ * @param ElggEntity $entity The entity to comment on
+ * @return string|false The HTML (etc) for the comment form, or false on failure
+ */
+function elgg_make_river_comment($entity){
+ if (!($entity instanceof ElggEntity)) {
+ return false;
+ } else {
+ //display the comment form
+ $comments = elgg_view('riverdashboard/rivercomment',array('entity' => $entity));
+ return $comments;
+ }
+}
+
+register_elgg_event_handler('init','system','riverdashboard_init');
diff --git a/mod/riverdashboard/views/default/riverdashboard/container.php b/mod/riverdashboard/views/default/riverdashboard/container.php
index 2d2d5b069..67e277e99 100644
--- a/mod/riverdashboard/views/default/riverdashboard/container.php
+++ b/mod/riverdashboard/views/default/riverdashboard/container.php
@@ -1,52 +1,52 @@
-<?php echo $vars['body']; ?>
-
-<script type="text/JavaScript">
-$(document).ready(function(){
- var updates = new thewireUpdateChecker(10000);
- updates.start();
-});
-
-// check for updates on the wire.
-function thewireUpdateChecker(interval) {
- this.intervalID = null;
- this.interval = interval;
- this.url = '<?php echo $vars['url']; ?>mod/riverdashboard/endpoint/ping.php';
- this.seconds_passed = 0;
-
- this.start = function() {
- // needed to complete closure scope.
- var self = this;
-
- this.intervalID = setInterval(function() { self.checkUpdates(); }, this.interval);
- }
-
- this.checkUpdates = function() {
- this.seconds_passed += this.interval / 1000;
- // more closure fun
- var self = this;
- $.ajax({
- 'type': 'GET',
- 'url': this.url,
- 'data': {'seconds_passed': this.seconds_passed},
- 'success': function(data) {
- if (data) {
- $('#riverdashboard_updates').html(data).slideDown();
- // could crank down the interval here.
- // if we change the message to simply "New Posts!"
- // we could stop the polling altogether.
- }
- }
- })
- }
-
- this.stop = function() {
- clearInterval(this.interval);
- }
-
- this.changeInterval = function(interval) {
- this.stop();
- this.interval = interval;
- this.start();
- }
-}
-</script>
+<?php echo $vars['body']; ?>
+
+<script type="text/JavaScript">
+$(document).ready(function(){
+ var updates = new thewireUpdateChecker(10000);
+ updates.start();
+});
+
+// check for updates on the wire.
+function thewireUpdateChecker(interval) {
+ this.intervalID = null;
+ this.interval = interval;
+ this.url = '<?php echo $vars['url']; ?>mod/riverdashboard/endpoint/ping.php';
+ this.seconds_passed = 0;
+
+ this.start = function() {
+ // needed to complete closure scope.
+ var self = this;
+
+ this.intervalID = setInterval(function() { self.checkUpdates(); }, this.interval);
+ }
+
+ this.checkUpdates = function() {
+ this.seconds_passed += this.interval / 1000;
+ // more closure fun
+ var self = this;
+ $.ajax({
+ 'type': 'GET',
+ 'url': this.url,
+ 'data': {'seconds_passed': this.seconds_passed},
+ 'success': function(data) {
+ if (data) {
+ $('#riverdashboard_updates').html(data).slideDown();
+ // could crank down the interval here.
+ // if we change the message to simply "New Posts!"
+ // we could stop the polling altogether.
+ }
+ }
+ })
+ }
+
+ this.stop = function() {
+ clearInterval(this.interval);
+ }
+
+ this.changeInterval = function(interval) {
+ this.stop();
+ this.interval = interval;
+ this.start();
+ }
+}
+</script>
diff --git a/mod/riverdashboard/views/default/riverdashboard/menu.php b/mod/riverdashboard/views/default/riverdashboard/menu.php
index bfb0f4172..c5c49f0a3 100644
--- a/mod/riverdashboard/views/default/riverdashboard/menu.php
+++ b/mod/riverdashboard/views/default/riverdashboard/menu.php
@@ -1,28 +1,28 @@
-<?php
-/**
- * Elgg activity stream menu
- */
-$allselect = ''; $friendsselect = ''; $mineselect = ''; $display_option = '';
-switch($vars['orient']) {
- case 'all': $allselect = 'class="selected"';
- break;
- case 'friends': $friendsselect = 'class="selected"';
- $display_option = '&amp;display=friends';
- break;
- case 'mine': $mineselect = 'class="selected"';
- $display_option = '&amp;display=mine';
- break;
-}
-?>
-<ul class="submenu riverdashboard">
-<?php
- if(isloggedin()){
-?>
- <li <?php echo $allselect; ?> ><a href="<?php echo $vars['url']; ?>mod/riverdashboard/"><?php echo elgg_echo('all'); ?></a></li>
- <li <?php echo $friendsselect; ?> ><a href="<?php echo $vars['url']; ?>mod/riverdashboard/?display=friends"><?php echo elgg_echo('friends'); ?></a></li>
- <li <?php echo $mineselect; ?> ><a href="<?php echo $vars['url']; ?>mod/riverdashboard/?display=mine"><?php echo elgg_echo('mine'); ?></a></li>
-
-<?php
- }
-?>
+<?php
+/**
+ * Elgg activity stream menu
+ */
+$allselect = ''; $friendsselect = ''; $mineselect = ''; $display_option = '';
+switch($vars['orient']) {
+ case 'all': $allselect = 'class="selected"';
+ break;
+ case 'friends': $friendsselect = 'class="selected"';
+ $display_option = '&amp;display=friends';
+ break;
+ case 'mine': $mineselect = 'class="selected"';
+ $display_option = '&amp;display=mine';
+ break;
+}
+?>
+<ul class="submenu riverdashboard">
+<?php
+ if(isloggedin()){
+?>
+ <li <?php echo $allselect; ?> ><a href="<?php echo $vars['url']; ?>mod/riverdashboard/"><?php echo elgg_echo('all'); ?></a></li>
+ <li <?php echo $friendsselect; ?> ><a href="<?php echo $vars['url']; ?>mod/riverdashboard/?display=friends"><?php echo elgg_echo('friends'); ?></a></li>
+ <li <?php echo $mineselect; ?> ><a href="<?php echo $vars['url']; ?>mod/riverdashboard/?display=mine"><?php echo elgg_echo('mine'); ?></a></li>
+
+<?php
+ }
+?>
</ul> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/nav.php b/mod/riverdashboard/views/default/riverdashboard/nav.php
index b38a4e20a..ab4aab10d 100644
--- a/mod/riverdashboard/views/default/riverdashboard/nav.php
+++ b/mod/riverdashboard/views/default/riverdashboard/nav.php
@@ -1,51 +1,51 @@
-<?php
-
-$contents = array();
-$contents['all'] = 'all';
-if (!empty($vars['config']->registered_entities)) {
- foreach ($vars['config']->registered_entities as $type => $ar) {
- foreach ($vars['config']->registered_entities[$type] as $object) {
- if($object != 'helppage'){
- if (!empty($object )) {
- $keyname = 'item:'.$type.':'.$object;
- } else $keyname = 'item:'.$type;
- $contents[$keyname] = "{$type},{$object}";
- }
- }
- }
-}
-
-$allselect = ''; $friendsselect = ''; $mineselect = ''; $display_option = '';
-switch($vars['orient']) {
- case '': $allselect = 'class="selected"';
- break;
- case 'friends': $friendsselect = 'class="selected"';
- $display_option = '&amp;display=friends';
- break;
- case 'mine': $mineselect = 'class="selected"';
- $display_option = '&amp;display=mine';
- break;
-}
-?>
-<div class="riverdashboard_filtermenu">
- <?php
- $location_filter = "<select onchange=\"window.open(this.options[this.selectedIndex].value,'_top')\" name=\"file_filter\" class='Notstyled' >";
- $current = get_input('subtype');
- foreach($contents as $label => $content) {
- $get_values = explode(",", $content);
- //select the current filter
- if($get_values[1] == $current)
- $selected = "SELECTED";
- //set the drop down filter
- if($content[0] && $content[1])
- $location_filter .= "<option {$selected} class='Nomenuoption' value=\"{$CONFIG->url}mod/riverdashboard/index.php?type={$get_values[0]}&subtype={$get_values[1]}{$display_option}\" >" . elgg_echo($label) . "</option>";
- //reset selected
- $selected = '';
- }
- $location_filter .= "</select>";
- echo $location_filter;
- ?>
- <input type="hidden" name="display" id="display" value="<?php echo htmlentities($vars['orient']); ?>" />
-</div>
-
-<div id="riverdashboard_updates" class="clearfloat"></div>
+<?php
+
+$contents = array();
+$contents['all'] = 'all';
+if (!empty($vars['config']->registered_entities)) {
+ foreach ($vars['config']->registered_entities as $type => $ar) {
+ foreach ($vars['config']->registered_entities[$type] as $object) {
+ if($object != 'helppage'){
+ if (!empty($object )) {
+ $keyname = 'item:'.$type.':'.$object;
+ } else $keyname = 'item:'.$type;
+ $contents[$keyname] = "{$type},{$object}";
+ }
+ }
+ }
+}
+
+$allselect = ''; $friendsselect = ''; $mineselect = ''; $display_option = '';
+switch($vars['orient']) {
+ case '': $allselect = 'class="selected"';
+ break;
+ case 'friends': $friendsselect = 'class="selected"';
+ $display_option = '&amp;display=friends';
+ break;
+ case 'mine': $mineselect = 'class="selected"';
+ $display_option = '&amp;display=mine';
+ break;
+}
+?>
+<div class="riverdashboard_filtermenu">
+ <?php
+ $location_filter = "<select onchange=\"window.open(this.options[this.selectedIndex].value,'_top')\" name=\"file_filter\" class='Notstyled' >";
+ $current = get_input('subtype');
+ foreach($contents as $label => $content) {
+ $get_values = explode(",", $content);
+ //select the current filter
+ if($get_values[1] == $current)
+ $selected = "SELECTED";
+ //set the drop down filter
+ if($content[0] && $content[1])
+ $location_filter .= "<option {$selected} class='Nomenuoption' value=\"{$CONFIG->url}mod/riverdashboard/index.php?type={$get_values[0]}&subtype={$get_values[1]}{$display_option}\" >" . elgg_echo($label) . "</option>";
+ //reset selected
+ $selected = '';
+ }
+ $location_filter .= "</select>";
+ echo $location_filter;
+ ?>
+ <input type="hidden" name="display" id="display" value="<?php echo htmlentities($vars['orient']); ?>" />
+</div>
+
+<div id="riverdashboard_updates" class="clearfloat"></div>
diff --git a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
index 61e5c238e..32d1b4675 100644
--- a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
+++ b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
@@ -1,15 +1,15 @@
-<?php
-/**
- * Elgg comments add on river form
- * @uses $vars['entity']
- */
-
-if (isset($vars['entity']) && isloggedin()) {
- $form_body = "<a class=\"river_comment_form_button\">Add comment</a>";
- $form_body .= "<div class=\"river_comment_form\" style=\"display:none;\">";
- $form_body .= elgg_view('input/text',array('internalname' => 'generic_comment', 'value' => 'Add a comment...'));
- $form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
- $form_body .= elgg_view('input/submit', array('value' => elgg_echo("post")));
- $form_body .= "</div>";
- echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add"));
+<?php
+/**
+ * Elgg comments add on river form
+ * @uses $vars['entity']
+ */
+
+if (isset($vars['entity']) && isloggedin()) {
+ $form_body = "<a class=\"river_comment_form_button\">Add comment</a>";
+ $form_body .= "<div class=\"river_comment_form\" style=\"display:none;\">";
+ $form_body .= elgg_view('input/text',array('internalname' => 'generic_comment', 'value' => 'Add a comment...'));
+ $form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
+ $form_body .= elgg_view('input/submit', array('value' => elgg_echo("post")));
+ $form_body .= "</div>";
+ echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add"));
} \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/welcome.php b/mod/riverdashboard/views/default/riverdashboard/welcome.php
index 3f8d705df..0e83fb63f 100644
--- a/mod/riverdashboard/views/default/riverdashboard/welcome.php
+++ b/mod/riverdashboard/views/default/riverdashboard/welcome.php
@@ -1,8 +1,8 @@
-<?php
-
- /**
- * Elgg thewire view page
- */
-
-?>
+<?php
+
+ /**
+ * Elgg thewire view page
+ */
+
+?>
<h2><?php echo sprintf(elgg_echo('welcome:user'), $_SESSION['user']->name); ?></h2> \ No newline at end of file