aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages/ca.php2
-rwxr-xr-xlanguages/en.php2
-rwxr-xr-xlanguages/es.php2
-rw-r--r--start.php25
4 files changed, 16 insertions, 15 deletions
diff --git a/languages/ca.php b/languages/ca.php
index effccb3bf..8e96ce3e3 100644
--- a/languages/ca.php
+++ b/languages/ca.php
@@ -4,7 +4,7 @@
$catalan = array(
'dokuwiki:wiki' => "Wiki" ,
- 'dokuwiki:groupwiki' => "Wiki" ,
+ 'dokuwiki:group' => "Wiki del group" ,
'dokuwiki:userwiki' => "La meva Wiki" ,
'dokuwiki' => "Wikis" ,
'item:object:dokuwiki' => "Wikis" ,
diff --git a/languages/en.php b/languages/en.php
index f2748f25b..a24819ddc 100755
--- a/languages/en.php
+++ b/languages/en.php
@@ -16,7 +16,7 @@
"dokuwiki:wikifrom"=>'%s wiki',
"dokuwiki:pages"=>'%s pages',
"dokuwiki:dokuwiki"=>'Wiki',
- "dokuwiki:groupwiki"=>'Wiki',
+ "dokuwiki:group"=>'Group wiki',
"dokuwiki:userwiki"=>'My Wiki',
"groups:enabledokuwiki"=>'Enable group wiki',
"groups:enabledokuwiki_frontpage"=>'Show main wiki page in the group front page (only if wiki is enabled)',
diff --git a/languages/es.php b/languages/es.php
index 46e665c53..fc9240a6e 100755
--- a/languages/es.php
+++ b/languages/es.php
@@ -11,7 +11,7 @@
$spanish = array(
"dokuwiki:wiki"=>'Wiki',
- "dokuwiki:groupwiki"=>'Wiki',
+ "dokuwiki:group"=>'Wiki del grupo',
"dokuwiki:userwiki"=>'Mi Wiki',
"dokuwiki"=>'Wikis',
"item:object:dokuwiki"=>'Wikis',
diff --git a/start.php b/start.php
index 2fc13011b..4cb80b4b9 100644
--- a/start.php
+++ b/start.php
@@ -152,17 +152,16 @@
return;
}
- function elggdokuwiki_pagesetup() {
- global $CONFIG;
- if (page_owner()) {
- $page_owner = page_owner_entity();
- if ($page_owner instanceof ElggGroup && $page_owner->dokuwiki_enable == 'yes')
- $title = elgg_echo("dokuwiki:groupwiki");
- if ($title && get_context() == "groups") {
- add_submenu_item($title, $CONFIG->wwwroot . "pg/dokuwiki/" . page_owner());
- }
- }
-
+ /**
+ * Add a menu item to an ownerblock
+ */
+ function dokuwiki_owner_block_menu($hook, $type, $return, $params) {
+ if (elgg_instanceof($params['entity'], 'group') /*&& $params['entity']->dokuwiki_enable != "no"*/) {
+ $url = "dokuwiki/group/{$params['entity']->guid}/all";
+ $item = new ElggMenuItem('dokuwiki', elgg_echo('dokuwiki:group'), $url);
+ $return[] = $item;
+ }
+ return $return;
}
function elggdokuwiki_icon_hook($hook, $entity_type, $returnvalue, $params) {
@@ -185,7 +184,9 @@
register_entity_type('object','dokuwiki');
register_plugin_hook('entity:icon:url', 'object', 'elggdokuwiki_icon_hook');
register_entity_url_handler('elggdokuwiki_url','object', 'dokuwiki');
- register_elgg_event_handler('pagesetup','system','elggdokuwiki_pagesetup');
+
+ // add blog link to
+ elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'dokuwiki_owner_block_menu');
register_page_handler('dokuwiki','elggdokuwiki_page_handler');
add_group_tool_option('dokuwiki',elgg_echo('groups:enabledokuwiki'),false);