DokuWiki

It's better when it's simple

User Tools

Site Tools


template:dokubook

DokuBook Template

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes

template Takes the MediaWiki look as starting point but doesn't try to copy the look and feel of MediaWiki

Last updated on
2016-09-16
Repository
Source

Tagged with mediawiki, sidebar

The Idea

The goal of this template is not to completely copy the look and feel of MediaWiki. If you're looking for a MediaWiki style DokuWiki template, have a look at the Monobook template. It provides some extra functionality not found in this one. This template merely uses the MediaWiki look as a starting point and doesn't include/add extra functionality like discussion and so forth.

Features

  • custom navigation per namespace build from a normal wikipage
  • custom footer per namespace build from a normal wikipage

Downloads

changes

previous Downloads

Installation

The template can be installed automatically using the extension manager.

Alternatives

tarballs

  1. download the tarball/zip-file
  2. unpack it into <dokuwiki>/lib/tpl/
  3. login as admin and change the template in the configuration manager

using git:

% cd <dokuwiki>/lib/tpl/
% git clone git://github.com/samfisch/dokuwiki-template-dokubook.git dokubook

Debian install (or probably any other distribution):

# cd /usr/share/dokuwiki/lib/tpl/
# wget http://r.notomorrow.de/dokuwiki-template-dokubook/pkg/dokubook.tgz
# tar -xvzf template-dokubook.tgz
# chown -Rv 33 dokubook/

For openSUSE change owner and group als follows:

# chown -Rv wwwrun dokubook/
# chgrp -Rv www dokubook/

Configuration

You can change the following settings via the DokuWiki “Configuration Settings” Dialog.

Option Value(s)
Pagename Name of wikipages which should be treated as “navigation/footer”.
Closed Wiki If you activate this option the navigation will only show up to logged in users.
Sidebar position Determines the position of the sidebar (left/right)
Logo Instead of using a logo file in the templates images/ folder you can also configure a logo path

First Steps

Creating the Navigation

The template looks for a wiki page called navigation, or whatever you've defined in the configuration, in the current namespace to include it as the sidebar. If this file doesn't exist it looks in the upper namespace and so forth. If it can't find a proper file the sidebar will show the index instead.

Example navigation:

  * [[link1]]
  * [[link2]]
  * [[link3]]

Of course you could also use any of the many existing navigation plugins.

Like with the navigation the template also includes a wiki page called footer, or whatever you've defined in the configuration, as the footer.

The template looks for a file called logo.[jpg|jpeg|png] in <dokuwiki>/lib/tpl/dokubook/images/. If this file exists it will be shown as your logo. The dimension should be at 128×128. If the file doesn't exist the DokuWiki logo will be displayed instead.

Browser Compatibility

The template was tested with the following Browsers.

If you've seen it working with other browsers feel free to add them to the list :-)!

  • Firefox (Win 2.0.0.9, Linux 2.0, Mac OS X 2.0.0.1)
  • Opera (Win / Linux 8.5, 9.01, 9.24, 10.53)
  • IE (Win 6.0, 7.0)
  • AvantBrowser (Win / IE 6.0)
  • Konqueror (Linux 3.5.1)
  • Safari (Mac OS X 2.04)
  • Shiira 2.2 (MAC OS X 10.4.10)
  • Safari 3 Beta2 (MAC OS X 10.4.10)
  • Safari 3.2.1 (MAC OS X 10.5.5)
  • Camino 1.5.4 (Mac OS X 10.4.11)
  • SeaMonkey 1.1.9 (Windows Vista SP1)
  • Google Chrome 0.2.149.27 (XP sp2)
  • Firefox (Ubuntu/8.04 hardy 3.0.3)

Sites using this Template

FAQ

Can I hide the labels of the navigation boxes?

The IMHO cleanest solution for, instead of removing them from the tpl_fuctions.php file is hiding them via CSS, that's what CSS is good for namely modifying the appearance without the need to modify the content itself. Adding the following to your <dokuwiki>/conf/userstyle.css (if it doesn't exist, create it) should solve your issue ;-).

div.dokuwiki span.sb_label { display: none; }

Is it possible to make the sidebar/navigationbar a bit wider?

When I have multiple subfolders in there, the text is overlapping the main page.

Change dokubook_design.css

/* presume sidebar is left */
div.dokuwiki div#sidebar_left { width: 160px; }
/* change the 160px to the required width */
div.dokuwiki div#dokubook_container_left { left: 170px;}
/* change the 170px to the required width + 10 */

Is there any way for the Search function to show at the top of the sidebar rather than after the Navigation / Index area?

Edit the tpl_functions.php file located inside the template directory - search for:

// generate the searchbox

And move this line including the 4 following lines above:

// main navigation

Is there a way to change the font in your template to the default one's?

Edit <dokuwiki>/conf/userstyle.css:

body {
  font-family: <yourfont>;
}

Discussion

Q: I use your template in combination with the translation plugin. Because I didn't define navigation files so far, the language namespaces appear in the navigation window. Now, I tried to define navigation files to prevent the display of language namespaces but I did not succeed to display such nice collapsible contents like in the default case without navigation file. — Rolf Fankhauser 2009/08/11

Checkout one of the many available index plugins. — chi 2010/01/08 10:17

Q: Could you please move the logo configuration to dokuwiki_design.css ? In the present scheme, it cannot be changed in a farm, where modifications can be done in userstyle.css . — Thadeu Penna 2010/03/15 20:21

