1<?php
2/**
3 * DokuWiki Benajamin Template: a study of Starter Template by Anika Henke <anika@selfthinker.org>
4 *
5 * @link     http://rschram.org/code/benjamin.zip
6 * @author   Ryan Schram <ryan@rschram.org>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
11@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
12header('X-UA-Compatible: IE=edge,chrome=1');
13
14$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
15$showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
16?><!DOCTYPE html>
17<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
18  lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
19<head>
20    <meta charset="UTF-8" />
21    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
22    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
23    <?php tpl_metaheaders() ?>
24    <meta name="viewport" content="width=device-width,initial-scale=1" />
25    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
26    <?php tpl_includeFile('meta.html') ?>
27</head>
28
29<body>
30    <?php /* With these conditional comments you can better address IE
31             issues in CSS files, precede CSS rules by #IE7 for IE7
32             and #IE8 for IE8 (div closes at the bottom) */ ?>
33
34    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
35
36    <?php /* the "dokuwiki__top" id is needed somewhere at the top,
37	     because that's where the "back to top" button/link links
38	     to */ ?>
39
40    <?php /* tpl_classes() provides useful CSS classes; if you choose
41	  not to use it, the 'dokuwiki' class at least should always
42	  be in one of the surrounding elements (e.g. plugins and
43	  templates depend on it) */ ?>
44
45    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
46        echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
47        <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
48        <?php tpl_includeFile('header.html') ?>
49
50        <!-- ********** HEADER ********** -->
51        <div id="dokuwiki__header"><div class="pad">
52
53            <div class="headings">
54                <h1><?php tpl_link(wl(),$conf['title'],'accesskey="h" title="[H]"') ?></h1>
55
56                <?php /* How to insert logo instead (if no CSS image
57                         replacement technique is used): upload your
58                         logo into the data/media folder (root of the
59                         media manager) and replace 'logo.png'
60                         accordingly:
61
62                        tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" />','id="dokuwiki__top" accesskey="h" title="[H]"')
63
64		      */ ?>
65                <?php if ($conf['tagline']): ?>
66                    <p class="claim"><?php echo $conf['tagline'] ?></p>
67                <?php endif ?>
68            </div>
69
70
71
72            <hr class="a11y" />
73        </div></div><!-- /header -->
74
75
76        <div class="wrapper">
77
78
79	  <!-- ********** CONTENT ********** -->
80          <div id="dokuwiki__content"><div class="pad">
81              <?php tpl_flush() /* flush the output buffer */ ?>
82              <?php tpl_includeFile('pageheader.html') ?>
83
84              <div class="page">
85                <!-- wikipage start -->
86                <?php tpl_content() /* the main content */ ?>
87                <!-- wikipage stop -->
88              </div>
89
90              <?php tpl_flush() ?>
91              <?php tpl_includeFile('pagefooter.html') ?>
92          </div></div><!-- /content -->
93
94          <hr class="a11y" />
95
96
97
98
99          <!-- ********** TOOLS ********** -->
100          <div id="dokuwiki__tools">
101            <!-- SITE TOOLS -->
102            <div class="tools" id="dokuwiki__sitetools">
103              <h3><?php echo $lang['site_tools'] ?></h3>
104              <ul>
105		<li><?php tpl_searchform() ?></li>
106                <?php _tpl_toolsevent('sitetools', array(
107                      'recent'    => tpl_action('recent', 1, 'li', 1),
108                      'media'     => tpl_action('media', 1, 'li', 1),
109                      'index'     => tpl_action('index', 1, 'li', 1),
110                  )); ?>
111              </ul>
112            </div>
113
114
115            <!-- PAGE ACTIONS -->
116            <?php if ($showTools): ?>
117            <div class="tools" id="dokuwiki__pagetools">
118              <h3><?php echo $lang['page_tools'] ?></h3>
119              <ul>
120                <?php _tpl_toolsevent('pagetools', array(
121                      'edit'      => tpl_action('edit', 1, 'li', 1),
122                      'discussion'=> _tpl_action('discussion', 1, 'li', 1),
123                      'revisions' => tpl_action('revisions', 1, 'li', 1),
124                      'backlink'  => tpl_action('backlink', 1, 'li', 1),
125                      'subscribe' => tpl_action('subscribe', 1, 'li', 1),
126                      'revert'    => tpl_action('revert', 1, 'li', 1),
127                      'top'       => tpl_action('top', 1, 'li', 1),
128                 )); ?>
129              </ul>
130            </div>
131            <?php endif; ?>
132
133
134            <!-- USER TOOLS -->
135            <?php if ($conf['useacl'] && $showTools): ?>
136            <div class="tools" id="dokuwiki__usertools">
137              <h3><?php echo $lang['user_tools'] ?></h3>
138              <ul>
139                <?php
140                   if (!empty($_SERVER['REMOTE_USER'])) {
141                     echo '<li class="user">';
142                     tpl_userinfo(); /* 'Logged in as ...' */
143                     echo '</li>';
144                   }
145                 ?>
146
147                 <?php /* the optional second parameter of
148                        tpl_action() switches between a link and a
149                        button, e.g. a button inside a <li> would be:
150                        tpl_action('edit', 0, 'li')
151		       */ ?>
152
153                 <?php _tpl_toolsevent('usertools', array(
154                       'admin'     => tpl_action('admin', 1, 'li', 1),
155                       'userpage'  => _tpl_action('userpage', 1, 'li', 1),
156                       'profile'   => tpl_action('profile', 1, 'li', 1),
157                       'register'  => tpl_action('register', 1, 'li', 1),
158                       'login'     => tpl_action('login', 1, 'li', 1),
159                  )); ?>
160              </ul>
161            </div>
162            <?php endif ?>
163
164
165
166          </div>
167
168
169
170
171          <!-- ********** ASIDE ********** -->
172          <?php if ($showSidebar): ?>
173          <div id="dokuwiki__aside"><div class="pad aside include group">
174              <?php tpl_includeFile('sidebarheader.html') ?>
175              <?php tpl_include_page($conf['sidebar'], 1, 1) /* includes the nearest sidebar page */ ?>
176              <?php tpl_includeFile('sidebarfooter.html') ?>
177          </div></div><!-- /aside -->
178          <?php endif; ?>
179
180
181
182
183
184
185        </div><!-- /wrapper -->
186
187
188
189
190        <!-- ********** FOOTER ********** -->
191        <div id="dokuwiki__footer"><div class="pad">
192            <div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
193            <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
194        </div></div><!-- /footer -->
195
196        <?php tpl_includeFile('footer.html') ?>
197    </div></div><!-- /site -->
198
199    <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
200    <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
201</body>
202</html>
203