1<?php 2/** 3 * DokuWiki Default Template 4 * 5 * This is the template you need to change for the overall look 6 * of DokuWiki. 7 * 8 * You should leave the doctype at the very top - It should 9 * always be the very first line of a document. 10 * 11 * @link http://wiki.splitbrain.org/wiki:tpl:templates 12 * @author Andreas Gohr <andi@splitbrain.org> 13 * @author Riccardo Govoni <battlehorse@gmail.com> 14 */ 15 16// must be run from within DokuWiki 17if (!defined('DOKU_INC')) die(); 18 19/* Creates the URL of the current page, used for Digg, delicious and google bookmarks */ 20function selfURL() { 21 $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; 22 $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; 23 $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); 24 return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; 25} 26 27function strleft($s1, $s2) { 28 return substr($s1, 0, strpos($s1, $s2)); 29} 30 31// verify if the given action is enabled 32function is_action_enabled($type) { 33 $ctype = $type; 34 if($type == 'history') $ctype='revisions'; 35 return actionOK($ctype); 36} 37 38// changes the display style of the given action group, depending on the config file 39function action_group_status($groupname) { 40 if (tpl_getConf('btl_default_' . $groupname . '_actions_status') == "closed") { 41 echo " style='display:none;'" ; 42 } 43} 44 45// include functions that provide sidebar functionality 46@require_once(dirname(__FILE__).'/tplfn_sidebar.php'); 47 48// include translations of the template strings 49@require_once(dirname(__FILE__).'/lang/'.tpl_getConf('btl_language').'/settings.php'); 50 51 52?> 53<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 54 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 55<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" 56 lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction']?>"> 57<head> 58 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 59 <title> 60 <?php tpl_pagetitle()?> 61 [<?php echo strip_tags($conf['title'])?>] 62 </title> 63 64 <?php tpl_metaheaders()?> 65 66 <link rel="shortcut icon" href="<?php echo DOKU_TPL?>images/favicon.ico" /> 67 68 <?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?> 69 70 <script src="<?php echo DOKU_TPL ?>js/prototype.js" type="text/javascript"></script> 71 <script src="<?php echo DOKU_TPL ?>js/scriptaculous.js" type="text/javascript"></script> 72</head> 73 74<body> 75<?php /*old includehook*/ @include(dirname(__FILE__).'/topheader.html')?> 76<div class="dokuwiki"> 77 <?php html_msgarea()?> 78 79 <div class="stylehead"> 80 81 <div class="header"> 82<!-- <div class="pagename"> 83 [[<?php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true))?>]] 84 </div> --> 85 <div class="logo"> 86 <?php tpl_link(wl(),$conf['title'],'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]"')?> 87 </div> 88 89 <div class="clearer"></div> 90 </div> 91 92 <?php /*old includehook*/ @include(dirname(__FILE__).'/header.html')?> 93 94 <?php if($conf['breadcrumbs']){?> 95 <div class="bread_upper_dark"></div> 96 <div class="breadcrumbs"> 97 <?php tpl_breadcrumbs()?> 98 <?php //tpl_youarehere() //(some people prefer this)?> 99 </div> 100 <div class="bread_lower_dark"></div> 101 <div class="bread_lower_medium"></div> 102 <div class="bread_lower_light"> </div> 103 <?php }?> 104 105 <?php if($conf['youarehere']){?> 106 <div class="bread_upper_dark"></div> 107 <div class="breadcrumbs"> 108 <?php tpl_youarehere() ?> 109 </div> 110 <div class="bread_lower_dark"></div> 111 <div class="bread_lower_medium"></div> 112 <div class="bread_lower_light"></div> 113 <?php }?> 114 115 </div> 116 <?php flush()?> 117 118 <?php /*old includehook*/ @include(dirname(__FILE__).'/pageheader.html')?> 119 120<div class="sideandpage" > 121 <?php if (tpl_getConf('btl_sidebar_position') == "right") { ?> 122 <div class="mainleft" > 123 <div class="page"> 124 <!-- wikipage start --> 125 <?php tpl_content()?> 126 <!-- wikipage stop --> 127 </div> 128 <div class="page_lower_dark"></div> 129 <div class="page_lower_medium"></div> 130 <div class="page_lower_light"></div> 131 </div> 132 <?php } ?> 133 134 <?php if (tpl_getConf('btl_sidebar_position') == "right") { ?> 135 <div class="sideright"> 136 <?php } else { ?> 137 <div class="sideleft"> 138 <?php } ?> 139 140 <div class="sidebarandshadows" > 141 <table cellspacing="0" cellpadding="0" border="0" width="100%" > 142 <tr> 143 <td> 144 <table cellspacing="0" cellpadding="0" border="0" width="100%"> 145 <tr> 146 <td valign="top"> 147 <div class="sidebar"> 148 <?php tpl_sidebar()?> 149 </div> 150 </td> 151 </tr> 152 </table> 153 </td> 154 <td class="page_lower_dark" style="width: 1px"></td> 155 <td class="page_lower_medium" style="width: 1px"></td> 156 <td class="page_lower_light" style="width: 1px"></td> 157 </tr> 158 <tr> 159 <td class="page_lower_dark" style="height: 1px" colspan="2"></td> 160 <td class="page_lower_medium" style="width: 1px"></td> 161 <td class="page_lower_light" style="width: 1px"></td> 162 </tr> 163 <tr> 164 <td class="page_lower_medium" style="height: 1px" colspan="3"></td> 165 <td class="page_lower_light" style="width: 1px"></td> 166 </tr> 167 <tr> 168 <td class="page_lower_light" style="height: 1px" colspan="4"></td> 169 </tr> 170 </table> 171 </div> 172 173 <?php if (is_action_enabled('search')) { ?> 174 <div class="searchbarandshadows" > 175 <table cellspacing="0" cellpadding="0" border="0" width="100%" > 176 <tr> 177 <td> 178 <table cellspacing="0" cellpadding="0" border="0" width="100%" > 179 <tr> 180 <td valign="top"> 181 <div class="searchbar"> 182 <div class="centeralign"><?php tpl_searchform()?></div> 183 </div> 184 </td> 185 </tr> 186 </table> 187 </td> 188 <td class="page_lower_dark" style="width: 1px"></td> 189 <td class="page_lower_medium" style="width: 1px"></td> 190 <td class="page_lower_light" style="width: 1px"></td> 191 </tr> 192 <tr> 193 <td class="page_lower_dark" style="height: 1px" colspan="2"></td> 194 <td class="page_lower_medium" style="width: 1px"></td> 195 <td class="page_lower_light" style="width: 1px"></td> 196 </tr> 197 <tr> 198 <td class="page_lower_medium" style="height: 1px" colspan="3"></td> 199 <td class="page_lower_light" style="width: 1px"></td> 200 </tr> 201 <tr> 202 <td class="page_lower_light" style="height: 1px" colspan="4"></td> 203 </tr> 204 </table> 205 </div> 206 <?php } ?> 207 208 <div class="userbarandshadows" > 209 <table cellspacing="0" cellpadding="0" border="0" width="100%" > 210 <tr> 211 <td> 212 <table cellspacing="0" cellpadding="0" border="0" width="100%"> 213 <tr> 214 <td valign="top"> 215 <div class="userbar" > 216 <?php if (tpl_getConf('btl_action_palette') && (is_action_enabled('history') || is_action_enabled('backlink') || (is_action_enabled('edit') && (!$conf['useacl'] || $ACT != 'show' || ($conf['useacl'] && $_SERVER['REMOTE_USER']))))) { ?> 217 <div class="userbarstrip" onclick="Effect.toggle('pageActionTableId','slide')"><?php echo $lang['btl_strip_page_actions']; ?></div> 218 <?php } ?> 219 <div id="pageActionTableId" <?php action_group_status('page'); ?> ><div> 220 <table cellspacing="0" cellpadding="2" border="0" width="100%" > 221 <tr><td> 222 <?php if (is_action_enabled('history')) { ?> 223 <div class="smallpadding"><?php tpl_actionlink('history')?></div></td></tr><tr><td> 224 <?php } ?> 225 <?php if (is_action_enabled('backlink')) { ?> 226 <div class="smallpadding"><?php tpl_actionlink('backlink')?></div></td></tr><tr><td> 227 <?php } ?> 228 <?php if (is_action_enabled('edit')) { ?> 229 <div class="smallpadding"><?php tpl_actionlink('edit')?></div></td></tr><tr><td> 230 <?php } ?> 231 </td></tr></table></div></div> 232 <?php if (tpl_getConf('btl_action_palette') && (is_action_enabled('index') || is_action_enabled('recent') || (is_action_enabled('admin') && $INFO['perm'] == 255 ))) { ?> 233 <div class="userbarstrip" onclick="Effect.toggle('wikiActionTableId','slide')"><?php echo $lang['btl_strip_wiki_actions']; ?></div> 234 <?php } ?> 235 <div id="wikiActionTableId" <?php action_group_status('wiki'); ?> ><div> 236 <table cellspacing="0" cellpadding="2" border="0" width="100%" > 237 <tr><td> 238 <?php if (is_action_enabled('index')) { ?> 239 <div class="smallpadding"><?php tpl_actionlink('index')?></div></td></tr><tr><td> 240 <?php } ?> 241 <?php if (is_action_enabled('recent')) { ?> 242 <div class="smallpadding"><?php tpl_actionlink('recent')?></div></td></tr><tr><td> 243 <?php } ?> 244 <?php if (is_action_enabled('admin') && $INFO['perm'] == 255) { ?> 245 <div class="smallpadding"><?php tpl_actionlink('admin') ?></div></td></tr><tr><td> 246 <?php } ?> 247 </td></tr></table></div></div> 248 <?php if (tpl_getConf('btl_action_palette') && (is_action_enabled('login') || (is_action_enabled('profile') && $_SERVER['REMOTE_USER'] ) || (is_action_enabled('subscribe') && $conf['useacl'] && $ACT == 'show' && $conf['subscribers'] == 1 && $_SERVER['REMOTE_USER']))) { ?> 249 <div class="userbarstrip" onclick="Effect.toggle('userActionTableId','slide')"><?php echo $lang['btl_strip_user_actions']; ?></div> 250 <?php } ?> 251 <div id="userActionTableId" <?php action_group_status('user'); ?> ><div> 252 <table cellspacing="0" cellpadding="2" border="0" width="100%" > 253 <tr><td> 254 <?php if (is_action_enabled('login')) { ?> 255 <div class="smallpadding"><?php tpl_actionlink('login')?> 256 <?php 257 if ($_SERVER['REMOTE_USER']){ 258 echo $INFO['userinfo']['name'] ; 259 } 260 ?> 261 </div></td></tr><tr><td> 262 <?php } ?> 263 <?php if (is_action_enabled('profile') && $_SERVER['REMOTE_USER']) { ?> 264 <div class="smallpadding"><?php tpl_actionlink('profile') ?></div></td></tr><tr><td> 265 <?php } ?> 266 <?php if (is_action_enabled('subscribe')) { ?> 267 <?php if($conf['useacl'] && $ACT == 'show' && $conf['subscribers'] == 1 && $_SERVER['REMOTE_USER']){ ?> 268 <div class="smallpadding"><?php tpl_actionlink('subscribe')?></div></td></tr><tr><td> 269 <?php } ?> 270 <?php } ?> 271 </td></tr></table></div></div> 272 <?php if (tpl_getConf('btl_action_palette') && (is_action_enabled('digg') || is_action_enabled('delicious') || is_action_enabled('googlebookmark'))) { ?> 273 <div class="userbarstrip" onclick="Effect.toggle('submitActionTableId','slide')"><?php echo $lang['btl_strip_submit_actions']; ?></div> 274 <?php } ?> 275 <div id="submitActionTableId" <?php action_group_status('submit'); ?> ><div> 276 <table cellspacing="0" cellpadding="2" border="0" width="100%" > 277 <tr><td> 278 <?php if (is_action_enabled('digg')) { ?> 279 <div class="smallpadding"><a class="digg" href="<?php echo 'http://digg.com/submit?phase=2&url='.urlencode(selfURL()).'&title='?><?php echo urlencode(tpl_pagetitle())?>">Digg this!</a></div></td></tr><tr><td> 280 <?php } ?> 281 <?php if (is_action_enabled('delicious')) { ?> 282 <div class="smallpadding"><a class="delicious" href="<?php echo 'http://del.icio.us/post?url='.urlencode(selfURL()).'&title='?><?php echo urlencode(tpl_pagetitle())?>">Del.Icio.Us</a></div></td></tr><tr><td> 283 <?php } ?> 284 <?php if (is_action_enabled('googlebookmark')) { ?> 285 <div class="smallpadding"><a class="googlebookmark" href="<?php echo 'http://www.google.com/bookmarks/mark?op=add&bkmk='.urlencode(selfURL()).'&title='?><?php echo urlencode(tpl_pagetitle())?>">Google bookmark</a></div></td></tr><tr><td> 286 <?php } ?> 287 </td></tr> 288 </table></div></div> 289 290 </div> 291 </td> 292 </tr> 293 </table> 294 </td> 295 <td class="page_lower_dark" style="width: 1px"></td> 296 <td class="page_lower_medium" style="width: 1px"></td> 297 <td class="page_lower_light" style="width: 1px"></td> 298 </tr> 299 <tr> 300 <td class="page_lower_dark" style="height: 1px" colspan="2"></td> 301 <td class="page_lower_medium" style="width: 1px"></td> 302 <td class="page_lower_light" style="width: 1px"></td> 303 </tr> 304 <tr> 305 <td class="page_lower_medium" style="height: 1px" colspan="3"></td> 306 <td class="page_lower_light" style="width: 1px"></td> 307 </tr> 308 <tr> 309 <td class="page_lower_light" style="height: 1px" colspan="4"></td> 310 </tr> 311 </table> 312 </div> 313 314 </div> 315 <?php if (tpl_getConf('btl_sidebar_position') == "left") { ?> 316 <div class="mainright" > 317 <div class="page"> 318 <!-- wikipage start --> 319 <?php tpl_content()?> 320 <!-- wikipage stop --> 321 </div> 322 <div class="page_lower_dark"></div> 323 <div class="page_lower_medium"></div> 324 <div class="page_lower_light"></div> 325 </div> 326 <?php } ?> 327 <div class="clearer"> </div> 328</div> 329 330 <?php flush()?> 331 332 <div class="stylefoot"> 333 334 <div class="meta"> 335 <div class="user"> 336 <?php tpl_userinfo()?> 337 </div> 338 <div class="doc"> 339 <?php tpl_pageinfo()?> 340 <span class="doclink"> 341 342 <?php tpl_actionlink('top') ?> 343 </span> 344 </div> 345 </div> 346 347 <?php /*old includehook*/ @include(dirname(__FILE__).'/pagefooter.html')?> 348 349 <div class="bar" id="bar__bottom"> 350 351 <?php /*old includehook*/ @include(dirname(__FILE__).'/footer.html')?> 352 353 <div class="clearer"></div> 354 </div> 355 356 </div> 357 358</div> 359 360<div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div> 361</body> 362</html> 363