Why shouldn't this be possible? Can you elaborate a bit? — chi 2010/03/16 10:39
The personal logo is a file placed in /lib/tpl/dokubook/images, as coded in tpl_functions.php. So, if you have a farm, it is not possible to have personal logos for each animal, as my users asked me. I did a small hack, where the file is to be put in media directory. IMHO ,the right solution would be having the logo as a configuration option rather than being hardcoded. An intermediate solution would be placing the logo file configuration into dokuwiki_design.css, that can be customized in each animal. — Thadeu Penna 2010/03/17 13:42
Hmmm, I see, could you please open a feature request at the bug tracker linked on this page? Thank you!
Hello, how do I install the wiki on the web. Some more detailed description, please. (J. Bezak)

Q: Is there a way using the keyboard for selecting “search suggestions”? For example: if you type “syntax” into the search field, a list of pagenames pops up. But you need to click on it using your mouse. It would be great, if you could use your keyboard using your cursers and hit enter. THANKS! — p-z 2010/04/20 11:19

Q: Greetings - When DokuBook is installed, it looks by default at the namespaces and create a neat menu on the left, with small arrows in front of the main sections. When one click on the arrows, it expands and looks great. If I create a page called “nagivation”, I loose the feature with the arrows. What's the trick to personalize the navigation file, AND to keep the arrows to expand the menu ? Thanks ! — simon templar 2012/04/24 18:01

Q: Hi - How can you add a Print Preview Link to the Toolbox Side Bar ?
I got only as far as the tpl_functions file and tpl_actionlink (??????);
Many Thanks if anyone can help on this

OK - I have a basic Printable Link by adding the following code into the dokuwiki\lib\tpl\dokubook\tpl_functions.php file. Below the section for Toolbox. It does not have an icon or link to the lang files, but I am sure someone can figure that out.

 // generate the print view
  print '<span class="sb_label">' . $lang['print_view'] . '</span>' . DOKU_LF;
  print '<div id="toolbox" class="sidebar_box">' . DOKU_LF;
  tpl_link(exportlink($ID, 'html'),'Printable Version');
  print '</div>' . DOKU_LF;

Q: Hi - I would like to set a max-width-size of 1024px and have everything centered. Is there an easy way?

/* -------------- general elements --------------- */

* { padding: 0; margin-left:auto; margin-right:auto; max-width: 1024px;}

makes it centered. But now the sidebar is on the far left :'(

Maintainer

2011-05-16: A new maintainer for this template is needed. Have a look at the following if you are interested: 1, 2.

I created a new download for the angua rc and will keep updating this template — sf 2011/12/23 06:38

2012-09-25: This template is incompatible with adora belle because of the sidebar function declared in the theme.

When will this nice template be updated to “Adora Belle” ?

2013-09-24: I can confirm that this template works as expected in the WeatherWax 2013-05-10a DokuWiki release. Can another one confirm this and add “2013-05-10” at the beginning of this page (“compatible” line)?

Feature: Plugin Tabs

2012-02-03: hi, I am setting the dw2pdf, I found that there is a way to add tab for Monobook but it can not work on Dokubook. Is there a way to add a tab on Monobook to export a pdf file??

I've added the following code between line 116 and 117 in main.php: manuel [dot] bitzi [at] gmail [dot] com
<li><a href="<?php echo exportlink($ID, 'pdf')?>" class="action"><img src="<?php echo DOKU_BASE?>lib/images/fileicons/pdf.png" alt="PDF Export" align="abstop" height="15" />Export PDF</a></li>

QUESTION: 08.05.2013: Is this still working?

I changed it to this and it doesn’t change anything:

div.dokuwiki div#dokubook_container_left {
  padding-bottom: 0.8em;
  position: absolute;
  left: 200px;
  right: 10px;
}
  /* Originalwert left: 170px; */
 
 
  div.dokuwiki div#sidebar_left {
  position: absolute;
  top: 0;
  left: 0;
  width: 190px;
}
/* Originalwert width: 160px; */

ANSWER: 26.05.2013: Is this still working? Yes, it works, but you must go to admin panel and click save :D

Can´t change "Closed Wiki" Button

Im Using HRUN, and activated the closed wiki button in the Dokuwiki Admin menu. A few days later i wanted to change it back, but every time i unchecked the button and hit save, the button was still activated.

Even changing closedwiki to false directly in /lib/tpl/dokubook/conf/default.php didnt work. My solution was uncommenting the line, and then it worked

//$conf['closedwiki']  = false;           // set to true if you run a closed wiki 
There was a change since Binky which made Boolean config options stricter. I.e. false or true are not allowed anymore, you need to use 0 and 1 instead. So, the real fix is to change the template's conf/default.php to:
$conf['closedwiki']  = 0;
$conf['logo']        = 0;

See also this fix in a different template. — Anika Henke 2015-04-21 02:28

Layout broken with Dokubook + Flusterick Manners + IE

I'm using Dokubook with DW-Flusterick Manners and IE, a combination which doesn't seem to work well. Other browsers renders the pages fine, but IE (which unfortunately is my only choice), doesn't work well, some pages are just rendered bit ugly, other (like when trying ot use latest version of ckgedit) are rendered completely unuseable.

Is this template still being maintained or is it time to switch to another template?

template/dokubook.txt · Last modified: 2023-10-31 00:28 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki