1<?php
2
3/**
4 * User defined tab configuration of the "vector" 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 _vector_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:vector
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/***************************** LEFT TAB NAVIGATION ****************************/
38
39//note: The tabs will be rendered in the order they were defined. Means: first
40//      tab will be rendered first, last tab will be rendered at last.
41
42
43//nothing here right now
44
45
46
47
48
49
50
51
52
53
54
55/*************************** RIGHT TAB NAVIGATION *****************************/
56
57//note: The tabs will be rendered in the order they were defined. Means: first
58//      tab will be rendered first, last tab will be rendered at last.
59
60
61//nothing here right now
62
63
64
65
66
67
68
69
70
71
72
73
74//examples: remove comments to see what is happening
75//
76//          Replace "$_vector_tabs_right" with "$_vector_tabs_left" to add
77//          the tabs to the left instead the right tab navigation (and vice
78//          versa)
79
80
81
82/*
83//(un)subscribe namespace tab
84if (!empty($conf["useacl"]) &&
85    !empty($conf["subscribers"]) &&
86    !empty($loginname)){ //$loginname was defined within main.php
87    if (empty($INFO["subscribedns"])){ //$INFO comes from DokuWiki core
88        $_vector_tabs_right["ca-watchns"]["href"] = wl(cleanID(getId()), array("do" => "subscribens"), false, "&");
89        $_vector_tabs_right["ca-watchns"]["text"] = $lang["btn_subscribens"]; //language comes from DokuWiki core
90    }else{
91        $_vector_tabs_right["ca-watchns"]["href"] = wl(cleanID(getId()), array("do" => "unsubscribens"), false, "&");
92        $_vector_tabs_right["ca-watchns"]["text"] = $lang["btn_unsubscribens"]; //language comes from DokuWiki core
93    }
94}
95*/
96
97
98/*
99//recent changes
100if (!empty($conf["recent_days"])){
101    $_vector_tabs_right["ca-recent"]["text"]     = $lang["btn_recent"]; //language comes from DokuWiki core
102    $_vector_tabs_right["ca-recent"]["href"]     = wl("", array("do" => "recent"), false, "&");
103    $_vector_tabs_right["ca-recent"]["nofollow"] = true;
104}
105*/
106
107
108/*
109//link
110$_vector_tabs_right["tab-urlexample"]["text"]     = "Creator";
111$_vector_tabs_right["tab-urlexample"]["href"]     = "https://andreashaerter.com/";
112$_vector_tabs_right["tab-urlexample"]["nofollow"] = true;
113*/
114
115
116/*
117//link with rel="nofollow", see http://www.wikipedia.org/wiki/Nofollow for info
118$_vector_tabs_right["tab-urlexample2"]["text"]     = "Search the web";
119$_vector_tabs_right["tab-urlexample2"]["href"]     = "http://www.google.com/search?q=dokuwiki";
120$_vector_tabs_right["tab-urlexample2"]["nofollow"] = true;
121*/
122
123
124/*
125//internal wiki link
126$_vector_tabs_right["tab-wikilinkexample"]["text"]      = "Home";
127$_vector_tabs_right["tab-wikilinkexample"]["wiki"]      = ":start";
128$_vector_tabs_right["tab-wikilinkexample"]["accesskey"] = "H"; //accesskey is optional
129*/
130
131
132/*
133//ODT plugin: export tab
134//see <https://www.dokuwiki.org/plugin:odt> for info
135if (file_exists(DOKU_PLUGIN."odt/syntax.php") &&
136    !plugin_isdisabled("odt")){
137    $_vector_tabs_left["ca-export-odt"]["text"]     = $lang["vector_exportodt"];
138    $_vector_tabs_left["ca-export-odt"]["href"]     = wl(cleanID(getId()), array("do" => "export_odt"), false, "&");
139    $_vector_tabs_left["ca-export-odt"]["nofollow"] = true;
140}
141*/
142
143
144/*
145//dw2pdf or html2pdf plugin: export tab
146//see <https://www.dokuwiki.org/plugin:dw2pdf> and
147//<https://www.dokuwiki.org/plugin:html2pdf> for info
148if ((file_exists(DOKU_PLUGIN."dw2pdf/action.php") &&
149     !plugin_isdisabled("dw2pdf")) ||
150    (file_exists(DOKU_PLUGIN."html2pdf/action.php") &&
151     !plugin_isdisabled("html2pdf"))){
152    $_vector_tabs_left["ca-export-pdf"]["text"]     = $lang["vector_exportpdf"];
153    $_vector_tabs_left["ca-export-pdf"]["href"]     = wl(cleanID(getId()), array("do" => "export_pdf"), false, "&");
154    $_vector_tabs_left["ca-export-pdf"]["nofollow"] = true;
155}
156*/
157