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