1<?php 2 3/** 4 * User defined box configuration of the "mnml-blog" DokuWiki template 5 * 6 * Create a "/user/boxes.php" file if you want to add/remove some sidebar boxes. 7 * The template recognizes and loads the provided boxes data automatically. 8 * You may want to rename this file from "boxes.php.dist" to "boxes.php" 9 * to get a good starting point as it provides some examples. The comments of 10 * the {@link _mnml-blog_renderBoxes()} (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-box 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:mnml-blog 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 boxes will be rendered in the order they were defined. Means: 38// first box will be rendered first, last box will be rendered at last. 39 40 41 42//examples: uncomment to see what is happening 43$_mnmlblog_boxes["example1"]["headline"] = "Hello World!"; 44$_mnmlblog_boxes["example1"]["xhtml"] = "Blogging with DokuWiki and mnml-blog... <em>rules</em>!"; 45 46 47/* 48//subscribe 49$_mnmlblog_boxes["syndication"]["headline"] = "Syndiaction/RSS Feed"; 50$_mnmlblog_boxes["syndication"]["xhtml"] = '<a href="'.DOKU_URL.'feed.php?mode=blogtng&blog=default" rel="nofollow">Subscribe to posts</a>'; //ATTENTION: if not default, replace blog=default with the blogtng-template you are using! 51*/ 52 53 54/* 55//recent comments 56//note: you have to create the page ":wiki:recent_comments" with the following 57// content first: 58//<blog recentcomments> 59// blog default 60// tpl default 61// limit 10 62// type comment, linkback 63// nolistwrap 0 64//</blog> 65//see https://www.dokuwiki.org/plugin:blogtng#blog_recentcomments for more details. 66//If not default, replace "default" with the blogtng-template you are using! 67$_mnmlblog_boxes["recentcomments"]["headline"] = "Recent Comments"; 68$_mnmlblog_boxes["recentcomments"]["xhtml"] = tpl_include_page("wiki:recent_comments", false); 69*/ 70 71 72/* 73//tag cloud 74//note: you have to create the page ":wiki:tagcloud" with the following 75// content first: 76//<blog tagcloud> 77// blog default 78// limit 20 79// target start 80//</blog> 81//see https://www.dokuwiki.org/plugin:blogtng#blog_tagcloud for more details. 82//If not default, replace "default" with the blogtng-template you are using! 83$_mnmlblog_boxes["tagcloud"]["headline"] = "Tag cloud"; 84$_mnmlblog_boxes["tagcloud"]["xhtml"] = tpl_include_page("wiki:tagcloud", false); 85*/ 86 87 88/* 89$_mnmlblog_boxes["example2"]["headline"] = "Some links"; 90$_mnmlblog_boxes["example2"]["xhtml"] = "<ul>\n" 91 ." <li><a href=\"".wl(cleanID(getId()), array("do" => "backlink"))."\" rel=\"nofollow\">".hsc($lang["mnmlblog_lnk_whatlinkshere"])."</a></li>\n" 92 ." <li><a href=\"http://www.example.com\">Example link</a></li>\n" 93 ."</ul>"; 94*/ 95 96 97/* 98$_mnmlblog_boxes["example3"]["headline"] = "Buttons"; 99$_mnmlblog_boxes["example3"]["xhtml"] = "<a href=\"https://donate.arsava.com/dokuwiki-template-mnml-blog/\" title=\"Donate\" target=\"_blank\" rel="nofollow"><img src=\"".DOKU_TPL."images/button-donate.gif\" width=\"80\" height=\"15\" alt=\"Donate\" border=\"0\" /></a>"; 100*/ 101 102 103/* 104//public links 105$_mnmlblog_boxes["publnk"]["headline"] = "Toolbox"; 106$_mnmlblog_boxes["publnk"]["xhtml"] = "<ul>\n" 107 ." <li><a href=\"".wl(cleanID(getId()), array("do" => "backlink"))."\">".hsc($lang["mnmlblog_lnk_whatlinkshere"])."</a></li>\n" 108 ." <li><a href=\"".wl(cleanID(getId()), array("do" => "index"))."\">".hsc($lang["mnmlblog_lnk_siteindex"])."</a></li>\n" 109 ."</ul>"; 110*/ 111 112 113/* 114//internal links (for logged in users) 115if (!empty($loginname)){ //$loginname comes from main.php 116 $_mnmlblog_boxes["userlnk"]["headline"] = "Internal"; 117 $_mnmlblog_boxes["userlnk"]["xhtml"] = "<ul>\n"; 118 //edit/create/show source 119 if (!empty($INFO["writable"])){ //$INFO comes from DokuWiki core 120 if (!empty($INFO["draft"])){ 121 $_mnmlblog_boxes["userlnk"]["xhtml"] .= " <li><a href=\"".wl(cleanID(getId()), array("do" => "draft", "rev" => (int)$rev))."\" rel=\"nofollow\">".hsc($lang["btn_draft"])."</a></li>\n"; //language comes from DokuWiki core, $rev comes from main.php 122 }else{ 123 if(!empty($INFO["exists"])){ 124 $_mnmlblog_boxes["userlnk"]["xhtml"] .= " <li><a href=\"".wl(cleanID(getId()), array("do" => "edit", "rev" => (int)$rev))."\" rel=\"nofollow\">".hsc($lang["btn_edit"])."</a></li>\n"; //language comes from DokuWiki core, $rev comes from main.php 125 }else{ 126 $_mnmlblog_boxes["userlnk"]["xhtml"] .= " <li><a href=\"".wl(cleanID(getId()), array("do" => "edit", "rev" => (int)$rev))."\" rel=\"nofollow\">".hsc($lang["btn_create"])."</a></li>\n"; //language comes from DokuWiki core, $rev comes from main.php 127 } 128 } 129 }else{ 130 $_mnmlblog_boxes["userlnk"]["xhtml"] .= " <li><a href=\"".wl(cleanID(getId()), array("do" => "edit", "rev" => (int)$rev))."\" rel=\"nofollow\">".hsc($lang["btn_source"])."</a></li>\n"; //language comes from DokuWiki core, $rev comes from main.php 131 } 132 133 $_mnmlblog_boxes["userlnk"]["xhtml"] .= " <li><a href=\"".wl("", array("do" => "media"))."\" rel=\"nofollow\">".hsc($lang["btn_media"])."</a></li>\n" //language comes from DokuWiki core 134 ." <li><a href=\"".wl(cleanID(getId()), array("do" => "revisions"))."\" rel=\"nofollow\">".hsc($lang["btn_revs"])."</a></li>\n" //language comes from DokuWiki core 135 ." <li><a href=\"".wl(cleanID(getId()), array("rev" =>(int)$rev))."\" rel=\"nofollow\">".hsc($lang["mnmlblog_lnk_permrev"])."</a></li>\n"; //$rev comes from main.php 136 //admin 137 if (!empty($INFO["isadmin"]) || 138 !empty($INFO["ismanager"])){ 139 $_mnmlblog_boxes["userlnk"]["xhtml"] .= " <li><a href=\"".wl(cleanID(getId()), array("do" => "admin"))."\" rel=\"nofollow\">".hsc($lang["btn_admin"])."</a></li>\n" //language comes from DokuWiki core 140 ." <li><a href=\"".wl(cleanID(getId()), array("do" => "admin", "page" => "blogtng"))."\" rel=\"nofollow\">".hsc($lang["btn_admin"])." (Blog)</a></li>\n"; //language comes from DokuWiki core 141 } 142 //admin (BlogTNG) 143 $_mnmlblog_boxes["userlnk"]["xhtml"] .= " <li><a href=\"".wl(cleanID(getId()), array("do" => "profile"))."\" rel=\"nofollow\">".hsc($lang["btn_profile"])."</a></li>\n" //language comes from DokuWiki core 144 ."</ul>"; 145} 146*/ 147 148