aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/riverdashboard/start.php')
-rw-r--r--mod/riverdashboard/start.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php
index c093f5ecb..6badd8393 100644
--- a/mod/riverdashboard/start.php
+++ b/mod/riverdashboard/start.php
@@ -32,4 +32,20 @@ function riverdashboard_dashboard() {
include(dirname(__FILE__) . '/index.php');
}
+/**
+ * For users to make a comment on a river item
+ *
+ * @param ElggEntity $entity The entity to comment on
+ * @return string|false The HTML (etc) for the comment form, or false on failure
+ */
+function elgg_make_river_comment($entity){
+ if (!($entity instanceof ElggEntity)) {
+ return false;
+ } else {
+ //display the comment form
+ $comments = elgg_view('riverdashboard/rivercomment',array('entity' => $entity));
+ return $comments;
+ }
+}
+
register_elgg_event_handler('init','system','riverdashboard_init');