From b6f99468651309e0b58dbe000958540809df5dcc Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 29 Dec 2010 18:31:27 +0000 Subject: Fixes #2226 moves riverdashboard into secondary plugins from core plugins - most of riverdashboard functionality is now in core (except for displaying who has liked stuff and ajax refreshes) git-svn-id: http://code.elgg.org/elgg/trunk@7750 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/river/item/list.php | 63 --------- .../views/default/river/item/wrapper.php | 150 --------------------- .../views/default/river/item/wrapper_classic.php | 20 --- 3 files changed, 233 deletions(-) delete mode 100644 mod/riverdashboard/views/default/river/item/list.php delete mode 100644 mod/riverdashboard/views/default/river/item/wrapper.php delete mode 100644 mod/riverdashboard/views/default/river/item/wrapper_classic.php (limited to 'mod/riverdashboard/views/default/river/item') 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 fb0656022..000000000 --- a/mod/riverdashboard/views/default/river/item/list.php +++ /dev/null @@ -1,63 +0,0 @@ -= $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 .= '« ' . elgg_echo('previous') . ' '; - } - - 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 .= '' . elgg_echo('next') . ' » '; - } - - if (!empty($nav)) { - echo ''; - } -} - -?> - - \ 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 4f6100114..000000000 --- a/mod/riverdashboard/views/default/river/item/wrapper.php +++ /dev/null @@ -1,150 +0,0 @@ -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 (elgg_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 limit 3) -// 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; -} - -?> -
- - $user, 'size' => 'small')); ?> - - -
-"; - echo "" . elgg_echo('comments') . ''; - - if ($likes_count != 0) { - echo elgg_view('forms/likes/display', array('entity' => $object)); - } - - echo "
"; // close river-comments-tabs - - echo "
"; - - if ($likes_count != 0) { - //show the users who liked the object - // this is loaded via ajax to avoid pounding the server with avatar requests. - echo ""; - } - - echo "
"; - // display appropriate comment link - if ($more_comments_count > 0) { - echo "" . - elgg_echo('riverdashboard:n_more_comments', array($more_comments_count)) . ''; - - echo "" . elgg_echo('riverdashboard:show_less') . ''; - } - echo "
"; - 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 "
"; - echo ""; - echo elgg_view("profile/icon", array('entity' => $comment_owner, 'size' => 'tiny')); - echo ""; - - //truncate comment to 150 characters and strip tags - $contents = elgg_get_excerpt($comment->value, 150); - - echo "
"; - echo "" . $comment_owner->name . ' ' . parse_urls($contents) . ''; - echo "" . elgg_view_friendly_time($comment->time_created) . ""; - echo "
"; - $counter++; - } - - // close comments_list, comments_container and river-comments - echo '
' . elgg_make_river_comment($object) . '
'; -} else { - // tab bar nav - for users that liked object - if ($vars['item']->type != 'user' && $likes_count != 0) { - echo "
"; - } - - if ($likes_count != 0) { - echo elgg_view('forms/likes/display', array('entity' => $object)); - } - - if ($vars['item']->type != 'user' && $likes_count != 0) { - echo "
"; // close river-comments-tabs - } - - if ($vars['item']->type != 'user') { - echo "
"; - } - if ($likes_count != 0) { - //show the users who liked the object - echo ""; - } - - // if there are no comments to display - // and this is not a user - include the inline comment form - if ($vars['item']->type != 'user') { - echo elgg_make_river_comment($object); - } - if ($vars['item']->type != 'user') { - echo "
"; - } -} -?> -
- 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 58fe938f4..000000000 --- a/mod/riverdashboard/views/default/river/item/wrapper_classic.php +++ /dev/null @@ -1,20 +0,0 @@ - -
- - get_entity($vars['item']->subject_guid), 'size' => 'small')); -?> - -
- -
-
\ No newline at end of file -- cgit v1.2.3