aboutsummaryrefslogtreecommitdiff
path: root/mod/dokuwiki/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/dokuwiki/views/default')
-rw-r--r--mod/dokuwiki/views/default/dokuwiki/css.php12
-rw-r--r--mod/dokuwiki/views/default/dokuwiki/grouppage.php9
-rw-r--r--mod/dokuwiki/views/default/dokuwiki/index.php13
-rw-r--r--mod/dokuwiki/views/default/dokuwiki/metatags.php5
-rw-r--r--mod/dokuwiki/views/default/dokuwiki/sidebar.php10
-rw-r--r--mod/dokuwiki/views/default/object/dokuwiki.php19
-rw-r--r--mod/dokuwiki/views/default/river/dokuwiki.php17
7 files changed, 85 insertions, 0 deletions
diff --git a/mod/dokuwiki/views/default/dokuwiki/css.php b/mod/dokuwiki/views/default/dokuwiki/css.php
new file mode 100644
index 000000000..6753e79dc
--- /dev/null
+++ b/mod/dokuwiki/views/default/dokuwiki/css.php
@@ -0,0 +1,12 @@
+div.dokuwiki input {
+ width: auto;
+}
+
+div.dokuwiki .header {
+ margin-bottom: 10px;
+}
+
+#sidebartop {
+ position: relative !important;
+ display: none;
+}
diff --git a/mod/dokuwiki/views/default/dokuwiki/grouppage.php b/mod/dokuwiki/views/default/dokuwiki/grouppage.php
new file mode 100644
index 000000000..c095dfa2a
--- /dev/null
+++ b/mod/dokuwiki/views/default/dokuwiki/grouppage.php
@@ -0,0 +1,9 @@
+<?php
+
+$group = elgg_get_page_owner_entity();
+if ($group->dokuwiki_enable == 'yes' && $group->dokuwiki_frontpage_enable == 'yes') {
+ set_input("inline_page", true);
+ dokuwiki_page_handler(array($group->guid));
+}
+
+?>
diff --git a/mod/dokuwiki/views/default/dokuwiki/index.php b/mod/dokuwiki/views/default/dokuwiki/index.php
new file mode 100644
index 000000000..424f1109b
--- /dev/null
+++ b/mod/dokuwiki/views/default/dokuwiki/index.php
@@ -0,0 +1,13 @@
+<?php
+ global $CONFIG;
+ $destfile = $CONFIG->pluginspath.'dokuwiki/vendors/dokuwiki/'.$vars['page'];
+ if (file_exists($destfile)) {
+ if (strpos($destfile, ".png") === FALSE)
+ {
+ include($destfile);
+ } else {
+ header("Content-type: image");
+ echo file_get_contents($destfile);
+ }
+ }
+?>
diff --git a/mod/dokuwiki/views/default/dokuwiki/metatags.php b/mod/dokuwiki/views/default/dokuwiki/metatags.php
new file mode 100644
index 000000000..50cb9041b
--- /dev/null
+++ b/mod/dokuwiki/views/default/dokuwiki/metatags.php
@@ -0,0 +1,5 @@
+<?php
+if (elgg_get_context() == "dokuwiki") {
+ tpl_metaheaders();
+}
+?>
diff --git a/mod/dokuwiki/views/default/dokuwiki/sidebar.php b/mod/dokuwiki/views/default/dokuwiki/sidebar.php
new file mode 100644
index 000000000..e9a7c89ab
--- /dev/null
+++ b/mod/dokuwiki/views/default/dokuwiki/sidebar.php
@@ -0,0 +1,10 @@
+<?php
+
+$group = elgg_get_page_owner_entity();
+if ($group->dokuwiki_enable == 'yes' && $group->dokuwiki_frontsidebar_enable == 'yes') {
+ set_input("inline_sidebar", true);
+ set_input("inline_page", false);
+ dokuwiki_page_handler(array($group->guid));
+ }
+
+?>
diff --git a/mod/dokuwiki/views/default/object/dokuwiki.php b/mod/dokuwiki/views/default/object/dokuwiki.php
new file mode 100644
index 000000000..12063b9da
--- /dev/null
+++ b/mod/dokuwiki/views/default/object/dokuwiki.php
@@ -0,0 +1,19 @@
+<?php
+ $entity = $vars['entity'];
+ $owner_guid = $entity->container_guid;
+ $owner = get_entity($owner_guid);
+
+ $icon = elgg_view_entity_icon($owner, 'tiny');
+
+ if ($owner) {
+ $directory = elgg_get_data_path()."wikis/".$owner_guid."/pages";
+ $filecount = count(glob("" . $directory . "/*"));
+ $list_body = "<h3><a href='".$entity->getURL()."'>".sprintf(elgg_echo('dokuwiki:wikifrom'),$owner->name)."</a></h3>";
+ $list_body .= sprintf(elgg_echo("dokuwiki:pages"), $filecount);
+ echo elgg_view_image_block($icon, $list_body);
+ }
+ else {
+ // shouldn't show wikis from groups you can't see :-P
+ echo elgg_view_image_block("", "");
+ }
+?>
diff --git a/mod/dokuwiki/views/default/river/dokuwiki.php b/mod/dokuwiki/views/default/river/dokuwiki.php
new file mode 100644
index 000000000..67e6f60e7
--- /dev/null
+++ b/mod/dokuwiki/views/default/river/dokuwiki.php
@@ -0,0 +1,17 @@
+<?php
+ // 'action_type'=>$action_type, 'subject_guid'=>$subject_guid, 'object_guid' =>$object_guid, 'item'=>$res
+ $user = get_entity($vars['item']->subject_guid);
+ $wiki = get_entity($vars['item']->object_guid);
+ $parts = explode("/", $vars['item']->action_type);
+ $id = $wiki->container_guid;
+ $namespace = "<a href='".$wiki->getURL()."?id=".$parts[2]."'>".$parts[2]."</a>";
+ if ($wiki_owner = get_entity($wiki->container_guid))
+ $wikifrom = sprintf(elgg_echo("dokuwiki:wikifrom"), $wiki_owner->name);
+ else
+ $wikifrom = elgg_echo("dokuwiki:sitewiki");
+ if ($wiki)
+ $wikiname = "<a href='".$wiki->getURL()."'>".$wikifrom."</a>";
+ if ($user)
+ $user_node = "<a href='".$user->getURL()."'>" . $user->name . "</a>";
+ echo sprintf(elgg_echo("dokuwiki:river:modified"), $user_node, $namespace, $wikiname);
+?>