aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/endpoint
diff options
context:
space:
mode:
Diffstat (limited to 'mod/riverdashboard/endpoint')
-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);
+ }
+}