aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/views/default/river
diff options
context:
space:
mode:
Diffstat (limited to 'mod/riverdashboard/views/default/river')
-rw-r--r--mod/riverdashboard/views/default/river/dashboard.php19
-rw-r--r--mod/riverdashboard/views/default/river/item/list.php54
-rw-r--r--mod/riverdashboard/views/default/river/item/wrapper.php140
-rw-r--r--mod/riverdashboard/views/default/river/item/wrapper_classic.php22
-rw-r--r--mod/riverdashboard/views/default/river/relationship/friend/create.php36
5 files changed, 0 insertions, 271 deletions
diff --git a/mod/riverdashboard/views/default/river/dashboard.php b/mod/riverdashboard/views/default/river/dashboard.php
deleted file mode 100644
index 5fe7c35d3..000000000
--- a/mod/riverdashboard/views/default/river/dashboard.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Elgg river for dashboard.
- */
-
-/// Extract the river
-$river = $vars['river'];
-?>
-<div id="river">
-<?php
-if (($river) && (count($river)>0)) {
- foreach ($river as $r) {
- echo $r;
- }
-} else {
- echo elgg_echo('river:widget:noactivity');
-}
-?>
-</div><!-- /river --> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/river/item/list.php b/mod/riverdashboard/views/default/river/item/list.php
deleted file mode 100644
index e7e1a9c07..000000000
--- a/mod/riverdashboard/views/default/river/item/list.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
- if (isset($vars['items']) && is_array($vars['items'])) {
-
- $i = 0;
- if (!empty($vars['items'])) {
- foreach($vars['items'] as $item) {
- echo elgg_view_river_item($item);
- $i++;
- if ($i >= $vars['limit']) {
- break;
- }
- }
- }
- }
-
- if ($vars['pagination'] !== false) {
- $baseurl = $_SERVER['REQUEST_URI'];
- $baseurl = $baseurl = preg_replace('/[\&\?]offset\=[0-9]*/',"",$baseurl);
-
- $nav = '';
-
- if (sizeof($vars['items']) > $vars['limit']) {
- $newoffset = $vars['offset'] + $vars['limit'];
- $urladdition = 'offset='.$newoffset;
- if (substr_count($baseurl,'?')) {
- $nexturl = $baseurl . '&' . $urladdition;
- } else {
- $nexturl=$baseurl . '?' . $urladdition;
- }
-
- $nav .= '<a class="pagination_previous" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
- }
-
- if ($vars['offset'] > 0) {
- $newoffset = $vars['offset'] - $vars['limit'];
- if ($newoffset < 0) {
- $newoffset = 0;
- }
- $urladdition = 'offset='.$newoffset;
- if (substr_count($baseurl,'?')) {
- $prevurl=$baseurl . '&' . $urladdition;
- } else {
- $prevurl=$baseurl . '?' . $urladdition;
- }
-
- $nav .= '<a class="pagination_next" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
- }
-
- if (!empty($nav)) {
- echo '<div class="pagination clearfloat">'.$nav.'</div>';
- }
- }
-?> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/river/item/wrapper.php b/mod/riverdashboard/views/default/river/item/wrapper.php
deleted file mode 100644
index 7a3285382..000000000
--- a/mod/riverdashboard/views/default/river/item/wrapper.php
+++ /dev/null
@@ -1,140 +0,0 @@
-<?php
-/**
- * Elgg river item wrapper.
- * Wraps all river items.
- */
-
-//set required variables
-$object = get_entity($vars['item']->object_guid);
-//get object url
-$object_url = $object->getURL();
-$numoflikes = elgg_count_likes($object);
-
-//user
-//if displaying on the profile get the object owner, else the subject_guid
-if(get_context() == 'profile' && $object->getSubtype() == 'thewire')
- $user = get_entity($object->owner_guid);
-else
- $user = get_entity($vars['item']->subject_guid);
-
-//count comment annotations
-$comment_count = count_annotations($vars['item']->object_guid, $vars['item']->type, $vars['item']->subtype, $annotation_comment);
-
-//get last three comments display
-$get_comments = get_annotations($vars['item']->object_guid, "", "", 'generic_comment', "", "", 3, 0, "desc");
-
-if($get_comments){
- //reverse the array so we can display comments in the right order
- $get_comments = array_reverse($get_comments);
-}
-
-//minus 3 off the comment total as we display 3 by default
-if($comment_count < 3)
- $num_comments = 0;
-else
- $num_comments = $comment_count - 3;
-?>
-<div class="river_item riverdashboard">
- <span class="river_item_useravatar">
- <?php echo elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')); ?>
- </span>
- <div class="river_item_contents clearfloat">
- <?php
- // body contents, generated by the river view in each plugin
- echo $vars['body'];
-
- //display latest 3 comments if there are any
- if($get_comments){
- $counter = 0;
- //$background = "";
-
- echo "<div class='river_comments_tabs clearfloat'>";
-
- if($comment_count <= 3) {
- echo "<a class='river_more_comments show_comments_button link'>Comments</a>";
- }
-
- //display 'more comments' if there are any
- if($num_comments != 0){
- echo "<a class='river_more_comments show_comments_button link'>Comments (+{$num_comments} more)</a>";
- }
-
- if($numoflikes != 0){
- echo elgg_view('likes/forms/display', array('entity' => $object));
- }
- echo "</div>"; // close river_comments_tabs
-
- echo "<div class='river_comments'>";
-
- if($numoflikes != 0){
- //show the users who liked the object
- echo "<div class='likes_list hidden'>";
- echo list_annotations($object->getGUID(), 'likes', 99);
- echo "</div>";
- }
-
- foreach($get_comments as $gc){
- //get the comment owner
- $comment_owner = get_user($gc->owner_guid);
- //get the comment owner's profile url
- $comment_owner_url = $comment_owner->getURL();
- // color-code each of the 3 comments
- if( ($counter == 2 && $comment_count >= 4) || ($counter == 1 && $comment_count == 2) || ($counter == 0 && $comment_count == 1) || ($counter == 2 && $comment_count == 3) )
- $alt = 'latest';
- else if( ($counter == 1 && $comment_count >= 4) || ($counter == 0 && $comment_count == 2) || ($counter == 1 && $comment_count == 3) )
- $alt = 'penultimate';
-
- //display comment
- echo "<div class='river_comment {$alt} clearfloat'>";
- echo "<span class='river_comment_owner_icon'>";
- echo elgg_view("profile/icon",array('entity' => $comment_owner, 'size' => 'tiny'));
- echo "</span>";
- //truncate comment to 150 characters
- if(strlen($gc->value) > 150) {
- $gc->value = substr($gc->value, 0, strpos($gc->value, ' ', 150)) . "&hellip;";
- }
- $contents = strip_tags($gc->value);
- echo "<div class='river_comment_contents'>";
- echo "<a href=\"{$comment_owner_url}\">" . $comment_owner->name . "</a> " . parse_urls($contents);
- echo "<span class='entity_subtext'>" . friendly_time($gc->time_created) . "</span>";
- echo "</div></div>";
- $counter++;
- }
- echo elgg_make_river_comment($object);
- echo "</div>"; // close river_comments
- } else {
- // tab bar nav - for users that liked object
- $numoflikes = elgg_count_likes($object);
-
- if ($vars['item']->type != 'user' && $numoflikes != 0) {
- echo "<div class='river_comments_tabs clearfloat'>";
- }
- if($numoflikes != 0){
- echo elgg_view('likes/forms/display', array('entity' => $object));
- }
- if ($vars['item']->type != 'user' && $numoflikes != 0) {
- echo "</div>"; // close river_comments_tabs
- }
-
- if ($vars['item']->type != 'user') {
- echo "<div class='river_comments'>";
- }
- if($numoflikes != 0){
- //show the users who liked the object
- echo "<div class='likes_list hidden'>";
- echo list_annotations($object->getGUID(), 'likes', 99);
- echo "</div>";
- }
-
- // if there are no comments to display
- // and this is not a user or a group discussion entry - include the inline comment form
- if($vars['item']->type != 'user' && $vars['item']->subtype != 'groupforumtopic') {
- echo elgg_make_river_comment($object);
- }
- if ($vars['item']->type != 'user') {
- echo "</div>";
- }
- }
-echo "</div>"; // close river_item_contents
-?>
-</div> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/river/item/wrapper_classic.php b/mod/riverdashboard/views/default/river/item/wrapper_classic.php
deleted file mode 100644
index abbed46d6..000000000
--- a/mod/riverdashboard/views/default/river/item/wrapper_classic.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
- * Elgg river item wrapper.
- * Wraps all river items.
- *
- * @package Elgg
- * @author Curverider
- * @link http://elgg.com/
- */
-?>
-<div class="river_item riverdashboard">
- <span class="river_item_useravatar">
- <?php
- echo elgg_view("profile/icon",array('entity' => get_entity($vars['item']->subject_guid), 'size' => 'small'));
- ?>
- </span>
- <div class="river_item_contents clearfloat">
- <?php
- echo $vars['body'];
- ?>
- </div>
-</div> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/river/relationship/friend/create.php b/mod/riverdashboard/views/default/river/relationship/friend/create.php
deleted file mode 100644
index 916efd407..000000000
--- a/mod/riverdashboard/views/default/river/relationship/friend/create.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/**
- * Elgg relationship create event.
- * Display something in the river when a relationship is created.
- */
-
-$statement = $vars['statement'];
-
-$performed_by = $statement->getSubject();
-$event = $statement->getEvent();
-$object = $statement->getObject();
-
-if (is_array($object)) {
- switch ($object['relationship']) {
- // Friending
- case 'friend' :
- case 'friends' : // 'friends' shouldn't be used, but just incase :)
-
- // Get second object
- $userb = $object['object'];
-
- // Only users can be friends
- if (($performed_by instanceof ElggUser) && ($userb instanceof ElggUser)) {
- // User A
- echo "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a> ";
-
- // Verb
- echo elgg_echo('river:relationship:friend');
-
- // user B
- echo " <a href=\"{$userb->getURL()}\">{$userb->name}</a>";
- }
-
- break;
- }
-} \ No newline at end of file