I answer all questions on this page, but I occasionally delete older questions as they become irrelevant.
Old revisions are still available, so if you've asked a question and it's not here, look there.
Please spell “DokuWiki” correctly when referencing it.
Link your site here if you wish
If you wish to support a language, please do the following:
After I get your email, I'll add the language to the next release, and link it below so those who need it before the next release can get it.
These are the top questions that always seem to come up; I guarantee you that they're not caused by the template.
Your problems can be explained and fixed here.
The template didn't cause this.
Reread the installation instructions.
I had this problem because I had not installed the displaywikipage plugin. After installing it the trouble disappeared. It is not documented, is it?
It is documented, follow the link above. — Terence J. Grant 07/19/2007 23:04
This has to do with the Display Wiki Page for DokuWiki plugin, so ask it on that discussion page.
This has nothing to do with the template, so don't ask it here.
Ask any question you want about ACL here, here, here, and the mailing list.
If you paste in ACL to this discussion, it will get deleted.
Yes, but here is an ACL problem pertaining to the monobook install instructions. The instructions emphasize to include the colon before the template pages (e.g., :wiki:navigation) which is fine as long as your entire (*) namespace is readable by ALL (which mine isn't, so the navigation and other :wiki portions do not show up for those not logged in). A solution is to change the configuration to NOT include the root colon (e.g., wiki:navigation) and grant read access to ALL for the wiki namespace.
Here's a couple of things to consider.
I've reported this bug here, and here. As you can see from both links, they're not able to reproduce the bugs (but they're comparing this to the “current dev version” rather than the “stable” versions everyone else uses.) This means either one of two things:
And again, I'll state, if this problem still exists, it isn't a problem with monobook, it's a bug in DokuWiki's ACL. ACL problems have absolutely nothing to do with this project– if it's a problem with ACL here, it's a problem with ACL everywhere– and there's truly absolutely nothing I can do from here to fix them. — Terence J. Grant 08/02/2007 03:02
for anyone who does want a quick solution, and not to read links here and there about who is responsible for some bug: in inc/auth.php at line 341 (in function auth_aclcheck($id,$user,$groups)) just make sure $id does NOT begin with a ”:”. e.g. like this:if (substr($id, 0, 1) == ”:”) $id = substr($id, 1);have fun — Alec Alanis 02/03/2008 22:54
If it's not related to look and feel, the template didn't do it. It's not even remotely possible.
My suggestion is to use a PDF print driver, like one you might find in Adobe Acrobat (commercial version). Personally I use PDF995's PDF printer, and it's great.
Otherwise, there are many plugins that attempt to solve this problem. I don't use them.
If you use a PDF print driver, just click “Printable Version” and you're set– just print. Otherwise, it's up to how the PDF plugin you're using does it; editing the toolbox is covered on Monobook for DokuWiki project page, so I'll refer you to that.
That's part of the Display Wiki Page for DokuWiki plugin. It's required for navigation, site notice, and copyright.
Just uninstall the plugin then!
Ask any other questions below.
Hi,
I recently upgraded to the latest dokuwiki (2008-05-05) and sometimes when I open a page, the table of content of that page appears at the top in the navigation frame, as well as at the standard location. Simply reloading the page solves the issue and gives me a normal navigation frame. Any thought how this can be caused…? The former dokuwiki engine did not show this problem, so it must be related to that, I guess, but I cannot disentangle where dokuwiki stops and monobook starts…
I have a picture showing the effect but I can't upload it.
Cheers, Arno Schoenmakers (schoenmakers 'at' astron 'dot' nl).
Hi it is me again – Len from PatentBlurb.com. I am having the same problem as Arno.
When using Firefox, the table of contents form the main page shows up in the navigation window. If I refresh the page, the ToC goes away and the page correctly renders. I have deleted the DokuWiki cache pages in the data directory and this is not caused by browser cache.
When using Internet Explorer, I get a different problem – the background of my logo isn't transparent like it used to be.
I posted screenshots of the issue here.
– Len May 31, 2008
Hi. I noted a minor formatting error that seems to only appear in Firefox browsers. I reported the bug to splitbrain, but then realized maybe it is a monobook issue more than a Dokuwiki issue. The bug report is here. I'll repeat what I wrote for convenice sake:
“This is a rendering error that appears to be limited to Firefox. Opera and IE seem to render correctly. The problem is that a long unordered list beginning across from an “expanded” table of contents will not wrap around the table of contents.” See my sample page here: http://www.patentblurb.com/doku.php/playgroundtest
(By the way – love the template, good works and tons of thanks!) –Len
Hi Len, I see what you're talking about, though truthfully I don't know how to fix this. I'd say it's definitely a CSS related issue though. Do you get this same behavior with the “default” template, by the way?
My guess would be, any fix for this will happen in doku.css in the monobook distribution. Look for “toc”, as all style matters related to the dokuwiki table of contents uses this. — Terence J. Grant 08/02/2007 06:55
Perhaps this has already been fixed, but in the version I have (quite recent) the search box toggle option is actually set to toggle with the sitenotice toggle. In main.php, line 125 down:
<?php if (tpl_getConf('mb_use_sitenotice')) { ?> <div id="p-search" class="portlet"> <h5> <label><?php echo $lang['monobook_bar_search']?></label></h5>
…..
Shouldn't the first line use a variable like mb_use_search?
I can confirm that toggling the option (in config options) for sitenotice turns on/off BOTH the sitenotice and the search box.
This has already been fixed, so just upgrade and you should be fine. — Terence J. Grant 07/24/2007 17:05
If I turn on debug, I get the following errors on the configuration screen. Using 2007-06-28 release.
Also, the “Upload file” in default toolbox does not check to see if a user is logged in first, when my site is set to “closed”, only registered users.
$conf['tpl']['monobook']['mb_bc_loc'] No default value.
$conf['tpl']['monobook']['mb_hbc_loc'] No default value.
Stephan H. 2007-07-08
The wiki engine should stop people from uploading if they don't have permissions to do so, regardless of whether or not the link is displayed. Having to detect whether or not a user can upload is different than just checking if they're logged in, so this means more fun with ACL, which I've yet to verify if the problems with have been fixed yet– so I'm not going to touch this right now, however, I will make a note of it for myself as a todo item.
If you (or someone else) feels comfortable enough to fix this in the interim, feel free to send me an email with an updated (I think) toolbox.php file.
For the “no default value” things– this is beyond my control (last I checked, I was doing everything OK) so I'm going to call this one “not my problem” for now, but I'll look into it just in case. Nothing is actually missing though, so you're not losing out on any settings.
— Terence J. Grant 07/20/2007 02:10
First of all thanks for a wonderful plugin.
At the moment my wiki is being filled with a huge amount of pages, by itself this is not an issue, however the navigation box is filling up rapidly (have the indexmenu here, for easy navigation) and it would be great if the boxes can be resized by about 20%. I've been browsing in the css files, and i did find the size control for the boxes itself, however the rest of the screen is a little less obvious.
Can someone help me? – Herman 06/14/2007
Really this is just a matter of diving into the CSS files provided– I get them from both wikipedia and mediawiki's websites so I couldn't tell you offhand what to change. There is an extension for firefox called “web developer” which can help though; it's listed on the Links page. — Terence J. Grant 07/20/2007 02:22
Even the latest Monobook template do not have the admin option (top right menu) for user that had been granted Manager privilege using the “Manager” field configurable under Authentication Settings of Configuration Manager. The admin option is available when using Dokuwiki Default template. Is this a bug of monobook template or some setting is require to turn on the admin option for user not having superuser authority? – Sam 06/04/2007
Well, I'm not on the core dokuwiki team, so sometimes I miss the big changes like “manager”; I've become aware of it, and looking into it, but I can't provide anything right now, sorry.
In the mean time, if anyone would like to send an update that handles this, it would be appreciated. — Terence J. Grant 07/20/2007 02:30
Any news ?
Yeah, the news is: I don't have time to look into it this second. — Terence J. Grant 07/20/2007 23:13
It appears that the monobook template uses id's named “content” to format parts of the document. See “lib/tpl/monobook/monobook/main.css, Line 18” This is an issue for those wanting to use the word “Content” alone in a heading. A quick fix has been written at http://forum.dokuwiki.org/thread/716, but I wanted to report this issue to the template author.
Otherwise, Monobook is fantastic, thanks for a great template!
— Ryan Cargo 03/13/2007 11:03
Hi Ryan, the fix does not work unfortunately; the change causes the entire content of the site to become misaligned. I believe the reason is due to later references to “content” from within one of the other CSS files, perhaps expecting it to be an ID rather than a class. I'll investigate more, though don't let me stop you from doing the same. — Terence J. Grant 03/13/2007 20:32
With version 12022006 you can specify whether to use the default toolbox or to have a DokuWiki place for it. How can you use the 'special' variables to make a menu consisting of eg. Upload File and Permanent link ?
You can peek into context.php, near the bottom; look for $monobook['toolbox']. It uses the old style method for creating links, which is described here in an old revision of the project page.
I'll expose an API to handle this better in a future release. — Terence J. Grant 12/03/2006 23:55
How can i add a link in the toolbox to export the current page as PDF? I am using the procedure explained here
Please read the above explanation; peek into context.php, near the bottom. You can add in a new link via the $monobook['toolbox'] variable. — Terence J. Grant 03/11/2007 01:42
For example: To append a link to a page in namespace dh add:
$monobook['defaulttoolbox']['new_page']['href'] = DOKU_BASE."doku.php?id=dh:seiteanlegen"; $monobook['defaulttoolbox']['new_page']['text'] = "Neue Seite"; $monobook['defaulttoolbox']['new_page']['rel'] = "nofollow";
How do I hide navigation, search, the toolbox, etc. until the user has logged in?
I have the same problem. I use the latest versions.
Quick answer: Certain things in DokuWiki don't work correctly; I've reported them, but there's nothing I can do about them from my end.
The full story is located here.
— Terence J. Grant 02/17/2007 13:20
…
Philippe, my advice would be to customize either the template code or the plugin code to suit your needs– unfortunately I can't agree with the method in which the translation plugin works. Notice that even on english language pages, everything on your site is in french.
This is not really sufficient in my opinion.
— Terence J. Grant 07/20/2007 03:10
In the configuration settings, activate the Should the language of the user interface be switched in foreign language namespaces, too? option. This options translates the entire site, with the exception of the sidebar. To have a multi-language side bar, in the main.php find the following text:
<?php if (function_exists('dwp_display_wiki_page')) dwp_display_wiki_page(tpl_getConf('mb_navigation_location')); ?>
and replace it with:
<?php $translation = &plugin_load('syntax','translation'); $currentlang = $translation->_currentLang(); if($currentlang!=null){ $navigation_location=$currentlang.tpl_getConf('mb_navigation_location'); }else{ $navigation_location=tpl_getConf('mb_navigation_location'); }?> <?php if (function_exists('dwp_display_wiki_page')) dwp_display_wiki_page($navigation_location); ?>
All you need to do now is to create a page for the sidebar for each language. I tested this with a dual language site and so far I have no problems with it.
— Marco Constâncio 05/11/2007 22:41
Please, what is the best practice for adding clickable banners beneath the toolbox section while preserving the original toolbox? Thanks. joe
Hi Joe, look for this in main.php:
<?php if (tpl_getConf('mb_use_toolbox')) { ?> ... <?php } ?>
The ”…” represents additional code; it's a big block, so look for the first line listed there. Add whatever banner you want after that, and before the </div> tag. — Terence J. Grant 08/06/2007 08:51
Using the current versions of Dokuwiki and Monobook, I have a Problem with the “searchGoButton”: If I search for a term, it shows a mouseover-effect with Firefox and shows nothing with IE – clicking this button produces a failure in IE (maybe a javascript-failure?) and nothing happens if I click the searchGoButton in Firefox. As I can see this butten works at tatewake.com. Any ideas?
— Wolfgang - 2007/09/06
— Boro - 2008/01/21
Post your patches and code contributions here if you wish.
This file has been included with the main monobook download for some time, but I'm dropping it and will just link it here since it has remained unfinished. Also, I spent a lot of time getting the names of the languages right and did not want to delete the file.
So here it is as a prototype for someone else to possibly finish:
It does not work as a simple drop in, you will have to figure it out on your own. Also if you do use it, it will make your wiki much slower(which is why it was never enabled in any release.)
I believe there is a better (and different way) to do “in other languages” support; this method isn't very good though.
— Terence J. Grant 08/19/2006 17:53
I needed a logbook in my wiki (namespace :logbook) but I don't have the time to create a new subpage with the current date from my logbook-namespace every day (e.g. :logbook:2006-11-13 for 11/13/2006). This code for “pref.php” adds a link in the navigation toolbar which leads to the logbook page of the current day in the logbook-namespace:
$monobook['navigation']['log']['wiki'] = ":logbook:".date("Y-m-d");
$monobook['navigation']['log']['text'] = "LogMe";
At the moment, the code seems to work fine, leading to an link to logbook:2006-11-13 in the navigation bar.
Since the links will become orphaned the next day, I've included the orphanswanted-plugin with the following code on the logbook-page itself:
~~ORPHANSWANTED:orphans!ALL_MY_NAMESPACES_EXCEPT_LOGBOOK~~
which reminds me which dates I've got to link there once I've got a few minutes time.
We're using one wiki for all our people, and they have access to the namespaces they need for their work. So they wished to get some different navigation bars for each namespace (because allmost nobody has access to everything right now).
So I got some inspiration by the comment above and checked the sidebar template by Christopher Smith and implemented his recursive sidebar function to display_wiki.
For testing, add the changed code.php in your plugins/displaywikipage folder and edit line 261 in context.php of mediawiki template to
if (function_exists('dwp_display_wiki_page')) dwp_display_wiki_page($action['wiki_page'], true);
See Talk:Projects:Display Wiki Page for DokuWiki
ATTENTION - THIS IS AT LEAST JUST A BETA STAGE
— Martin Schleyer 11/29/2006 13:22
I'll look into this when I get some time, thanks. — Terence J. Grant 12/04/2006 00:21
This is my very simple solution
I'm adding following code to the begining of <mainwikifolder>/lib/tpl/monobook/main.php:
(after @include(dirname(FILE).'/context.php'); on the line 7)
if ($INFO['client']=="username"){ //or for group info: $INFO['userinfo']['grps'] $conf['tpl']['monobook']['mb_navigation_location'] = 'namespace:page'; //for ex.: 'wiki:navigation' }
— Fero Gajdosik 12/02/2007
and its usual position is to be used for navigation links (adaptation of css), I believe that this small change to main.php is appropriate (search for p-logo, to find the position of this code in main.php):
<?php if (file_exists(dirname(__FILE__).'/user/logo.png')
or file_exists(dirname(__FILE__).'/user/logo.gif')
or file_exists(dirname(__FILE__).'/user/logo.jpg')) { ?>
<div class="portlet" id="p-logo">
<a
<?php if (file_exists(dirname(__FILE__).'/user/logo.png')) { ?>
style="background-image: url(<?php echo $DOKU_TPL?>user/logo.png);"
<?php } else if (file_exists(dirname(__FILE__).'/user/logo.gif')) {?>
style="background-image: url(<?php echo $DOKU_TPL?>user/logo.gif);"
<?php } else if (file_exists(dirname(__FILE__).'/user/logo.jpg')) {?>
style="background-image: url(<?php echo $DOKU_TPL?>user/logo.jpg);"
<?php } ?>
href="<?php echo DOKU_BASE?>" accesskey="h" title="[ALT+H]">
</a>
</div>
<?php } ?>
Borut, 2007-03-22
I didn't want the wiki namespace on my wiki (though I know this will probably have some disastrous consequences in the future..
) To do this, I opened ~lib/tpl/monobook/context.php and search for wiki:user - and remove “wiki:” from each instance. If you do this, be very careful to maintain the syntax - e.g. in some places it's :wiki:user and you need to change that to :user. Please let me know if I missed something! tobias 2007-03-27
I think this problem only occured in the new version of the monobook template (05.23.2007). In the main.css the #content has a z-index:2, whereas the div.insitu.footnotes in doku.css don`t have any z-index, so the footnotes are rendered behind the content, and thus invisible. This behavior can for example be seen here: footnotes Setting the z-index of div.insitu.footnotes in doku.css to 3 should take care of this problem and display the footnotes properly. Christian 06-01-2007
Just add the code below to context.php to get the link back.
/* Default Toolbox Portlet */ $monobook['defaulttoolbox']['recentchanges']['href'] = DOKU_BASE."doku.php?do=recent"; $monobook['defaulttoolbox']['recentchanges']['text'] = "Recent Changes"; $monobook['defaulttoolbox']['recentchanges']['rel'] = "nofollow";
On another note I am still wondering why there is wiki:toolbox namespace setting if its not used.
$conf['mb_toolbox_location'] = ":wiki:toolbox";
Scott Grayban 2007-06-20
When upgrading to DokuWiki 2007-06-26b with monobook 2007-07-20, I noticed IE (ver 7) began complaining about “This page contains both secure and nonsecure items”. Apparently, an image in the template was being referenced as “http” whereas my site only allows “https”. I finally tracked this down to the Monobook.css file (lib/tpl/monobook/wikipedia/en/Monobook.css) which pulls image files from a public site for display. IMO, this should be fixed in a later Monobook update as this is less efficient than delivering the files from your own server and a potential security risk.
My temp solution is as follows:
.portlet li {
/* The following image causes IE to produce nonsecure popup warning when using https://
list-style-image: url("http://upload.wikimedia.org/wikipedia/en/1/18/Monobook-bullet.png");
*/
list-style-image: url("../../common/images/Monobook-bullet.png");
}
li.FA {
/* The following image causes IE to produce nonsecure popup warning when using https://
list-style-image: url("http://upload.wikimedia.org/wikipedia/en/d/d4/Monobook-bullet-star.png");
*/
list-style-image: url("../../common/images/Monobook-bullet-star.png");
}
This gets rid of the IE complaints (not an issue under FireFox 1.5 at least).
Bobby Metz 07/25/2007
I just wondered how to get the same heading-indention (and the “contents” inside a heading) like it is done in the default DokuWiki template. After some investigating of both the themes using Mozilla FireFox & FireBug I found out that the default DokuWiki template has some extended CSS-styles to get the indention. Here are some of my findings:
h1, h2, h3, h4, h5, h6 { color: black; background: none; font-weight: normal; margin: 0; padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa; } h1 { font-size: 188%; } h2 { font-size: 150%; } h3, h4, h5, h6 { border-bottom: none; font-weight: bold; } h3 { font-size: 132%; } h4 { font-size: 116%; } h5 { font-size: 100%; } h6 { font-size: 80%; }
to
h1, h2, h3, h4, h5, h6 { color: black; background: none; font-weight: normal; margin: 0; padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa; } h1 { font-size: 188%; } h2 { font-size: 150%; margin-left: 20px; } h3, h4, h5, h6 { border-bottom: none; font-weight: bold; } h3 { font-size: 132%; margin-left: 40px; } h4 { font-size: 116%; margin-left: 60px; } h5 { font-size: 100%; margin-left: 80px; } h6 { font-size: 80%; }
/* indent different sections */ div.dokuwiki div.level1 {margin-left: 3px;} div.dokuwiki div.level2 {margin-left: 23px;} div.dokuwiki div.level3 {margin-left: 43px;} div.dokuwiki div.level4 {margin-left: 63px;} div.dokuwiki div.level5 {margin-left: 83px;}
I also noticed that the Monobook CSS-styles are kind of expecting support for H6-headings although DokuWiki only supports H1-H5. So the H6-support can be dropped imho.
Maybe it's an idea to create a configurable option for the Monobook-template which enables/disables this hack. This way no hacks are needed although users can use the “heading-indention”…
Mischa The Evil, 10-08-2007
Use better wl() and ml() to create the links, to support the [userewrite] option.
Example: wl($ID, array('rev'⇒$_REQUEST['rev'], 'mbdo'⇒'cite']))
Spamers are searching sites for spamable content, “doku.php” shows such a spamable environment. So its better to hide “doku.php” completely.
DokuWiki let some people in manager group (see $conf['manager'] ) have access to admin menu for some restricted actions. It would be nice for them to have as the superuser a 'Admin' menu item in the personnal-bar. Just a little change is needed in context.php
Change
200: if ($INFO['perm'] == AUTH_ADMIN) 201: { 202: $monobook['personal']['admin']['href']=DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=admin";
by
200: if ($INFO['ismanager']) 201: { 202: $monobook['personal']['admin']['href']=DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=admin";
— Marc DeXeT 2007/08/23 23:08
I have done some changes in /lib/tpl/monobook/context.php to have more “specialpages” and to have them displayed in a Mediawiki-Style: To have more specialpages I added
after if (beginsWith($ID, "wiki:"))
if (beginsWith($ID, "Hilfe:")) /**** my Help-Files - may be "help" for others ****/ { $pagetype = "special"; /* Special page */ } if (beginsWith($ID, "Spezialseiten:")) /**** my Special pages ****/ { $pagetype = "special"; /* Special page */ }
and after if ($ACT == "search")
else if ($ACT == "index") { $pagetype = "special"; /* Special page */ }
and finally after if ($_REQUEST['mbdo'] == 'cite')
else if ($_REQUEST['do'] == 'recent') { $pagetype = "special"; /* Special page */ } else if ($_REQUEST['do'] == 'backlink') { $pagetype = "special"; /* Special page */ }
I didn't want discussion, old revisions and edit/show pagesource to be visible for “ALL” in specialpages - so I modified the code to make it visible to admin only.
I modified the part after else if ($pagetype == "special"):
/************** code not changed *********************/ else if ($pagetype == "special") { $monobook['nsclass'] = 'mediawiki ns-1 ltr'; /* Special page */ $monobook['content_actions']['nstab-main']['class'] = "selected"; if ($ACT != "search") { $monobook['content_actions']['nstab-main']['href'] = DOKU_BASE.DOKU_SCRIPT."?id=".$ID; } else { $monobook['content_actions']['nstab-main']['href'] = "#"; } $monobook['content_actions']['nstab-main']['text'] = $lang['monobook_specialpage']; $monobook['content_actions']['nstab-main']['accesskey'] = 'v'; /*************************************************/ /************ now the changed code ***************/ /************** only visible to admin *********************/ if($conf['useacl']) { if ($_SERVER['REMOTE_USER']) { if ($INFO['perm'] == AUTH_ADMIN) { /* Now the edit button... ************ I don't need it for "ALL" on Special page */ if ($ACT == "edit") $monobook['content_actions']['edit']['class'] = "selected"; $monobook['content_actions']['edit']['href'] = DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=edit&rev=".$_REQUEST['rev']; $monobook['content_actions']['edit']['accesskey']='e'; if($INFO['writable']) { if($INFO['exists']) { $monobook['content_actions']['edit']['text'] = $lang['btn_edit']; $monobook['content_actions']['edit']['accesskey']='e'; } else { $monobook['content_actions']['edit']['text'] = $lang['btn_create']; $monobook['content_actions']['edit']['accesskey']='e'; } } else { $monobook['content_actions']['edit']['text'] = $lang['btn_source']; $monobook['content_actions']['edit']['accesskey']='e'; } /************** even Revisions visible only to admin on Special page *********************/ if ($ACT == "revisions") $monobook['content_actions']['history']['class'] = "selected"; $monobook['content_actions']['history']['href'] = DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=revisions"; $monobook['content_actions']['history']['text'] = $lang['btn_revs']; $monobook['content_actions']['history']['accesskey'] = 'o'; } } } } /************** Revisions visible for "ALL" on normal page (article) *********************/ if ($pagetype == "article") { if ($ACT == "revisions") $monobook['content_actions']['history']['class'] = "selected"; $monobook['content_actions']['history']['href'] = DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=revisions"; $monobook['content_actions']['history']['text'] = $lang['btn_revs']; $monobook['content_actions']['history']['accesskey'] = 'o'; } /************** subscription on changes only on normal page (article) *********************/ if ($pagetype == "article") { if($conf['useacl']) { if ($_SERVER['REMOTE_USER']) { if ($conf['subscribers']) { if (!$INFO['subscribed']) { $monobook['content_actions']['watch']['href'] = DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=subscribe"; //Etienne //$monobook['content_actions']['watch']['text'] = "Watch"; $monobook['content_actions']['watch']['text'] = $lang['btn_subscribe']; } else { $monobook['content_actions']['watch']['href'] = DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=unsubscribe"; //Etienne //$monobook['content_actions']['watch']['text'] = "Unwatch"; $monobook['content_actions']['watch']['text'] = $lang['btn_unsubscribe']; } } } } } /************** end of changes *********************/ /* Determine what will be listed on personal tools */
I did it with try and error - so this code may not be optimal (but it works - compare for example Recent Changes on Heine-Wiki and "Navigation" from this page as “special pages”)
— Wolfgang - 2007/09/14
Use better wl() and ml() to create the links, to support the [userewrite] option.
Example: wl($ID, array('rev'⇒$_REQUEST['rev'], 'mbdo'⇒'cite']))
Spamers are searching sites for spamable content, “doku.php” shows such a spamable environment. So its better to hide “doku.php” completely.
<?php /** Determine the look of the page based on the current context * for Monobook for DokuWiki * By Terence J. Grant * tjgrant [at] tatewake [dot] com * License: GPL v2 */ $pagetype = "article"; /* Normal page */ $monobook['nsclass'] = 'mediawiki ns-0 ltr'; /* Normal page */ $monobook['discussion-location'] = tpl_getConf('mb_discussion_location'); if (beginsWith($monobook['discussion-location'], ':')) /* Strip leading colon */ $monobook['discussion-location'] = substr($monobook['discussion-location'], 1); if (beginsWith($ID, "wiki:")) { if (!beginsWith($ID, $monobook['discussion-location'])) { if (!beginsWith($ID, "wiki:user:")) { $pagetype = "special"; /* Special page */ } } } if ($ACT == "search") { $pagetype = "special"; /* Special page */ } if ($_REQUEST['mbdo'] == 'cite') { $pagetype = "special"; /* Special page */ } else if ($_REQUEST['mbdo'] == 'detail') { $pagetype = "special"; /* Special page */ } else if ($_REQUEST['mbdo'] == 'media') { $pagetype = "special"; /* Special page */ } if ($pagetype == "article") { if (!beginsWith($ID, $monobook['discussion-location'])) { $monobook['content_actions']['nstab-main']['class'] = "selected"; $monobook['content_actions']['nstab-main']['wiki'] = ':'.$ID; $monobook['content_actions']['nstab-main']['text'] = $lang['monobook_article']; $monobook['content_actions']['nstab-main']['accesskey'] = 'v'; if (tpl_getConf('mb_use_discussion')) { $monobook['content_actions']['talk']['wiki'] = ':'.$monobook['discussion-location'].':'.$ID; //Etienne : Discussion, not found in the lang.php files //$monobook['content_actions']['talk']['text'] = "Discussion"; $monobook['content_actions']['talk']['text'] = $lang['monobook_discussion']; } } else { $monobook['nsclass'] = 'mediawiki ns-1 ltr'; /* Special page */ $monobook['content_actions']['nstab-main']['wiki'] = ':'.substr($ID,strlen($monobook['discussion-location'])); $monobook['content_actions']['nstab-main']['text'] = $lang['monobook_article']; $monobook['content_actions']['nstab-main']['accesskey'] = 'v'; if (tpl_getConf('mb_use_discussion')) { $monobook['content_actions']['talk']['class'] = "selected"; $monobook['content_actions']['talk']['wiki'] = ':'.$ID; //Etienne : Discussion, not found in the lang.php files //$monobook['content_actions']['talk']['text'] = "Discussion"; $monobook['content_actions']['talk']['text'] = $lang['monobook_discussion']; } } if (beginsWith($ID,"wiki:user:")) { $monobook['nsclass'] = 'mediawiki ns-1 ltr'; /* Special page */ $monobook['content_actions']['nstab-main']['text'] = $lang['monobook_userpage']; $monobook['content_actions']['nstab-main']['accesskey'] = 'v'; } /* Now the edit button... */ if ($ACT == "edit") $monobook['content_actions']['edit']['class'] = "selected"; $monobook['content_actions']['edit']['href'] = wl($ID, array('do'=>'edit', 'rev'=>$_REQUEST['rev'])); //DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=edit&rev=".$_REQUEST['rev']; $monobook['content_actions']['edit']['accesskey']='e'; if($INFO['writable']) { if($INFO['draft']) { $monobook['content_actions']['edit']['href'] = wl($ID, array('do'=>'draft', 'rev'=>$_REQUEST['rev'])); //DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=draft&rev=".$_REQUEST['rev']; $monobook['content_actions']['edit']['text'] = $lang['btn_draft']; } else { if($INFO['exists']) { $monobook['content_actions']['edit']['text'] = $lang['btn_edit']; } else { $monobook['content_actions']['edit']['text'] = $lang['btn_create']; } } } else { $monobook['content_actions']['edit']['text'] = $lang['btn_source']; $monobook['content_actions']['edit']['accesskey']='e'; } } else if ($pagetype == "special") { $monobook['nsclass'] = 'mediawiki ns-1 ltr'; /* Special page */ $monobook['content_actions']['nstab-main']['class'] = "selected"; if ($ACT != "search") { $monobook['content_actions']['nstab-main']['href'] = wl($ID); //DOKU_BASE.DOKU_SCRIPT."?id=".$ID; } else { $monobook['content_actions']['nstab-main']['href'] = "#"; } $monobook['content_actions']['nstab-main']['text'] = $lang['monobook_specialpage']; $monobook['content_actions']['nstab-main']['accesskey'] = 'v'; /* Now the edit button... */ if ($ACT == "edit") $monobook['content_actions']['edit']['class'] = "selected"; $monobook['content_actions']['edit']['href'] = wl($ID, array('do'=>'edit', 'rev'=>$_REQUEST['rev'])); //DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=edit&rev=".$_REQUEST['rev']; $monobook['content_actions']['edit']['accesskey']='e'; if($INFO['writable']) { if($INFO['exists']) { $monobook['content_actions']['edit']['text'] = $lang['btn_edit']; $monobook['content_actions']['edit']['accesskey']='e'; } else { $monobook['content_actions']['edit']['text'] = $lang['btn_create']; $monobook['content_actions']['edit']['accesskey']='e'; } } else { $monobook['content_actions']['edit']['text'] = $lang['btn_source']; $monobook['content_actions']['edit']['accesskey']='e'; } } if ($ACT == "revisions") $monobook['content_actions']['history']['class'] = "selected"; $monobook['content_actions']['history']['href'] = wl($ID, array('do'=>'revisions')); //DOKU_BASE.DOKU_SCRIPT."?id=".$ID."&do=revisions"; $monobook['content_actions']['history']['text'] = $lang['btn_revs']; $monobook['content_actions']['history']['accesskey'] = 'o'; if($conf['useacl']) { if ($_SERVER['REMOTE_USER']) { if ($conf['subscribers']) { if (!$INFO['subscribed']) { $monobook['content_actions']['watch']