* @link https://www.dokuwiki.org/template:vector * @link https://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")){ //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("vector_navigation")){ //headline $_vector_boxes["p-navigation"]["headline"] = $lang["vector_navigation"]; //detect wiki page to load as content if (!empty($transplugin) && is_object($transplugin) && tpl_getConf("vector_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("vector_navigation_location"); } else { //load language specific navigation $nav_location = tpl_getConf("vector_navigation_location")."_".$transplugin_langcur; } }else{ //default navigation, no translation $nav_location = tpl_getConf("vector_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 $_vector_boxes["p-navigation"]["xhtml"] = "[ ".html_wikilink($nav_location, hsc($lang["vector_fillplaceholder"]." (".$nav_location.")"))." ]
"; }else{ //the rendered page content $_vector_boxes["p-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("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(//old TOC, until 2012-01-25 "
".$lang["toc"]."
", //language comes from DokuWiki core " class=\"toc\"", " id=\"toc__inside\"", //new TOC, since 2012-09-10 " id=\"dw__toc\"", "

".$lang["toc"]."

"), //language comes from DokuWiki core //replace "", //haystack $toc); } unset($toc); } //exportbox ("print/export") if (tpl_getConf("vector_exportbox")){ //headline $_vector_boxes["p-coll-print_export"]["headline"] = $lang["vector_exportbox"]; //content if (tpl_getConf("vector_exportbox_default")){ //define default, predefined exportbox $_vector_boxes["p-coll-print_export"]["xhtml"] = " "; }else{ //we have to use a custom exportbox if (empty($conf["useacl"]) || auth_quickaclcheck(cleanID(tpl_getConf("vector_exportbox_location"))) >= AUTH_READ){ //current user got access? //get the rendered content of the defined wiki article to use as //custom exportbox $interim = tpl_include_page(tpl_getConf("vector_exportbox_location"), false); if ($interim === "" || $interim === false){ //add creation/edit link if the defined page got no content $_vector_boxes["p-coll-print_export"]["xhtml"] = "
  • [ ".html_wikilink(tpl_getConf("vector_exportbox_location"), hsc($lang["vector_fillplaceholder"]." (".tpl_getConf("vector_exportbox_location").")"), null)." ]
  • "; }else{ //add the rendered page content $_vector_boxes["p-coll-print_export"]["xhtml"] = $interim; } }else{ //we are not allowed to show the content of the defined wiki //article to use as custom sitenotice. //$_vector_boxes["p-tb"]["xhtml"] = hsc($lang["vector_accessdenied"])." (".tpl_getConf("vector_exportbox_location").")"; } } } //toolbox if (tpl_getConf("vector_toolbox")){ //headline $_vector_boxes["p-tb"]["headline"] = $lang["vector_toolbox"]; //content if (tpl_getConf("vector_toolbox_default")){ //define default, predefined toolbox $_vector_boxes["p-tb"]["xhtml"] = " "; }else{ //we have to use a custom toolbox if (empty($conf["useacl"]) || auth_quickaclcheck(cleanID(tpl_getConf("vector_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("vector_toolbox_location"), false); if ($interim === "" || $interim === false){ //add creation/edit link if the defined page got no content $_vector_boxes["p-tb"]["xhtml"] = "
  • [ ".html_wikilink(tpl_getConf("vector_toolbox_location"), hsc($lang["vector_fillplaceholder"]." (".tpl_getConf("vector_toolbox_location").")"), null)." ]
  • "; }else{ //add the rendered page content $_vector_boxes["p-tb"]["xhtml"] = $interim; } }else{ //we are not allowed to show the content of the defined wiki //article to use as custom sitenotice. //$_vector_boxes["p-tb"]["xhtml"] = hsc($lang["vector_accessdenied"])." (".tpl_getConf("vector_toolbox_location").")"; } } } //QR Code of current page's URL (powered by ) if (tpl_getConf("vector_qrcodebox")){ //headline $_vector_boxes["p-qrcode"]["headline"] = $lang["vector_qrcodebox"]; //content $_vector_boxes["p-qrcode"]["xhtml"] = " ".((cleanID(getID()) === "start") ? "" : "")."\"".hsc($lang["vector_qrcodebox_qrcode"])."".((cleanID(getID()) === "start") ? "" : "").""; } }else{ //headline $_vector_boxes["p-login"]["headline"] = $lang["btn_login"]; $_vector_boxes["p-login"]["xhtml"] = " "; } //Languages/translations provided by Andreas Gohr's translation plugin, //see if (!empty($transplugin) && is_object($transplugin)){ $_vector_boxes["p-lang"]["headline"] = $lang["vector_translations"]; $_vector_boxes["p-lang"]["xhtml"] = $transplugin->_showTranslations(); } /****************************************************************************** ******************************** 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! *****************************************************************************/