aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/endpoint
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 18:31:27 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 18:31:27 +0000
commitb6f99468651309e0b58dbe000958540809df5dcc (patch)
tree2eb822efea669a1f12d44818e001aaa22b331f69 /mod/riverdashboard/endpoint
parent6729784c18099d4e34c2ed6146b63f275a2eea54 (diff)
downloadelgg-b6f99468651309e0b58dbe000958540809df5dcc.tar.gz
elgg-b6f99468651309e0b58dbe000958540809df5dcc.tar.bz2
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
Diffstat (limited to 'mod/riverdashboard/endpoint')
-rw-r--r--mod/riverdashboard/endpoint/get_comments.php40
-rw-r--r--mod/riverdashboard/endpoint/get_likes.php22
-rw-r--r--mod/riverdashboard/endpoint/ping.php59
3 files changed, 0 insertions, 121 deletions
diff --git a/mod/riverdashboard/endpoint/get_comments.php b/mod/riverdashboard/endpoint/get_comments.php
deleted file mode 100644
index f130cfd3c..000000000
--- a/mod/riverdashboard/endpoint/get_comments.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Grabs more comments to display.
- */
-
-require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
-$limit = get_input('limit', 25);
-// 3 are displayed by default.
-$offset = get_input('offset', 3);
-$entity_guid = get_input('entity_guid');
-if (!$entity = get_entity($entity_guid)) {
- exit;
-}
-
-// same deal as the main view...get the newest $limit, but reverse it to put the newest at the bottom.
-if ($comments = get_annotations($entity_guid, "", "", 'generic_comment', "", "", $limit, $offset, "desc")) {
- $comments = array_reverse($comments);
-}
-
-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();
-
- //display comment
- echo "<div class='river-comment clearfix'>";
- 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_get_excerpt($comment->value, 150);
-
- echo "<div class='river-comment-contents'>";
- echo "<a href=\"{$comment_owner_url}\">" . $comment_owner->name . '</a>&nbsp;<span class="twitter_anywhere">' . parse_urls($contents) . '</span>';
- echo "<span class='entity-subtext'>" . elgg_view_friendly_time($comment->time_created) . "</span>";
- echo "</div></div>";
-} \ No newline at end of file
diff --git a/mod/riverdashboard/endpoint/get_likes.php b/mod/riverdashboard/endpoint/get_likes.php
deleted file mode 100644
index cc9e83aaf..000000000
--- a/mod/riverdashboard/endpoint/get_likes.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
- * Grabs more "likes" to display.
- */
-
-require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
-$limit = get_input('limit', 25);
-$offset = get_input('offset', 0);
-$entity_guid = get_input('entity_guid');
-
-if (!$entity = get_entity($entity_guid)) {
- exit;
-}
-
-$annotations = $entity->getAnnotations('likes', $limit, $offset);
-
-if (is_array($annotations) && sizeof($annotations) > 0) {
- foreach($annotations as $annotation) {
- echo elgg_view_annotation($annotation, "", false);
- }
-}
diff --git a/mod/riverdashboard/endpoint/ping.php b/mod/riverdashboard/endpoint/ping.php
deleted file mode 100644
index 94c6fe377..000000000
--- a/mod/riverdashboard/endpoint/ping.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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;
-
-// This entire system is driven by the river table.
-// There is no core interface to simply grab the number of entries in the table.
-// In order for something to count as an update, you must put a call to add_river-item().
-// @todo Remove this when elgg_get_river-items() supports 1.7-style API and count => TRUE and not group by object_guid
-
-// river table does not have columns expected by get_access_sql_suffix so we modify its output
-$access = str_replace("and enabled='yes'", '', str_replace('owner_guid', 'subject_guid', riverdashboard_get_access_sql_suffix('r', 'e')));
-
-$q = "SELECT COUNT(id) as all_activity FROM {$CONFIG->dbprefix}river r, {$CONFIG->dbprefix}entities e
- WHERE r.posted > $last_reload AND r.object_guid = e.guid AND ($access)";
-
-if ($d = get_data($q)) {
- $all_activity = $d[0]->all_activity;
-} else {
- $all_activity = 0;
-}
-
-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;
-}