aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/endpoint/get_likes.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-08 21:37:14 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-08 21:37:14 +0000
commit375a3021d73e629883830c1c9aa6fd216d59e6d3 (patch)
treebd8b237d877ee383125a7a68b72d1b190287e989 /mod/riverdashboard/endpoint/get_likes.php
parentb6ec22721c68bd12db74c0bb9e55482e17f4e58e (diff)
downloadelgg-375a3021d73e629883830c1c9aa6fd216d59e6d3.tar.gz
elgg-375a3021d73e629883830c1c9aa6fd216d59e6d3.tar.bz2
Ajaxified likes view on activity stream.
git-svn-id: http://code.elgg.org/elgg/trunk@6409 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/endpoint/get_likes.php')
-rw-r--r--mod/riverdashboard/endpoint/get_likes.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/riverdashboard/endpoint/get_likes.php b/mod/riverdashboard/endpoint/get_likes.php
new file mode 100644
index 000000000..cc9e83aaf
--- /dev/null
+++ b/mod/riverdashboard/endpoint/get_likes.php
@@ -0,0 +1,22 @@
+<?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);
+ }
+}