1<?php 2 3/** 4 * User defined tab configuration of the "monobook" DokuWiki template 5 * 6 * Create a "/user/tabs.php" file if you want to add/remove some buttons. 7 * The template recognizes and loads the provided tab data automatically. 8 * You may want to rename this file from "tabs.php.dist" to "tabs.php" 9 * to get a good starting point as it provides some examples. The comments of 10 * the {@link _monobook_renderTabs()} (main.php) may be useful, too. 11 * 12 * Note: All example files are delivered with the ".dist" extensions to make 13 * sure your changes do not get overwritten when updating the template. 14 * Just remove the ".dist" extension to use them. 15 * 16 * Note: To change the non-tab related config, use the admin webinterface of 17 * DokuWiki. 18 * 19 * 20 * LICENSE: This file is open source software (OSS) and may be copied under 21 * certain conditions. See COPYING file for details or try to contact 22 * the author(s) of this file in doubt. 23 * 24 * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html) 25 * @author ARSAVA <dokuwiki@dev.arsava.com> 26 * @link https://www.dokuwiki.org/template:monobook 27 * @link https://www.dokuwiki.org/devel:configuration 28 */ 29 30 31//check if we are running within the DokuWiki environment 32if (!defined("DOKU_INC")){ 33 die(); 34} 35 36 37//note: The tabs will be rendered in the order they were defined. Means: first 38// tab will be rendered first, last tab will be rendered at last. 39 40 41//text 42$_monobook_tabs["tab-textexample"]["text"] = "Example"; 43 44 45//examples: uncomment to see what is happening 46 47/* 48//Recent Changes (thanks to Stefan Riemer for this) 49//To get some space between this and the other tabs, you may add the following 50//additional CSS to /monobook/user/screen.css: 51// li#tab-recent { 52// margin-left: 1.6em; 53// } 54if (!empty($conf["recent_days"])){ 55 $_monobook_tabs["tab-recent"]["text"] = $lang["btn_recent"]; //language comes from DokuWiki core 56 $_monobook_tabs["tab-recent"]["href"] = wl("", array("do" => "recent"), false, "&"); 57 $_monobook_tabs["tab-recent"]["nofollow"] = true; 58} 59*/ 60 61 62/* 63//(un)subscribe namespace tab 64if (!empty($conf["useacl"]) && 65 !empty($conf["subscribers"]) && 66 !empty($loginname)){ //$loginname was defined within main.php 67 if (empty($INFO["subscribedns"])){ //$INFO comes from DokuWiki core 68 $_monobook_tabs["ca-watchns"]["href"] = wl(cleanID(getId()), array("do" => "subscribens"), false, "&"); 69 $_monobook_tabs["ca-watchns"]["text"] = $lang["btn_subscribens"]; //language comes from DokuWiki core 70 }else{ 71 $_monobook_tabs["ca-watchns"]["href"] = wl(cleanID(getId()), array("do" => "unsubscribens"), false, "&"); 72 $_monobook_tabs["ca-watchns"]["text"] = $lang["btn_unsubscribens"]; //language comes from DokuWiki core 73 } 74} 75*/ 76 77 78/* 79//link 80$_monobook_tabs["tab-urlexample"]["text"] = "Creator"; 81$_monobook_tabs["tab-urlexample"]["href"] = "https://andreashaerter.com/"; 82$_monobook_tabs["tab-urlexample"]["nofollow"] = true; 83*/ 84 85 86/* 87//link with rel="nofollow", see http://www.wikipedia.org/wiki/Nofollow for info 88$_monobook_tabs["tab-urlexample2"]["text"] = "Search the web"; 89$_monobook_tabs["tab-urlexample2"]["href"] = "https://www.google.com/search?q=dokuwiki"; 90$_monobook_tabs["tab-urlexample2"]["nofollow"] = true; 91*/ 92 93 94/* 95//internal wiki link 96$_monobook_tabs["tab-wikilinkexample"]["text"] = "Home"; 97$_monobook_tabs["tab-wikilinkexample"]["wiki"] = ":start"; 98$_monobook_tabs["tab-wikilinkexample"]["accesskey"] = "H"; //accesskey is optional 99*/ 100 101