You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

157 lines
4.8 KiB

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