1<?php
2/**
3 * DokuWiki Monochrome Template based on Starter
4 *
5 * @link     tbd
6 * @author   Anika Henke <anika@selfthinker.org>
7 * @author   klaus Vormweg <klaus.vormweg@gmx.de>
8 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
9 *
10 * @var string $ID
11 * @var string $ACT
12 * @var array  $conf
13 * @var array  $lang
14 */
15
16if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
17@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
18header('X-UA-Compatible: IE=edge');
19
20$versionarr = getVersionData();
21$version = substr($versionarr['date'], 0, 10);
22
23$showSidebar = FALSE;
24if ($ID != $conf['sidebar']):
25  $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
26endif;
27echo '<!DOCTYPE html>
28<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="', $conf['lang'],
29'" lang="', $conf['lang'], '" dir="', $lang['direction'], '" class="no-js">
30<head>
31<meta charset="UTF-8" />
32<title>';
33tpl_pagetitle();
34echo ' [', strip_tags($conf['title']), ']</title>
35    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,\'js\')})(document.documentElement)</script>',"\n";
36tpl_metaheaders();
37echo '    <meta name="viewport" content="width=device-width,initial-scale=1" />',"\n",
38     _tpl_favicon();
39tpl_includeFile('meta.html');
40/*  The following line added to support "Display Wiki Page for Dokuwiki" plulgin  */
41if (file_exists(DOKU_PLUGIN.'displaywikipage/code.php')) include_once(DOKU_PLUGIN.'displaywikipage/code.php');
42echo '</head>
43<body>',"\n";
44/* with these Conditional Comments you can better address IE issues in CSS files,
45   precede CSS rules by #IE8 for IE8 (div closes at the bottom) */
46echo '    <!--[if lte IE 8 ]><div id="IE8"><![endif]-->',"\n";
47
48/* the "dokuwiki__top" id is needed somewhere at the top, because that's where the "back to top" button/link links to */
49/* tpl_classes() provides useful CSS classes; if you choose not to use it, the 'dokuwiki' class at least
50   should always be in one of the surrounding elements (e.g. plugins and templates depend on it) */
51echo '    <div id="dokuwiki__site">
52      <div id="dokuwiki__top" class="site ', tpl_classes();
53if($showSidebar):
54  echo ' hasSidebar';
55endif;
56echo '">';
57html_msgarea(); /* occasional error and info messages on top of the page */
58
59
60/*  Wrapper   */
61echo '                <div class="wrapper">',"\n";
62if (function_exists('dwp_display_wiki_page')) dwp_display_wiki_page(":wiki:headertext");
63/*
64 *   Content
65 */
66
67 echo "\n",'        <!-- ********** HEADER ********** -->';
68echo '             <div id="dokuwiki__header" style="font-weight:700; margin:0px; padding:0px;" >
69                     <div class="pad">';
70/*
71 *   HEADER BAR
72 */
73echo '                  <div class="tools" style="position:relative;
74                          width:100%; height:30px; margin:0; padding:0; text-align:left;">',"\n";
75echo                     '<!-- ********** BREADCRUMBS ********** -->
76                          <div class="breadcrumbs">',"\n";
77if ($conf['breadcrumbs']):
78	tpl_breadcrumbs();
79elseif ($conf['youarehere']):
80	tpl_youarehere();
81endif;
82echo                   '</div>'/*,"\n"*/;  /* enc breadcrumbs div  */
83if($ACT != 'denied'):
84  echo '                  <!-- ********** SITE TOOLS (search) ******* -->
85                          <div id="dokuwiki__sitetools" style="float:right;">';
86/* commented out
87                            <h3 class="a11y">', $lang['site_tools'], '</h3>',"\n";  */
88  tpl_searchform();
89  echo '                  </div> <!-- #dokuwiki__sitetools -->',"\n";
90endif;
91
92/*  Page Name section removed */
93
94
95echo                   '</div> <!-- .tools -->
96                        <div class="clearer"></div>',"\n";
97echo '                  <hr class="a11y" />
98                      </div>
99					</div><!-- /dokuwiki__header -->';
100tpl_includeFile('header.html');
101echo '                <!-- ********** CONTENT ********** -->
102            <div id="dokuwiki__content">
103              <div class="pad">',"\n";
104tpl_flush(); /* flush the output buffer */
105tpl_includeFile('pageheader.html');
106echo '                <div class="page">
107                    <!-- wikipage start -->',"\n";
108tpl_content(); /* the main content */
109echo '                    <!-- wikipage stop -->
110                    <div class="clearer"></div>
111                </div>',"\n";
112tpl_flush();
113tpl_includeFile('pagefooter.html');
114echo '            </div></div><!-- /content -->',"\n";
115if ($showSidebar):
116
117  echo '      <!-- ********** SIDEBAR ********** -->
118              <div id="dokuwiki__aside">',"\n";
119
120
121/*************************
122 Start add logo script
123*************************/
124  echo '                   <div class="pad aside include group">';
125
126/* how to insert logo: upload your logo into the data/media folder (root of the media manager) as 'logo.png' */
127if(file_exists(DOKU_INC.'data/media/logo.png') and _tpl_media_isreadable('logo.png')):
128  tpl_link(wl(),'<img src="'.ml('logo.png').'" alt="'.$conf['title'].'" style="padding:1em 0 0 0; margin:0;" />',' accesskey="h" title="[H]"');
129else:
130  tpl_link(wl(),'<img src="logo.png" width="128px" alt="'.$conf['title'].'" style="margin:0;  " />',' accesskey="h" title="[H]"');
131endif;
132/************************
133  end logo script
134  **********************/
135  tpl_includeFile('sidebarheader.html');
136  tpl_include_page($conf['sidebar'], 1, 1); /* includes the nearest sidebar page */
137  tpl_includeFile('sidebarfooter.html');
138  echo '                    <div class="clearer"></div>
139                </div>
140              </div><!-- /aside -->',"\n";
141endif;
142echo '            <div class="clearer"></div>
143            <hr class="a11y" />
144
145            <!-- *** USER TOOLS and PAGE ACTIONS *** -->',"\n";
146if ($ACT != 'denied'):
147  echo '                <div id="dokuwiki__pagetools">',"\n";
148  if (isset($conf['useacl']) and $conf['useacl']):
149    echo '                        <h3 class="a11y">', $lang['user_tools'], '</h3>
150                      <ul>',"\n";
151    echo (new \dokuwiki\Menu\UserMenu())->getListItems();
152    echo '                        </ul>',"\n";
153  endif;
154  if (auth_quickaclcheck($ID) > AUTH_READ):
155    echo '                      <h3 class="a11y">', $lang['page_tools'], '</h3>
156                    <ul class="pagetools">',"\n";
157    echo (new \dokuwiki\Menu\PageMenu())->getListItems();
158    echo '                    </ul>
159                    <h3 class="a11y">', $lang['site_tools'], '</h3>',"\n";
160    echo '                    <ul class="sitetools">';
161    echo (new \dokuwiki\Menu\SiteMenu())->getListItems();
162    echo '                      </ul>',"\n";
163  endif;
164  echo '                </div><!-- /dokuwiki__pagetools -->',"\n";
165endif;
166echo '        </div><!-- /wrapper -->
167
168        <!-- ********** FOOTER ********** -->
169        <div id="dokuwiki__footer">
170          <div class="pad">
171            <div class="doc">';
172tpl_pageinfo(); /* 'Last modified' etc */
173if (!empty($_SERVER['REMOTE_USER'])):
174  echo '</div><div class="user">';
175  tpl_userinfo();
176endif;
177echo "</div>","\n";
178tpl_license('button'); /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */
179echo '        </div>
180      </div><!-- /footer -->',"\n";
181tpl_includeFile('footer.html');
182if (function_exists('dwp_display_wiki_page')) dwp_display_wiki_page(":wiki:copyright");
183echo '    </div>
184    </div><!-- /site -->
185
186    <div class="no">';
187tpl_indexerWebBug(); /* provide DokuWiki housekeeping, required in all templates */
188echo '</div>
189    <!--[if lte IE 8 ]></div><![endif]-->
190</body>
191</html>';
192