* @link http://andreas-haerter.com/projects/dokuwiki-template-monobook * @link http://www.dokuwiki.org/template:monobook * @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("monobook_closedwiki")){ //Languages/translations provided by Andreas Gohr's translation plugin, //see . Create plugin object if //needed. if (file_exists(DOKU_PLUGIN."translation/syntax.php") && !plugin_isdisabled("translation")){ $transplugin = &plugin_load("syntax", "translation"); } else { $transplugin = false; } //navigation if (tpl_getConf("monobook_navigation")){ //headline $_monobook_boxes["p-x-navigation"]["headline"] = $lang["monobook_bar_navigation"]; //detect wiki page to load as content if (!empty($transplugin) && is_object($transplugin) && tpl_getConf("monobook_navigation_translate")){ //translated navigation? $transplugin_langcur = $transplugin->hlp->getLangPart(cleanID(getId())); //current language part $transplugin_langs = explode(" ", trim($transplugin->getConf("translations"))); //available languages if (empty($transplugin_langs) || empty($transplugin_langcur) || !is_array($transplugin_langs) || !in_array($transplugin_langcur, $transplugin_langs)) { //current page is no translation or something is wrong, load default navigation $nav_location = tpl_getConf("monobook_navigation_location"); } else { //load language specific navigation $nav_location = tpl_getConf("monobook_navigation_location")."_".$transplugin_langcur; } }else{ //default navigation, no translation $nav_location = tpl_getConf("monobook_navigation_location"); } //content if (empty($conf["useacl"]) || auth_quickaclcheck(cleanID($nav_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($nav_location, false); if ($interim === "" || $interim === false){ //creation/edit link if the defined page got no content $_monobook_boxes["p-x-navigation"]["xhtml"] = "[ ".html_wikilink($nav_location, hsc($lang["monobook_fillplaceholder"]." (".$nav_location.")"))." ]
"; }else{ //the rendered page content $_monobook_boxes["p-x-navigation"]["xhtml"] = $interim; } } unset($nav_location); } //table of contents (TOC) - show outside the article? (this is a dirty hack but often requested) if (tpl_getConf("monobook_toc_position") === "sidebar"){ //check if the current page got a TOC $toc = tpl_toc(true); if (!empty($toc)) { //headline $_monobook_boxes["p-toc"]["headline"] = $lang["toc"]; //language comes from DokuWiki core //content $_monobook_boxes["p-toc"]["xhtml"] = //get rid of some styles and the embedded headline str_replace(//search array("
".$lang["toc"]."
", //language comes from DokuWiki core " class=\"toc\"", " id=\"toc__inside\""), //replace "", //haystack $toc); } unset($toc); } //search if (tpl_getConf("monobook_search") && actionOK("search")){ //check if action is disabled //headline $_monobook_boxes["p-search"]["headline"] = $lang["monobook_bar_search"]; //content $_monobook_boxes["p-search"]["xhtml"] = "
\n" ." \n" ." \n" ."  \n" ." \n" ."
"; } //toolbox if (tpl_getConf("monobook_toolbox")){ //headline $_monobook_boxes["p-tb"]["headline"] = $lang["monobook_bar_toolbox"]; //content if (tpl_getConf("monobook_toolbox_default")){ //define default, predefined toolbox $_monobook_boxes["p-tb"]["xhtml"] = " "; }else{ //we have to use a custom toolbox if (empty($conf["useacl"]) || auth_quickaclcheck(cleanID(tpl_getConf("monobook_toolbox_location"))) >= AUTH_READ){ //current user got access? //get the rendered content of the defined wiki article to use as //custom toolbox $interim = tpl_include_page(tpl_getConf("monobook_toolbox_location"), false); if ($interim === "" || $interim === false){ //add creation/edit link if the defined page got no content $_monobook_boxes["p-tb"]["xhtml"] = "
  • [ ".html_wikilink(tpl_getConf("monobook_toolbox_location"), hsc($lang["monobook_fillplaceholder"]." (".tpl_getConf("monobook_toolbox_location").")"), null)." ]
  • "; }else{ //add the rendered page content $_monobook_boxes["p-tb"]["xhtml"] = $interim."\n"; } }else{ //we are not allowed to show the content of the defined wiki //article to use as custom sitenotice. //$_monobook_boxes["p-tb"]["xhtml"] = hsc($lang["monobook_accessdenied"])." (".tpl_getConf("monobook_toolbox_location").")"; } } } //Languages/translations provided by Andreas Gohr's translation plugin, //see if (!empty($transplugin) && is_object($transplugin)){ $_monobook_boxes["p-lang"]["headline"] = $lang["monobook_bar_inotherlanguages"]; $_monobook_boxes["p-lang"]["xhtml"] = $transplugin->_showTranslations(); } }else{ //headline $_monobook_boxes["p-login"]["headline"] = $lang["btn_login"]; $_monobook_boxes["p-login"]["xhtml"] = " "; } /****************************************************************************** ******************************** 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! *****************************************************************************/