aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-23 08:50:42 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-23 08:50:42 +0000
commit1249826286c8aeab6af334973a62b1294ad5b173 (patch)
tree895e3d64fd96a1bad085fbf39434ef1a7554043e
parentde382a941d30b9f06e8fe440dc40549305badc84 (diff)
downloadelgg-1249826286c8aeab6af334973a62b1294ad5b173.tar.gz
elgg-1249826286c8aeab6af334973a62b1294ad5b173.tar.bz2
topic starting included in river
git-svn-id: https://code.elgg.org/elgg/trunk@2881 36083f99-b078-4883-b0ff-0f9b5a30f544
-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