Drupal Garland Theme adapted for DokuWiki (in blue), internals based on the sidebar_theme.
Compatible with DokuWiki
Plugin name contains underscore, will not generate popularity points.
I adapted sidebar_theme and styled it like the Drupal Garland Theme and with blue color.
This theme shows the content of the following special named pages at the left, right and top:
top_navigation (displayed at the top)default_sidebar_left (displayed at left)default_sidebar_right (displayed at right)<page>_sidebar_left (displayed only for <page> at left instead of the default_sidebar_left)<page>_sidebar_right (displayed only for <page> at right instead of the default_sidebar_right)<namespace>_sidebar_left (displayed for all pages of <namespace> at left, if no page with the same name exists)<namespace>_sidebar_right (displayed for all pages of <namespace> at right, if no page with the same name exists)
In top_navigation you should use a bullet list of links, to create the navigation. You could create page specific top navigations too, if you adapt the tpl_functions.php a little bit.
All credits for the design go to Drupal.
You can download the theme here (both always latest version from svn):
As root you can execute the following to install it (adapt the path):
cd /var/www/dokuwiki/lib/tpl && wget -O- http://mirko.windhoff.net/drupal-garland-blue.tar.gz | tar -xzvf -
For details refer to template on how to install and use templates in DokuWiki.
Alternatively you can obtain it through subversion:
cd /var/www/dokuwiki/lib/tpl/ svn checkout http://garlanddokuwiki.googlecode.com/svn/trunk/drupal-garland-blue drupal-garland-blue
If you want to contribute/improve the theme, I can add you to the member list at Google Code.
Recent Changes: http://code.google.com/p/garlanddokuwiki/source/list
Add your site here, if you want:
Feel free to leave comments here.
../default/_mediamanager.css = screen
top_navigation and default_sidebar_left pages with some dummy links.conf/default.php you use the short <? tag instead of the full <?php tag. some strict settings don't like that.<? issue mentioned above, and two comments in main.php that used the <? … ?> syntax. I replaced them with <!– <div class=“pagename”><php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true))></div> –> and <!– /* Remove this invisible link if it bothers you. */ –> and now everything is working fine. This in on a Windows/IIS machine using FastCGI in case that matters tpl_functions.php, function tpl_sidebar should save and restore the global $TOC var. The following code works for me/** * fetches the sidebar-pages and displays the sidebar */ function tpl_sidebar($side='left') { global $ID, $REV, $TOC, $INFO, $lang; $svID = $ID; $svREV = $REV; $svTOC = $TOC; $page_sidebar_name = $ID.'_'.tpl_getConf('sidebar_pagename').'_'.$side; $namespace_sidebar_name = $INFO['namespace'].'_'.tpl_getConf('sidebar_pagename').'_'.$side; $default_sidebar_name = tpl_getConf('default_'.$side.'sidebar_name'); if (file_exists(wikiFN($page_sidebar_name))) echo '<div class="'.$side.'bar">'.p_sidebar_xhtml($page_sidebar_name).'</div>'; elseif (file_exists(wikiFN($namespace_sidebar_name))) echo '<div class="'.$side.'bar">'.p_sidebar_xhtml($namespace_sidebar_name).'</div>'; elseif (file_exists(wikiFN($default_sidebar_name))) echo '<div class="'.$side.'bar">'.p_sidebar_xhtml($default_sidebar_name).'</div>'; else echo ' '; $ID = $svID; $REV = $svREV; $TOC = $svTOC; }
— schplurtz
schplurtz
France, Finistère 2011/02/07 13:46
<code> or <file> that “overflow” the main page. The result is not very nice. Here is a capture from http://windhoff.net/wiki/playground/playground?&#long_code_overflow
. Can you help fix this?
I put a logo instead of a text into the title of the wiki.
for this example: upload your logo to the media root as logo.gif and
put this code into the inputbox of the admin-configuration - Basic Settings - title - Wiki title
<span><div style="position:absolute; top:3px; left:0px; margin: 0px; padding: 10px; background-color: #ffffff;"><IMG src="http://domain.com/lib/exe/fetch.php?media=logo.gif" height=60> </div></span>
i rewrote the sidebar and header/top function.
now you can place the sidebar-files out of the root e.g. to :wiki:navi
all sidebar-files will be placed there now.
also is it possible to create a sidebar for the next sublevels too. it will search the deepest match of a sidebar using namespace and pagename.
sidebar and header are handelt identically now.
it will look if the users rights are good for reading.
— oh-markoh-mark
2011/06/24
p_sidebar_xhtml('top_navigation') with tpl_sidebar('top') (line ~39) <?php // echo p_sidebar_xhtml('top_navigation')?>
<?php echo tpl_sidebar('top')?>
<?php $meta['sidebar_namespace'] = array('string'); /** added by mark **/ $meta['sidebar_pagename'] = array('string'); $meta['no_creation_message'] = array('onoff'); /** added by mark **/ ?>
<?php $conf['sidebar_namespace'] = 'wiki:navi'; /** added by mark **/ $conf['sidebar_pagename'] = 'sidebar'; $conf['no_creation_message'] = false; /** added by mark **/ ?>
modify the file tpl_functions.php (line ~15-37)
/** * fetches the sidebar-pages and displays the sidebar * * mod by Mark */ function tpl_sidebar($side='left') { global $ID, $REV, $INFO, $lang, $TOC; $svID = $ID; $svREV = $REV; $svTOC = $TOC; $sidebar_namespace = preg_replace('/\:+/', ':', preg_replace(array('/:/','/\//','/\\\/'), ':', ':'.tpl_getConf('sidebar_namespace').':' )); /** added by mark **/ $i=count(explode(":", $ID)); for($i; $i>0; $i--){ $namespaces=explode(":", $ID,$i); $ns=''; foreach($namespaces as $n){ $ns.=(!$ns=='') ? '_'.$n : $n; // echo auth_quickaclcheck(str_replace('_',':',$ns)); if(auth_quickaclcheck(str_replace('_',':',$ns)) >= AUTH_READ) { $ID=$svID; /** clean id **/ $nsp=$ns.'_'.tpl_getConf('sidebar_pagename').'_'.$side; if (page_exists($sidebar_namespace.$nsp)) $namespace_sidebar_name=$sidebar_namespace.$nsp; } } $i=($namespace_sidebar_name)?'-1':$i; /* if deepest sidebar found exit */ } /** if no special sidebar found define default **/ if (!$namespace_sidebar_name) $namespace_sidebar_name = $sidebar_namespace.tpl_getConf('sidebar_pagename').'_'.$side ; /** mod by mark **/ if (page_exists($namespace_sidebar_name)) { echo '<div class="'.$side.'bar">'.p_sidebar_xhtml($namespace_sidebar_name).'</div>'; } else { echo '<div class="'.$side.'bar">'; if (tpl_getConf('no_creation_message')) echo '<b>no page defined!</b> click to create one or deactivete this message in the admin config'.p_sidebar_xhtml($namespace_sidebar_name).'</div>'; /* print nothing if not defined */ echo ' '; } $ID = $svID; $REV = $svREV; $TOC = $svTOC; /** fix from schplurtz 2011/02/07 13:46 **/ }