diff options
Diffstat (limited to 'mod/riverdashboard/views/default/river')
5 files changed, 0 insertions, 291 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 e980f5dbd..000000000 --- a/mod/riverdashboard/views/default/river/item/list.php +++ /dev/null @@ -1,63 +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 = 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.'">« ' . 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') . ' »</a> '; - } - - if (!empty($nav)) { - echo '<div class="pagination clearfloat">'.$nav.'</div>'; - } -} - -?> - -<script type="text/javascript"> - -// pull in extra comments and likes with ajax -$(function() { - -}); -</script>
\ 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 a2bc10c54..000000000 --- a/mod/riverdashboard/views/default/river/item/wrapper.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -/** - * Elgg river item wrapper. - * Wraps all river items. - * - * @todo: Clean up this logic. - * It looks like this only will allow comments on non user and non group forum - * topic entities. - * - * Different chunks are used depending on if comments exist or not. - * - * - */ - -$object = get_entity($vars['item']->object_guid); -$object_url = $object->getURL(); -$likes_count = 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); -} - -// get last three comments display -// want the 3 most recent comments (order by time_created desc = 3 2 1) -// but will display them with the newest at the bottom (1 2 3) -if ($comments = get_annotations($vars['item']->object_guid, "", "", 'generic_comment', "", "", 3, 0, "desc")) { - $comments = array_reverse($comments); -} - -// for displaying "+N more" -// -3 from the count because the 3 displayed don't count in the "more" -$comment_count = count_annotations($vars['item']->object_guid, $vars['item']->type, $vars['item']->subtype, 'generic_comment'); -if ($comment_count < 3) { - $more_comments_count = 0; -} else { - $more_comments_count = $comment_count - 3; -} - -?> -<div class="river_item riverdashboard" id="river_entity_<?php echo $object->guid; ?>"> - <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 ($comments){ - $counter = 0; - - echo "<div class='river_comments_tabs clearfloat'>"; - echo "<a class='river_more_comments show_comments_button link'>" . elgg_echo('comments') . '</a>'; - - if ($likes_count != 0) { - echo elgg_view('likes/forms/display', array('entity' => $object)); - } - - echo "</div>"; // close river_comments_tabs - - echo "<div class='river_comments'>"; - - if ($likes_count != 0) { - //show the users who liked the object - echo "<div class='likes_list hidden'>"; - echo list_annotations($object->getGUID(), 'likes', 99); - echo "</div>"; - } - - echo "<div class=\"comments_container\">"; - // display appropriate comment link - if ($more_comments_count > 0) { - echo "<a class=\"river_show_more_comments link\">" . - sprintf(elgg_echo('riverdashbardo:n_more_comments'), $more_comments_count) . '</a>'; - } - echo "<div class=\"comments_list\">"; - foreach ($comments as $comment) { - //get the comment owner - $comment_owner = get_user($comment->owner_guid); - //get the comment owner's profile url - $comment_owner_url = $comment_owner->getURL(); - // color-code each of the 3 comments - // @todo this isn't used in CSS... - 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 and strip tags - $contents = elgg_make_excerpt($comment->value, 150); - - 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($comment->time_created) . "</span>"; - echo "</div></div>"; - $counter++; - } - echo elgg_make_river_comment($object); - - echo '</div>'; // close comments_list. - - echo "</div></div>"; // close comments_container and river_comments -} else { - // tab bar nav - for users that liked object - if ($vars['item']->type != 'user' && $likes_count != 0) { - echo "<div class='river_comments_tabs clearfloat'>"; - } - - if ($likes_count != 0) { - echo elgg_view('likes/forms/display', array('entity' => $object)); - } - - if ($vars['item']->type != 'user' && $likes_count != 0) { - echo "</div>"; // close river_comments_tabs - } - - if ($vars['item']->type != 'user') { - echo "<div class='river_comments'>"; - } - if ($likes_count != 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>"; - } -} -?> - </div> -</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 0a3c1da8f..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 |
