* @homepage: http://www.chimeric.de * @modified-by: Xan */ require_once('conf.php'); /** * fetches the sidebar-pages and displays the sidebar * * @author Michael Klier */ function tpl_sidebar($side='left') { global $conf, $ID, $REV, $INFO,$lang; $svID = $ID; $svREV = $REV; if ($side=='left') { $nom = $ID.'_'.$conf['sidebar-theme']['sidebar_pagename'].'_'.$side; $default_nom = $conf['sidebar-theme']['default_leftsidebar_name']; } else { $nom = $ID.'_'.$conf['sidebar-theme']['sidebar_pagename'].'_'.$side; $default_nom = $conf['sidebar-theme']['default_rightsidebar_name']; } if (file_exists(wikiFN($nom))) { echo '
'.p_sidebar_xhtml($nom).'
'; } else { if (file_exists(wikiFN($default_nom))) { print '
'.p_sidebar_xhtml($default_nom).'
'; } else { print ' '; } } $ID = $svID; $REV = $svREV; } /** * removes the TOC of the sidebar-pages and shows a edit-button if user has enough rights * * @author Michael Klier */ function p_sidebar_xhtml($Sb) { $data = p_wiki_xhtml($Sb,'',false); if(auth_quickaclcheck($Sb) >= AUTH_EDIT) { $data .= '
'.html_btn('secedit',$Sb,'',array('do'=>'edit','rev'=>'','post')).'
'; } return preg_replace('/
.*?(<\/div>\n<\/div>)/s', '', $data); } ?>