はじまりの大地
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#Note: If this file prevents running vector in your environment, simply delete
|
||||
# it. Everything should be safe even if the files blocked by the following
|
||||
# Apache rules are accessible.
|
||||
# The reason for protecting these files is to to keep searchengines/foo
|
||||
# away from indexing files containing version information, names and/or not
|
||||
# necessarily public template parts by default.
|
||||
Deny from all
|
||||
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Default box configuration of the "vector" DokuWiki template
|
||||
*
|
||||
*
|
||||
* LICENSE: This file is open source software (OSS) and may be copied under
|
||||
* certain conditions. See COPYING file for details or try to contact
|
||||
* the author(s) of this file in doubt.
|
||||
*
|
||||
* @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
|
||||
* @author ARSAVA <dokuwiki@dev.arsava.com>
|
||||
* @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 <https://www.dokuwiki.org/plugin:translation>. 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.")"))." ]<br />";
|
||||
}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
|
||||
"<div class=\"tocheader toctoggle\" id=\"toc__header\">".$lang["toc"]."</div>", //language comes from DokuWiki core
|
||||
" class=\"toc\"",
|
||||
" id=\"toc__inside\"",
|
||||
//new TOC, since 2012-09-10
|
||||
" id=\"dw__toc\"",
|
||||
"<h3 class=\"toggle\">".$lang["toc"]."</h3>"), //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"] = " <ul>\n";
|
||||
//ODT plugin
|
||||
//see <https://www.dokuwiki.org/plugin:odt> for info
|
||||
if (file_exists(DOKU_PLUGIN."odt/syntax.php") &&
|
||||
!plugin_isdisabled("odt")){
|
||||
$_vector_boxes["p-coll-print_export"]["xhtml"] .= " <li id=\"coll-download-as-odt\"><a href=\"".wl(cleanID(getId()), array("do" => "export_odt"))."\" rel=\"nofollow\">".hsc($lang["vector_exportbxdef_downloadodt"])."</a></li>\n";
|
||||
}
|
||||
//dw2pdf plugin
|
||||
//see <https://www.dokuwiki.org/plugin:dw2pdf> for info
|
||||
if (file_exists(DOKU_PLUGIN."dw2pdf/action.php") &&
|
||||
!plugin_isdisabled("dw2pdf")){
|
||||
$_vector_boxes["p-coll-print_export"]["xhtml"] .= " <li id=\"coll-download-as-rl\"><a href=\"".wl(cleanID(getId()), array("do" => "export_pdf"))."\" rel=\"nofollow\">".hsc($lang["vector_exportbxdef_downloadpdf"])."</a></li>\n";
|
||||
//html2pdf plugin
|
||||
//see <https://www.dokuwiki.org/plugin:html2pdf> for info
|
||||
} else if (file_exists(DOKU_PLUGIN."html2pdf/action.php") &&
|
||||
!plugin_isdisabled("html2pdf")){
|
||||
$_vector_boxes["p-coll-print_export"]["xhtml"] .= " <li id=\"coll-download-as-rl\"><a href=\"".wl(cleanID(getId()), array("do" => "export_pdf"))."\" rel=\"nofollow\">".hsc($lang["vector_exportbxdef_downloadpdf"])."</a></li>\n";
|
||||
}
|
||||
$_vector_boxes["p-coll-print_export"]["xhtml"] .= " <li id=\"t-print\"><a href=\"".wl(cleanID(getId()), array("rev" =>(int)$rev, "vecdo" => "print"))."\" rel=\"nofollow\">".hsc($lang["vector_exportbxdef_print"])."</a></li>\n"
|
||||
." </ul>";
|
||||
}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"] = "<li>[ ".html_wikilink(tpl_getConf("vector_exportbox_location"), hsc($lang["vector_fillplaceholder"]." (".tpl_getConf("vector_exportbox_location").")"), null)." ]<br /></li>";
|
||||
}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"] = " <ul>\n";
|
||||
if (actionOK("backlink")){ //check if action is disabled
|
||||
$_vector_boxes["p-tb"]["xhtml"] .= " <li id=\"t-whatlinkshere\"><a href=\"".wl(cleanID(getId()), array("do" => "backlink"))."\">".hsc($lang["vector_toolbxdef_whatlinkshere"])."</a></li>\n"; //we might use tpl_actionlink("backlink", "", "", hsc($lang["vector_toolbxdef_whatlinkshere"]), true), but it would be the only toolbox link where this is possible... therefore I don't use it to be consistent
|
||||
}
|
||||
if (actionOK("recent")){ //check if action is disabled
|
||||
$_vector_boxes["p-tb"]["xhtml"] .= " <li id=\"t-recentchanges\"><a href=\"".wl("", array("do" => "recent"))."\" rel=\"nofollow\">".hsc($lang["btn_recent"])."</a></li>\n"; //language comes from DokuWiki core
|
||||
}
|
||||
if (actionOK("media")){ //check if action is disabled
|
||||
if (function_exists("media_managerURL")) {
|
||||
//use new media manager (available on releases newer than 2011-05-25a "Rincewind" / since 2011-11-10 "Angua" RC1)
|
||||
$_vector_boxes["p-tb"]["xhtml"] .= " <li id=\"t-upload\"><a href=\"".wl("", array("do" => "media"))."\" rel=\"nofollow\">".hsc($lang["btn_media"])."</a></li>\n"; //language comes from DokuWiki core
|
||||
} else {
|
||||
$_vector_boxes["p-tb"]["xhtml"] .= " <li id=\"t-upload\"><a href=\"".DOKU_BASE."lib/exe/mediamanager.php?ns=".getNS(getID())."\" rel=\"nofollow\">".hsc($lang["vector_toolbxdef_upload"])."</a></li>\n";
|
||||
}
|
||||
}
|
||||
if (actionOK("index")){ //check if action is disabled
|
||||
$_vector_boxes["p-tb"]["xhtml"] .= " <li id=\"t-special\"><a href=\"".wl("", array("do" => "index"))."\" rel=\"nofollow\">".hsc($lang["vector_toolbxdef_siteindex"])."</a></li>\n";
|
||||
}
|
||||
$_vector_boxes["p-tb"]["xhtml"] .= " <li id=\"t-permanent\"><a href=\"".wl(cleanID(getId()), array("rev" =>(int)$rev))."\" rel=\"nofollow\">".hsc($lang["vector_toolboxdef_permanent"])."</a></li>\n"
|
||||
." <li id=\"t-cite\"><a href=\"".wl(cleanID(getId()), array("rev" =>(int)$rev, "vecdo" => "cite"))."\" rel=\"nofollow\">".hsc($lang["vector_toolboxdef_cite"])."</a></li>\n"
|
||||
." </ul>";
|
||||
}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"] = "<li>[ ".html_wikilink(tpl_getConf("vector_toolbox_location"), hsc($lang["vector_fillplaceholder"]." (".tpl_getConf("vector_toolbox_location").")"), null)." ]<br /></li>";
|
||||
}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 <http://goqr.me/api/>)
|
||||
if (tpl_getConf("vector_qrcodebox")){
|
||||
//headline
|
||||
$_vector_boxes["p-qrcode"]["headline"] = $lang["vector_qrcodebox"];
|
||||
|
||||
//content
|
||||
$_vector_boxes["p-qrcode"]["xhtml"] = " <span id=\"t-qrcode\">".((cleanID(getID()) === "start") ? "<a href=\"http://".(($conf["lang"] !== "de") ? "goqr.me" : "goqr.me/de")."/\" target=\"_blank\" rel=\"nofollow\">" : "")."<img src=\"".((!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] === "on") ? "https" : "http")."://api.qrserver.com/v1/create-qr-code/?data=".urlencode(wl(cleanID(getId()), false, true, "&"))."&size=130x130&margin=0&bgcolor=f3f3f3\" alt=\"".hsc($lang["vector_qrcodebox_qrcode"])." ".hsc(tpl_pagetitle(null, true))." (".hsc($lang["vector_qrcodebox_genforcurrentpage"]).")\" title=\"".hsc($lang["vector_qrcodebox_urlofcurrentpage"])."\" />".((cleanID(getID()) === "start") ? "</a>" : "")."</span>";
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
//headline
|
||||
$_vector_boxes["p-login"]["headline"] = $lang["btn_login"];
|
||||
$_vector_boxes["p-login"]["xhtml"] = " <ul>\n"
|
||||
." <li id=\"t-login\"><a href=\"".wl(cleanID(getId()), array("do" => "login"))."\" rel=\"nofollow\">".hsc($lang["btn_login"])."</a></li>\n" //language comes from DokuWiki core
|
||||
." </ul>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Languages/translations provided by Andreas Gohr's translation plugin,
|
||||
//see <https://www.dokuwiki.org/plugin:translation>
|
||||
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!
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Default button configuration of the "vector" DokuWiki template
|
||||
*
|
||||
*
|
||||
* LICENSE: This file is open source software (OSS) and may be copied under
|
||||
* certain conditions. See COPYING file for details or try to contact
|
||||
* the author(s) of this file in doubt.
|
||||
*
|
||||
* @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
|
||||
* @author ARSAVA <dokuwiki@dev.arsava.com>
|
||||
* @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 buttons, have a look at the README of this
|
||||
template and "/user/buttons.php". You have been warned!
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
//check if we are running within the DokuWiki environment
|
||||
if (!defined("DOKU_INC")){
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
//note: The buttons will be rendered in the order they were defined. Means:
|
||||
// first button will be rendered first, last button will be rendered at
|
||||
// last.
|
||||
|
||||
|
||||
//RSS recent changes button
|
||||
$_vector_btns["rss"]["img"] = DOKU_TPL."static/img/button-rss.png";
|
||||
$_vector_btns["rss"]["href"] = DOKU_BASE."feed.php";
|
||||
$_vector_btns["rss"]["width"] = 80;
|
||||
$_vector_btns["rss"]["height"] = 15;
|
||||
$_vector_btns["rss"]["title"] = $lang["vector_recentchanges"];
|
||||
$_vector_btns["rss"]["nofollow"] = true;
|
||||
|
||||
|
||||
//"vector for DokuWiki" button
|
||||
$_vector_btns["vecfdw"]["img"] = DOKU_TPL."static/img/button-vector.png";
|
||||
$_vector_btns["vecfdw"]["href"] = "https://www.dokuwiki.org/template:vector";
|
||||
$_vector_btns["vecfdw"]["width"] = 80;
|
||||
$_vector_btns["vecfdw"]["height"] = 15;
|
||||
$_vector_btns["vecfdw"]["title"] = $lang["vector_mdtemplatefordw"];
|
||||
$_vector_btns["vecfdw"]["nofollow"] = !(cleanID(getID()) === "start");
|
||||
|
||||
|
||||
//donation button
|
||||
if (tpl_getConf("vector_donate")){
|
||||
$_vector_btns["donate"]["img"] = DOKU_TPL."static/img/button-donate.gif";
|
||||
$_vector_btns["donate"]["href"] = tpl_getConf("vector_donate_url");
|
||||
$_vector_btns["donate"]["width"] = 80;
|
||||
$_vector_btns["donate"]["height"] = 15;
|
||||
$_vector_btns["donate"]["title"] = $lang["vector_donate"];
|
||||
$_vector_btns["donate"]["nofollow"] = true;
|
||||
}
|
||||
|
||||
|
||||
//DokuWiki button
|
||||
$_vector_btns["dw"]["img"] = DOKU_TPL."static/img/button-dw.png";
|
||||
$_vector_btns["dw"]["href"] = "https://www.dokuwiki.org/";
|
||||
$_vector_btns["dw"]["width"] = 80;
|
||||
$_vector_btns["dw"]["height"] = 15;
|
||||
$_vector_btns["dw"]["title"] = "DokuWiki";
|
||||
$_vector_btns["dw"]["nofollow"] = !(cleanID(getID()) === "start");
|
||||
|
||||
|
||||
//W3C (X)HTML validator button
|
||||
$_vector_btns["valid_xhtml"]["img"] = DOKU_TPL."static/img/button-xhtml.png";
|
||||
$_vector_btns["valid_xhtml"]["href"] = "http://validator.w3.org/check/referer";
|
||||
$_vector_btns["valid_xhtml"]["width"] = 80;
|
||||
$_vector_btns["valid_xhtml"]["height"] = 15;
|
||||
$_vector_btns["valid_xhtml"]["title"] = "Valid XHTML";
|
||||
$_vector_btns["valid_xhtml"]["nofollow"] = true;
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
******************************** ATTENTION *********************************
|
||||
DO NOT MODIFY THIS FILE, IT WILL NOT BE PRESERVED ON UPDATES!
|
||||
******************************************************************************
|
||||
If you want to add some own buttons, have a look at the README of this
|
||||
template and "/user/buttons.php". You have been warned!
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Default options for the "vector" DokuWiki template
|
||||
*
|
||||
* Notes:
|
||||
* - In general, use the admin webinterface of DokuWiki to change the config.
|
||||
* - To change the type of a config value, have a look at "metadata.php" in
|
||||
* the same directory as this file.
|
||||
* - To change/translate the descriptions showed in the admin/configuration
|
||||
* menu of DokuWiki, have a look at the file
|
||||
* /lib/tpl/vector/lang/<your lang>/settings.php. If it does not exists,
|
||||
* copy and translate the English one. Don't forget to mail your translation
|
||||
* to ARSAVA <dokuwiki@dev.arsava.com>. Thanks! :-D
|
||||
* - To change the [tabs|boxes|buttons] configuration, have a look at
|
||||
* "/user/[tabs|boxes|buttons].php".
|
||||
*
|
||||
*
|
||||
* LICENSE: This file is open source software (OSS) and may be copied under
|
||||
* certain conditions. See COPYING file for details or try to contact
|
||||
* the author(s) of this file in doubt.
|
||||
*
|
||||
* @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
|
||||
* @author ARSAVA <dokuwiki@dev.arsava.com>
|
||||
* @link https://www.dokuwiki.org/template:vector
|
||||
* @link https://www.dokuwiki.org/devel:configuration
|
||||
*/
|
||||
|
||||
|
||||
//check if we are running within the DokuWiki environment
|
||||
if (!defined("DOKU_INC")){
|
||||
die();
|
||||
}
|
||||
|
||||
//user pages
|
||||
$conf["vector_userpage"] = 1; //1: use/show user pages
|
||||
$conf["vector_userpage_ns"] = ":wiki:user:"; //namespace to use for user page storage
|
||||
|
||||
//discussion pages
|
||||
$conf["vector_discuss"] = 1; //1: use/show discussion pages
|
||||
$conf["vector_discuss_ns"] = ":talk:"; //namespace to use for discussion page storage
|
||||
|
||||
//site notice
|
||||
$conf["vector_sitenotice"] = 1; //1: use/show sitenotice
|
||||
$conf["vector_sitenotice_location"] = ":wiki:site_notice"; //page/article used to store the sitenotice
|
||||
$conf["vector_sitenotice_translate"] = 1; //1: load translated sitenotice if translation plugin is available (see <https://www.dokuwiki.org/plugin:translation>)
|
||||
|
||||
//navigation
|
||||
$conf["vector_navigation"] = 1; //1: use/show navigation
|
||||
$conf["vector_navigation_location"] = ":wiki:navigation"; //page/article used to store the navigation
|
||||
$conf["vector_navigation_translate"] = 1; //1: load translated navigation if translation plugin is available (see <https://www.dokuwiki.org/plugin:translation>)
|
||||
|
||||
//exportbox ("print/export")
|
||||
$conf["vector_exportbox"] = 1; //1: use/show exportbox
|
||||
$conf["vector_exportbox_default"] = 1; //1: use default exportbox (if exportbox is enabled at all)
|
||||
$conf["vector_exportbox_location"] = ":wiki:exportbox"; //page/article used to store a custom exportbox
|
||||
|
||||
//toolbox
|
||||
$conf["vector_toolbox"] = 1; //1: use/show toolbox
|
||||
$conf["vector_toolbox_default"] = 1; //1: use default toolbox (if toolbox is enabled at all)
|
||||
$conf["vector_toolbox_location"] = ":wiki:toolbox"; //page/article used to store a custom toolbox
|
||||
|
||||
//qr code box
|
||||
$conf["vector_qrcodebox"] = 1; //1: use/show box with QR Code of current page's URL
|
||||
|
||||
//custom copyright notice
|
||||
$conf["vector_copyright"] = 1; //1: use/show copyright notice
|
||||
$conf["vector_copyright_default"] = 1; //1: use default copyright notice (if copyright notice is enabled at all)
|
||||
$conf["vector_copyright_location"] = ":wiki:copyright"; //page/article used to store a custom copyright notice
|
||||
$conf["vector_copyright_translate"] = 1; //1: load translated copyright notice if translation plugin is available (see <https://www.dokuwiki.org/plugin:translation>)
|
||||
|
||||
//donation link/button
|
||||
$conf["vector_donate"] = 0; //1: use/show donation link/button
|
||||
$conf["vector_donate_url"] = "https://donate.arsava.com/dokuwiki-template-vector/"; //custom donation URL
|
||||
|
||||
//TOC
|
||||
$conf["vector_toc_position"] = "article"; //article: show TOC embedded within the article; "sidebar": show TOC near the navigation, left column
|
||||
|
||||
//other stuff
|
||||
$conf["vector_breadcrumbs_position"] = "bottom"; //position of breadcrumbs navigation ("top" or "bottom")
|
||||
$conf["vector_youarehere_position"] = "top"; //position of "you are here" navigation ("top" or "bottom")
|
||||
$conf["vector_cite_author"] = "Anonymous Contributors"; //name to use for the author on the citation page
|
||||
$conf["vector_loaduserjs"] = 0; //1: vector/user/user.js will be loaded
|
||||
$conf["vector_closedwiki"] = 0; //1: hides most tabs/functions until user is logged in
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- prevent directory browsing -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Types of the different option values for the "vector" DokuWiki template
|
||||
*
|
||||
* Notes:
|
||||
* - In general, use the admin webinterface of DokuWiki to change the config.
|
||||
* - To change/add configuration values to store, have a look at this file
|
||||
* and the "default.php" in the same directory as this file.
|
||||
* - To change/translate the descriptions showed in the admin/configuration
|
||||
* menu of DokuWiki, have a look at the file
|
||||
* /lib/tpl/vector/lang/<your lang>/settings.php. If it does not exists,
|
||||
* copy and translate the English one. Don't forget to mail your translation
|
||||
* to ARSAVA <dokuwiki@dev.arsava.com>. Thanks! :-D
|
||||
* - To change the tab configuration, have a look at the "tabs.php" in the
|
||||
* same directory as this file.
|
||||
*
|
||||
*
|
||||
* LICENSE: This file is open source software (OSS) and may be copied under
|
||||
* certain conditions. See COPYING file for details or try to contact
|
||||
* the author(s) of this file in doubt.
|
||||
*
|
||||
* @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
|
||||
* @author ARSAVA <dokuwiki@dev.arsava.com>
|
||||
* @link https://www.dokuwiki.org/template:vector
|
||||
* @link https://www.dokuwiki.org/devel:configuration
|
||||
*/
|
||||
|
||||
|
||||
//check if we are running within the DokuWiki environment
|
||||
if (!defined("DOKU_INC")){
|
||||
die();
|
||||
}
|
||||
|
||||
//user pages
|
||||
$meta["vector_userpage"] = array("onoff");
|
||||
$meta["vector_userpage_ns"] = array("string", "_pattern" => "/^:.{1,}:$/");
|
||||
|
||||
//discussion pages
|
||||
$meta["vector_discuss"] = array("onoff");
|
||||
$meta["vector_discuss_ns"] = array("string", "_pattern" => "/^:.{1,}:$/");
|
||||
|
||||
//site notice
|
||||
$meta["vector_sitenotice"] = array("onoff");
|
||||
$meta["vector_sitenotice_location"] = array("string");
|
||||
$meta["vector_sitenotice_translate"] = array("onoff");
|
||||
|
||||
//navigation
|
||||
$meta["vector_navigation"] = array("onoff");
|
||||
$meta["vector_navigation_location"] = array("string");
|
||||
$meta["vector_navigation_translate"] = array("onoff");
|
||||
|
||||
//exportbox ("print/export")
|
||||
$meta["vector_exportbox"] = array("onoff");
|
||||
$meta["vector_exportbox_default"] = array("onoff");
|
||||
$meta["vector_exportbox_location"] = array("string");
|
||||
|
||||
//toolbox
|
||||
$meta["vector_toolbox"] = array("onoff");
|
||||
$meta["vector_toolbox_default"] = array("onoff");
|
||||
$meta["vector_toolbox_location"] = array("string");
|
||||
|
||||
//qr code box
|
||||
$meta["vector_qrcodebox"] = array("onoff");
|
||||
|
||||
//custom copyright notice
|
||||
$meta["vector_copyright"] = array("onoff");
|
||||
$meta["vector_copyright_default"] = array("onoff");
|
||||
$meta["vector_copyright_location"] = array("string");
|
||||
$meta["vector_copyright_translate"] = array("onoff");
|
||||
|
||||
//donation link/button
|
||||
$meta["vector_donate"] = array("onoff");
|
||||
$meta["vector_donate_url"] = array("string", "_pattern" => "/^.{1,6}:\/{2}.+$/");
|
||||
|
||||
//TOC
|
||||
$meta["vector_toc_position"] = array("multichoice", "_choices" => array("article", "sidebar"));
|
||||
|
||||
//other stuff
|
||||
$meta["vector_breadcrumbs_position"] = array("multichoice", "_choices" => array("top", "bottom"));
|
||||
$meta["vector_youarehere_position"] = array("multichoice", "_choices" => array("top", "bottom"));
|
||||
$meta["vector_cite_author"] = array("string");
|
||||
$meta["vector_loaduserjs"] = array("onoff");
|
||||
$meta["vector_closedwiki"] = array("onoff");
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Default tab configuration of the "vector" DokuWiki template
|
||||
*
|
||||
*
|
||||
* LICENSE: This file is open source software (OSS) and may be copied under
|
||||
* certain conditions. See COPYING file for details or try to contact
|
||||
* the author(s) of this file in doubt.
|
||||
*
|
||||
* @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
|
||||
* @author ARSAVA <dokuwiki@dev.arsava.com>
|
||||
* @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 tabs, have a look at the README of this template
|
||||
and "/user/tabs.php". You have been warned!
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
//check if we are running within the DokuWiki environment
|
||||
if (!defined("DOKU_INC")){
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************** LEFT NAVIGATION ******************************/
|
||||
|
||||
//note: The tabs will be rendered in the order they were defined. Means: first
|
||||
// tab will be rendered first, last tab will be rendered at last.
|
||||
|
||||
|
||||
|
||||
//article tab
|
||||
//ATTENTION: "ca-nstab-main" is used as css id selector!
|
||||
if (substr(getID(), 0, strlen("wiki:user:")) !== "wiki:user:"){
|
||||
$_vector_tabs_left["ca-nstab-main"]["text"] = $lang["vector_article"];
|
||||
}else{
|
||||
$_vector_tabs_left["ca-nstab-main"]["text"] = $lang["vector_userpage"];
|
||||
}
|
||||
$_vector_tabs_left["ca-nstab-main"]["accesskey"] = "V";
|
||||
if ($vector_context !== "discuss"){ //$vector_context was defined within main.php
|
||||
$_vector_tabs_left["ca-nstab-main"]["wiki"] = ":".getID();
|
||||
$_vector_tabs_left["ca-nstab-main"]["class"] = "selected";
|
||||
}else{
|
||||
$_vector_tabs_left["ca-nstab-main"]["wiki"] = ":".substr(getID(), strlen(tpl_getConf("vector_discuss_ns"))-1);
|
||||
}
|
||||
|
||||
|
||||
//hide some tabs for anonymous clients (closed wiki)?
|
||||
if (empty($conf["useacl"]) || //are there any users?
|
||||
$loginname !== "" || //user is logged in?
|
||||
!tpl_getConf("vector_closedwiki")){
|
||||
|
||||
//discussion tab
|
||||
//ATTENTION: "ca-talk" is used as css id selector!
|
||||
if (tpl_getConf("vector_discuss")){
|
||||
$_vector_tabs_left["ca-talk"]["text"] = $lang["vector_discussion"];
|
||||
if ($vector_context === "discuss"){ //$vector_context was defined within main.php
|
||||
$_vector_tabs_left["ca-talk"]["wiki"] = ":".getID();
|
||||
$_vector_tabs_left["ca-talk"]["class"] = "selected";
|
||||
}else{
|
||||
$_vector_tabs_left["ca-talk"]["wiki"] = tpl_getConf("vector_discuss_ns").getID();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************** RIGHT NAVIGATION ******************************/
|
||||
|
||||
//note: The tabs will be rendered in the order they were defined. Means: first
|
||||
// tab will be rendered first, last tab will be rendered at last.
|
||||
|
||||
|
||||
//read tab
|
||||
if(!empty($INFO["exists"])){
|
||||
//ATTENTION: "ca-view" is used as css id selector!
|
||||
$_vector_tabs_right["ca-view"]["text"] = $lang["vector_read"];
|
||||
if ($vector_context !== "discuss"){ //$vector_context was defined within main.php
|
||||
$_vector_tabs_right["ca-view"]["wiki"] = ":".getID();
|
||||
if ($ACT === "show") { //$ACT comes from DokuWiki core
|
||||
$_vector_tabs_right["ca-view"]["class"] = "selected";
|
||||
}
|
||||
}else{
|
||||
$_vector_tabs_right["ca-view"]["wiki"] = ":".substr(getID(), strlen(tpl_getConf("vector_discuss_ns"))-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//hide some tabs for anonymous clients (closed wiki)?
|
||||
if (empty($conf["useacl"]) || //are there any users?
|
||||
$loginname !== "" || //user is logged in?
|
||||
!tpl_getConf("vector_closedwiki")){
|
||||
|
||||
//edit/create/show source tab
|
||||
//ATTENTION: "ca-edit" is used as css id selector!
|
||||
$_vector_tabs_right["ca-edit"]["href"] = wl(cleanID(getId()), array("do" => "edit", "rev" => (int)$rev), false, "&");
|
||||
$_vector_tabs_right["ca-edit"]["accesskey"] = "E";
|
||||
if (!empty($INFO["writable"])){ //$INFO comes from DokuWiki core
|
||||
if (!empty($INFO["draft"])){
|
||||
$_vector_tabs_right["ca-edit"]["href"] = wl(cleanID(getId()), array("do" => "draft", "rev" => (int)$rev), false, "&");
|
||||
$_vector_tabs_right["ca-edit"]["text"] = $lang["btn_draft"]; //language comes from DokuWiki core
|
||||
}else{
|
||||
if(!empty($INFO["exists"])){
|
||||
$_vector_tabs_right["ca-edit"]["text"] = $lang["vector_edit"];
|
||||
}else{
|
||||
$_vector_tabs_right["ca-edit"]["text"] = $lang["vector_create"];
|
||||
}
|
||||
}
|
||||
}elseif (actionOK("source")){ //check if action is disabled
|
||||
$_vector_tabs_right["ca-edit"]["text"] = $lang["btn_source"]; //language comes from DokuWiki core
|
||||
$_vector_tabs_right["ca-edit"]["accesskey"] = "E";
|
||||
}
|
||||
if ($ACT === "edit"){ //$ACT comes from DokuWiki core
|
||||
$_vector_tabs_right["ca-edit"]["class"] = "selected";
|
||||
}
|
||||
|
||||
|
||||
//old versions/revisions tab
|
||||
if (!empty($INFO["exists"]) &&
|
||||
actionOK("revisions")){ //check if action is disabled
|
||||
//ATTENTION: "ca-history" is used as css id selector!
|
||||
$_vector_tabs_right["ca-history"]["text"] = $lang["btn_revs"]; //language comes from DokuWiki core
|
||||
$_vector_tabs_right["ca-history"]["href"] = wl(cleanID(getId()), array("do" => "revisions"), false, "&");
|
||||
$_vector_tabs_right["ca-history"]["accesskey"] = "O";
|
||||
if ($ACT === "revisions"){ //$ACT comes from DokuWiki core
|
||||
$_vector_tabs_right["ca-history"]["class"] = "selected";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//(un)subscribe tab
|
||||
//ATTENTION: "ca-watch" is used as css id selector!
|
||||
if (!empty($conf["useacl"]) &&
|
||||
!empty($conf["subscribers"]) &&
|
||||
!empty($loginname)){ //$loginname was defined within main.php
|
||||
//2010-11-07 "Anteater" and newer ones
|
||||
if (empty($lang["btn_unsubscribe"])) {
|
||||
if (actionOK("subscribe")){ //check if action is disabled
|
||||
$_vector_tabs_right["ca-watch"]["href"] = wl(cleanID(getId()), array("do" => "subscribe"), false, "&");
|
||||
$_vector_tabs_right["ca-watch"]["text"] = $lang["btn_subscribe"]; //language comes from DokuWiki core
|
||||
}
|
||||
//2009-12-25 "Lemming" and older ones. See the following for information:
|
||||
//<http://www.freelists.org/post/dokuwiki/Question-about-tpl-buttonsubscribe>
|
||||
} else {
|
||||
if (empty($INFO["subscribed"]) && //$INFO comes from DokuWiki core
|
||||
actionOK("subscribe")){ //check if action is disabled
|
||||
$_vector_tabs_right["ca-watch"]["href"] = wl(cleanID(getId()), array("do" => "subscribe"), false, "&");
|
||||
$_vector_tabs_right["ca-watch"]["text"] = $lang["btn_subscribe"]; //language comes from DokuWiki core
|
||||
}elseif (actionOK("unsubscribe")){ //check if action is disabled
|
||||
$_vector_tabs_right["ca-watch"]["href"] = wl(cleanID(getId()), array("do" => "unsubscribe"), false, "&");
|
||||
$_vector_tabs_right["ca-watch"]["text"] = $lang["btn_unsubscribe"]; //language comes from DokuWiki core
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
******************************** ATTENTION *********************************
|
||||
DO NOT MODIFY THIS FILE, IT WILL NOT BE PRESERVED ON UPDATES!
|
||||
******************************************************************************
|
||||
If you want to add some own tabs, have a look at the README of this template
|
||||
and "/user/tabs.php". You have been warned!
|
||||
*****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user