This is an old revision of the document!


Dokuwiki Templates

This page describes how to customize DokuWiki through templates.

This website is based on Arctic-mbo, based on Arctic template.

Template Artic-mbo

This section discribes how to deploy in the simpliest way the template of this website.
Arctic-mbo is a customization of Arctic which add the left sidebar to Dokuwiki.

The page about Artic-mbo on the official Dokuwiki wesite : http://www.dokuwiki.org/template:arctic-mbo
Original Arctic template is available here : http://www.dokuwiki.org/template:arctic

You can download Arctic-mbo here : arctic-mbo_2011-01-09.tgz

Changelog

  • 2011-01-09 : translation of the sitebar and removing dependence with the translation plugin
  • 2011-01-06 : first version

Installation

To install Arctic-mbo, unzip the archive to lib/tpl :

:/opt/dokuwiki/lib/tpl# tar -zxvf /root/arctic-mbo_2011-01-06.tgz
arctic-mbo/
arctic-mbo/COPYING
arctic-mbo/Makefile
arctic-mbo/README
arctic-mbo/VERSION
arctic-mbo/_admin.css
arctic-mbo/_linkwiz.css
....

Install the translation plugin if you want to translate page (this template can work without)?

Configuration

To enable the template, you just need to select it in the list in “Admin » Config Manager”

Once activated, new spefict parameters appear at the end of the configuration manager, select the following options :

  • youarehere on
  • tpl»arctic»left_sidebar_content : add “index” and “extra” (you don't need to check extra if you don't use translation)
  • tpl»arctic»left_sidebar_order : extra,main,namespace,user,group,index

Other parameters are defined here : options

Patches

:/opt/dokuwiki/inc# patch -p 1 < /root/youarehere_2010-11-07.patch
patching file template.php
:/opt/dokuwiki/inc#
:/opt/dokuwiki/lib/plugins/translation# patch -p 1 < /root/translation_2010-12-10_arctic.patch
patching file style.css
:/opt/dokuwiki/lib/plugins/translation#
  • finally, if you installed the tag plugin, make sure you applied the patch given here : tag & pagelist

Template Arctic

This section describes how to install the original template Arctic and how to modify it manually.

Installation

Download arctic from here : http://www.dokuwiki.org/template:arctic
Templates need to be installed in lib/tpl :

:/opt/dokuwiki/lib/tpl# wget http://cloud.github.com/downloads/chimeric/dokuwiki-template-arctic/template-arctic.tgz
--2011-01-05 23:59:07--  http://cloud.github.com/downloads/chimeric/dokuwiki-template-arctic/template-arctic.tgz
Résolution de cloud.github.com... 216.137.59.72, 216.137.59.160, 216.137.59.232, ...
Connexion vers cloud.github.com|216.137.59.72|:80...connecté.
requête HTTP transmise, en attente de la réponse...200 OK
Longueur: 54514 (53K) [application/octet-stream]
Sauvegarde en : «template-arctic.tgz»

100%[======================================>] 54 514      --.-K/s   ds 0,02s

2011-01-05 23:59:09 (2,85 MB/s) - «template-arctic.tgz» sauvegardé [54514/54514]

z4:/opt/dokuwiki/lib/tpl# tar -zxvf template-arctic.tgz
arctic/
arctic/COPYING
arctic/Makefile
arctic/README
...

To activate the template, select it in the list in “Admin » Config Manager”

Configuration

Once activated, new spefict parameters appear at the end of the configuration manager.

Select the following options :

  • tpl»arctic»left_sidebar_content : add “index”

Add translation to Arctic

This webiste use translation plugin to translate pages.

To add the translation options in the left sidebar, create the file lib/tpl/arctic/left_sidebar.html with the following content :

<?php
$translation = &plugin_load('helper','translation');
if ($translation) echo $translation->showTranslations();
?>

Then add “extra” inside tpl»arctic»left_sidebar_content.
To put translation at the top of the sidebar, change tpl»arctic»left_sidebar_order to extra,main,namespace,user,group,index

Finally, here is a patch to adapt the translation style to the sidebar : translation_2010-12-10_arctic.patch

:/opt/dokuwiki/lib/plugins/translation# patch -p 1 < /root/translation_2010-12-10_arctic.patch
patching file style.css
:/opt/dokuwiki/lib/plugins/translation#

Customization

To get the look & feel of this website, you also need to add the following changes :

:/opt/dokuwiki/lib/tpl/arctic# patch -p 1 < /root/arctic_2011-01-06.patch
patching file arctic_design.css
patching file arctic_layout.css
patching file layout.css
patching file main.php
patching file style.ini
:/opt/dokuwiki/lib/tpl/arctic#
:/opt/dokuwiki/lib/tpl/arctic# patch -p 1 < /root/arctic-tpl_functions_2011-01-09.patch
patching file tpl_functions.php
:/opt/dokuwiki/lib/tpl/arctic# cd ..
:/opt/dokuwiki/inc# patch -p 1 < /root/youarehere_2010-11-07.patch
patching file template.php
:/opt/dokuwiki/inc#

Some other parameters are defined here : Options

en/linux/dokuwiki/templates.1294577204.txt.gz · Last modified: 2011/01/09 13:46 by matthieu
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki