* @link http://andreas-haerter.com/projects/dokuwiki-template-vector
* @link http://www.dokuwiki.org/template:vector
* @link http://www.dokuwiki.org/devel:configuration
*/
/******************************************************************************
******************************** ATTENTION *********************************
DO NOT MODIFY THIS FILE, IT WILL NOT BE PRESERVED ON UPDATES!
******************************************************************************
If you want to add some own boxes, have a look at the README of this
template and "/user/boxes.php". You have been warned!
*****************************************************************************/
//check if we are running within the DokuWiki environment
if (!defined("DOKU_INC")){
die();
}
//note: The boxes will be rendered in the order they were defined. Means:
// first box will be rendered first, last box will be rendered at last.
//hide boxes for anonymous clients (closed wiki)?
if (empty($conf["useacl"]) || //are there any users?
$loginname !== "" || //user is logged in?
!tpl_getConf("vector_closedwiki")){
//navigation
if (tpl_getConf("vector_navigation")){
//headline
$_vector_boxes["p-navigation"]["headline"] = $lang["vector_navigation"];
//content
if (empty($conf["useacl"]) ||
auth_quickaclcheck(cleanID(tpl_getConf("vector_navigation_location"))) >= AUTH_READ){ //current user got access?
//get the rendered content of the defined wiki article to use as custom navigation
$interim = tpl_include_page(tpl_getConf("vector_navigation_location"), false);
if ($interim === "" ||
$interim === false){
//creation/edit link if the defined page got no content
$_vector_boxes["p-navigation"]["xhtml"] = "[ ".html_wikilink(tpl_getConf("vector_navigation_location"), hsc($lang["vector_fillplaceholder"]." (".tpl_getConf("vector_navigation_location").")"))." ]
";
}else{
//the rendered page content
$_vector_boxes["p-navigation"]["xhtml"] = $interim;
}
}
}
//table of contents (TOC) - show outside the article? (this is a dirty hack but often requested)
if (tpl_getConf("vector_toc_position") === "sidebar"){
//check if the current page got a TOC
$toc = tpl_toc(true);
if (!empty($toc)) {
//headline
$_vector_boxes["p-toc"]["headline"] = $lang["toc"]; //language comes from DokuWiki core
//content
$_vector_boxes["p-toc"]["xhtml"] = //get rid of some styles and the embedded headline
str_replace(//search
array("