aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-11 20:53:45 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-11 20:53:45 +0000
commit3cf18e24d0083aaa4b287f7546a5f92adead9058 (patch)
tree0bd33784e530b2b3eefe652d0b526f1bbe2d0112 /mod
parentab4679de45c9608f9a87f90a1093ae3a2ae6559d (diff)
downloadelgg-3cf18e24d0083aaa4b287f7546a5f92adead9058.tar.gz
elgg-3cf18e24d0083aaa4b287f7546a5f92adead9058.tar.bz2
Added group forums to ECML views to parse.
git-svn-id: http://code.elgg.org/elgg/trunk@6462 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/start.php22
1 files changed, 19 insertions, 3 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 7c6d39b9d..e3f4d019a 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -72,9 +72,12 @@
// Now override icons
register_plugin_hook('entity:icon:url', 'group', 'groups_groupicon_hook');
-
+
// Register profile menu hook
register_plugin_hook('profile_menu', 'profile', 'forum_profile_menu');
+
+ // allow ecml in discussion
+ register_plugin_hook('get_views', 'ecml', 'groups_ecml_views_hook');
}
/**
@@ -208,7 +211,7 @@
}
} else {
add_submenu_item(elgg_echo('groups:all'), "{$CONFIG->wwwroot}pg/groups/world/", '1groupslinks');
-
+
if ($user = get_loggedin_user()) {
add_submenu_item(elgg_echo('groups:owned'), "{$CONFIG->wwwroot}pg/groups/owned/$user->username", '1groupslinks');
add_submenu_item(elgg_echo('groups:yours'), "{$CONFIG->wwwroot}pg/groups/member/$user->username", '1groupslinks');
@@ -569,7 +572,7 @@
function forum_profile_menu($hook, $entity_type, $return_value, $params) {
global $CONFIG;
-
+
if ($params['owner'] instanceof ElggGroup && $group_owner->forum_enable != 'no') {
$return_value[] = array(
'text' => elgg_echo('groups:forum'),
@@ -579,6 +582,19 @@
return $return_value;
}
+ /**
+ * Parse ECML on group discussion views
+ *
+ * @param unknown_type $hook
+ * @param unknown_type $entity_type
+ * @param unknown_type $return_value
+ * @param unknown_type $params
+ */
+ function groups_ecml_views_hook($hook, $entity_type, $return_value, $params) {
+ $return_value['forum/viewposts'] = elgg_echo('groups:ecml:discussion');
+
+ return $return_value;
+ }
register_extender_url_handler('group_topicpost_url','annotation', 'group_topic_post');