aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/actions/forums/addtopic.php3
-rw-r--r--mod/groups/languages/en.php2
-rw-r--r--mod/groups/views/default/river/forum/topic/create.php17
3 files changed, 21 insertions, 1 deletions
diff --git a/mod/groups/actions/forums/addtopic.php b/mod/groups/actions/forums/addtopic.php
index b4c7ed189..9b510a9ae 100644
--- a/mod/groups/actions/forums/addtopic.php
+++ b/mod/groups/actions/forums/addtopic.php
@@ -63,6 +63,9 @@
// now add the topic message as an annotation
$grouptopic->annotate('group_topic_post',$message,$access, $user);
+
+ // add to river
+ add_to_river('river/forum/topic/create','create',$_SESSION['user']->guid,$grouptopic->guid);
// Success message
system_message(elgg_echo("grouptopic:created"));
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 13a26eac4..48259b66b 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -171,7 +171,7 @@ or click below to confirm request:
'groupforum:river:create' => 'a new discussion topic titled',
'groupforum:river:posted' => '%s has posted a new comment',
'groupforum:river:annotate:create' => 'on this discussion topic',
-
+ 'groupforum:river:postedtopic' => '%s has started a new discussion topic titled',
'groups:river:member' => '%s is now a member of',
'groups:nowidgets' => 'No widgets have been defined for this group.',
diff --git a/mod/groups/views/default/river/forum/topic/create.php b/mod/groups/views/default/river/forum/topic/create.php
new file mode 100644
index 000000000..2ccd72ef1
--- /dev/null
+++ b/mod/groups/views/default/river/forum/topic/create.php
@@ -0,0 +1,17 @@
+<?php
+
+ $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+ $object = get_entity($vars['item']->object_guid);
+ //$url = $object->getURL();
+ $forumtopic = $object->guid;
+ $group_guid = $object->container_guid;
+
+ $url = $vars['url'] . "mod/groups/topicposts.php?topic=" . $forumtopic . "&group_guid=" . $group_guid;
+
+ $url_user = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+ $string = sprintf(elgg_echo("groupforum:river:postedtopic"),$url_user) . ": ";
+ $string .= "<a href=\"" . $url . "\">" . $object->title . "</a>";
+
+?>
+
+<?php echo $string; ?> \ No newline at end of file