diff options
author | sembrestels <sembrestels@riseup.net> | 2011-10-13 15:23:11 +0200 |
---|---|---|
committer | sembrestels <sembrestels@riseup.net> | 2011-10-13 15:23:11 +0200 |
commit | 74bd6999c5e5c23ebbf90dbb6bdaabbddd7594cf (patch) | |
tree | 834c120d692be288f261bcae169eedd3d6b31d74 /vendors/dokuwiki/lib/tpl/default/main.php | |
parent | f8be8643f0faadb2c0ce87d553b7b9d569af5afd (diff) | |
download | elgg-74bd6999c5e5c23ebbf90dbb6bdaabbddd7594cf.tar.gz elgg-74bd6999c5e5c23ebbf90dbb6bdaabbddd7594cf.tar.bz2 |
Rename lib/dokuwiki to vendors/dokuwiki
Diffstat (limited to 'vendors/dokuwiki/lib/tpl/default/main.php')
-rw-r--r-- | vendors/dokuwiki/lib/tpl/default/main.php | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/vendors/dokuwiki/lib/tpl/default/main.php b/vendors/dokuwiki/lib/tpl/default/main.php new file mode 100644 index 000000000..11c4ea967 --- /dev/null +++ b/vendors/dokuwiki/lib/tpl/default/main.php @@ -0,0 +1,69 @@ +<?php +/** + * DokuWiki Default Template + * + * This is the template you need to change for the overall look + * of DokuWiki. + * + * You should leave the doctype at the very top - It should + * always be the very first line of a document. + * + * @link http://dokuwiki.org/templates + * @author Andreas Gohr <andi@splitbrain.org> + */ + +// must be run from within DokuWiki +if (!defined('DOKU_INC')) die(); + + +$sidebar_inline = get_input("inline_sidebar"); +$page_inline = get_input("inline_page"); + +if (empty($sidebar_inline)) { +ob_start(); +include(dirname(__FILE__).'/main_index.php'); +$content = ob_get_clean(); +} + +if (empty($page_inline)) { +// include functions that provide sidebar functionality +@require_once(dirname(__FILE__).'/tplfn_sidebar.php'); +ob_start(); +include(dirname(__FILE__).'/sidebar.php'); +$sidebar = ob_get_clean(); +} + +if (empty($sidebar_inline) && empty($page_inline)) { + + elgg_push_breadcrumb(elgg_echo('dokuwiki'), 'dokuwiki/all'); + elgg_push_breadcrumb(sprintf(elgg_echo('dokuwiki:wikifrom'), elgg_get_page_owner_entity()->name)); + + $title = sprintf(elgg_echo('dokuwiki:wikifrom'), elgg_get_page_owner_entity()->name); + + $sidebar = elgg_view_module('aside', elgg_echo('dokuwiki:sidebar'), $sidebar); + + $body = elgg_view_layout('content', array( + 'filter' => '', + 'content' => $content, + 'title' => $title, + 'sidebar' => $sidebar, + )); + + echo elgg_view_page($title, $body); +} +else { + $all_link = elgg_get_site_url().'dokuwiki/'.elgg_get_page_owner_guid(); + $all_text = elgg_echo('link:view:all'); + $all_link = "<a href=\"$all_link\">$all_text</a>"; + + echo elgg_view('groups/profile/module', array( + 'title' => $content ? elgg_echo('dokuwiki:group') : elgg_echo('dokuwiki:sidebar'), + 'content' => $content . $sidebar, + 'all_link' => $all_link, + )); +} + + +//echo $content; + +?> |