From 856dc92ef07c9fe06339349224533a12898b31d7 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 19 Jun 2010 16:31:35 +0000 Subject: There was no point in group discussions having their own comment annotations, better to use the generic comments so this has been changed and a full group activity stream added. For v1.8, there will need to be an upgrade script which will change 'group_topic_post' -> 'generic_comment' and on all existing topics, take the first annotation of type 'group_topic_post' and populate the topic's description. git-svn-id: http://code.elgg.org/elgg/trunk@6526 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/start.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'mod/groups/start.php') diff --git a/mod/groups/start.php b/mod/groups/start.php index e3f4d019a..7b11def20 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -75,6 +75,7 @@ // Register profile menu hook register_plugin_hook('profile_menu', 'profile', 'forum_profile_menu'); + register_plugin_hook('profile_menu', 'profile', 'activity_profile_menu'); // allow ecml in discussion register_plugin_hook('get_views', 'ecml', 'groups_ecml_views_hook'); @@ -276,6 +277,15 @@ set_input('group_guid', $page[1]); include($CONFIG->pluginspath . "groups/forum.php"); break; + case "edittopic": + set_input('group', $page[1]); + set_input('topic', $page[2]); + include($CONFIG->pluginspath . "groups/edittopic.php"); + break; + case "activity": + set_input('group', $page[1]); + include($CONFIG->pluginspath . "groups/activity.php"); + break; case "owned" : // Owned by a user if (isset($page[1])) @@ -581,6 +591,18 @@ } return $return_value; } + + function activity_profile_menu($hook, $entity_type, $return_value, $params) { + global $CONFIG; + + if ($params['owner'] instanceof ElggGroup) { + $return_value[] = array( + 'text' => elgg_echo('Activity'), + 'href' => "{$CONFIG->url}pg/groups/activity/{$params['owner']->getGUID()}" + ); + } + return $return_value; + } /** * Parse ECML on group discussion views -- cgit v1.2.3