aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/start.php13
-rw-r--r--mod/groups/topicposts.php4
-rw-r--r--mod/groups/views/default/forum/topicposts.php1
-rw-r--r--mod/groups/views/rss/forum/topicposts.php3
-rw-r--r--mod/groups/views/rss/forum/viewposts.php12
5 files changed, 32 insertions, 1 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 1b3cc2e1e..62e786f6f 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -487,6 +487,19 @@
}
+ /**
+ * Overrides topic post getURL() value.
+ *
+ */
+ function group_topicpost_url($annotation) {
+ if ($parent = get_entity($annotation->entity_guid)) {
+ global $CONFIG;
+ return $CONFIG->wwwroot . 'mod/groups/topicposts.php?topic='.$parent->guid.'&group_guid='.$parent->container_guid.'#' . $annotation->id;
+ }
+ }
+
+ register_extender_url_handler('group_topicpost_url','annotation', 'group_topic_post');
+
// Register a handler for create groups
register_elgg_event_handler('create', 'group', 'groups_create_event_listener');
diff --git a/mod/groups/topicposts.php b/mod/groups/topicposts.php
index 7a2efaa70..ea8a82bac 100644
--- a/mod/groups/topicposts.php
+++ b/mod/groups/topicposts.php
@@ -13,6 +13,10 @@
// Load Elgg engine
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ // We now have RSS on topics
+ global $autofeed;
+ $autofeed = true;
+
//get_input('group_guid');
set_page_owner(get_input('group_guid'));
if (!(page_owner_entity() instanceof ElggGroup)) forward();
diff --git a/mod/groups/views/default/forum/topicposts.php b/mod/groups/views/default/forum/topicposts.php
index 5b259d13f..e9ddaa40e 100644
--- a/mod/groups/views/default/forum/topicposts.php
+++ b/mod/groups/views/default/forum/topicposts.php
@@ -20,6 +20,7 @@
<table width="100%">
<tr>
<td>
+ <a name="<?php echo $vars['entity']->id; ?>"></a>
<?php
//get infomation about the owner of the comment
if ($post_owner = get_user($vars['entity']->owner_guid)) {
diff --git a/mod/groups/views/rss/forum/topicposts.php b/mod/groups/views/rss/forum/topicposts.php
new file mode 100644
index 000000000..0165eb215
--- /dev/null
+++ b/mod/groups/views/rss/forum/topicposts.php
@@ -0,0 +1,3 @@
+<?php
+
+?> \ No newline at end of file
diff --git a/mod/groups/views/rss/forum/viewposts.php b/mod/groups/views/rss/forum/viewposts.php
index 157be91da..b537ffc83 100644
--- a/mod/groups/views/rss/forum/viewposts.php
+++ b/mod/groups/views/rss/forum/viewposts.php
@@ -10,7 +10,17 @@
* @link http://elgg.com/
*/
- echo elgg_view_entity($vars['entity']);
+ //display follow up comments
+ $count = $vars['entity']->countAnnotations('group_topic_post');
+ $offset = (int) get_input('offset',0);
+
+ foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
+ $post->title = '';
+ $post->description = $post->value;
+ echo elgg_view('object/default', array('entity' => $post));
+ // echo elgg_view("forum/topicposts",array('entity' => $post));
+
+ }
?> \ No newline at end of file