1<?php 2/** 3 * DokuWiki Template Simple Functions 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author Michael Klier <chi@chimeric.de> 7 */ 8 9/** 10 * Renders the topbar 11 * 12 * @author Michael Klier <chi@chimeric.de> 13 */ 14function tpl_topbar() { 15 global $ID; 16 17 $found = false; 18 $tbar = ''; 19 $path = explode(':', $ID); 20 21 while(!$found && count($path) >= 0) { 22 $tbar = implode(':', $path) . ':' . 'topbar'; 23 $found = @file_exists(wikiFN($tbar)); 24 array_pop($path); 25 // check if nothing was found 26 if(!$found && $tbar == ':topbar') return; 27 } 28 29 if($found && auth_quickaclcheck($tbar) >= AUTH_READ) { 30 print p_wiki_xhtml($tbar,'',false); 31 } 32} 33