* @author Clarence Lee * @author lisps * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ /** * returns lastmod of given page id */ function template_getLastModOfGivenPageId($pageid){ global $ID; global $INFO; // Backup id of current page $id_save = $ID; // Set global page id $ID = $pageid; // get page infos $tmp_info = pageinfo(); // save lastmod $lastmod = $tmp_info['lastmod']; // restore global page id $ID = $id_save; return $lastmod; } /** * Includes the rendered HTML of a given page * * This function is useful to populate sidebars or similar features in a * template */ function template_tpl_include_page($pageid, $print = true, $propagate = false, $rev = '') { if (!$pageid) return false; if ($propagate) $pageid = page_findnearest($pageid); global $TOC; $oldtoc = $TOC; $html = p_wiki_xhtml($pageid, $rev, false); $TOC = $oldtoc; if(!$print) return $html; echo $html; return $html; } //Sidebar with replace CONSTANTS $search=array("_USERNAME_", "_CLIENTNAME_", "_PAGEID_"); $replace=array($INFO["userinfo"]["name"], $_SERVER['REMOTE_USER'], $ID); if($_SERVER['REMOTE_USER'] && page_exists('user:'.$_SERVER['REMOTE_USER'].':sidebar')){ $sidebar = template_tpl_include_page('user:'.$_SERVER['REMOTE_USER'].':sidebar', 0, 0, template_getLastModOfGivenPageId('user:'.$_SERVER['REMOTE_USER'].':sidebar')); } else if($_SERVER['REMOTE_USER'] && page_exists('user:sidebar')){ $sidebar = template_tpl_include_page('user:sidebar', 0, 0, template_getLastModOfGivenPageId('user:sidebar')); } else { $sidebar = tpl_include_page('sidebar', 0, 0, ''); } $sidebar=str_ireplace($search,$replace,$sidebar); $hasSidebar = $sidebar?true:false; $showSidebar = $hasSidebar && ($ACT=='show'); ?> <?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]

Permalink ';?>

    ', ''); tpl_action('register', 1, 'li', 0, '', ''); ?>




  • ', ''); tpl_action('revert', 1, 'li', 0, '', ''); tpl_action('top', 1, 'li', 0, '', ''); ?>
  • ', ''); tpl_action('revisions', 1, 'li', 0, '', ''); tpl_action('backlink', 1, 'li', 0, '', ''); ?>


  • ', ''); tpl_action('profile', 1, 'li', 0, '', ''); tpl_action('recent', 1, 'li', 0, '', ''); tpl_action('media', 1, 'li', 0, '', ''); tpl_action('index', 1, 'li', 0, '', ''); ?>
'; ?>