====== Drupal Garland Blue Template for Dokuwiki ====== ---- template ---- description : Drupal Garland Theme adapted for DokuWiki (in blue), internals based on the sidebar_theme author : email : lastupdate : 2010-10-22 compatible : 2011-05-25; 2010-11-07; 2009-12-25c; depends : conflicts : similar : tags : Drupal, Blue bugtracker : https://code.google.com/p/garlanddokuwiki/issues/list sourcerepo : https://code.google.com/p/garlanddokuwiki/source/browse/trunk/drupal-garland-blue ---- I adapted [[template:sidebar_theme]] and styled it like the [[http://drupal.org/node/91964|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) * ''////_sidebar_left'' (displayed only for //// at left instead of the ''default_sidebar_left'') * ''////_sidebar_right'' (displayed only for //// at right instead of the ''default_sidebar_right'') * ''////_sidebar_left'' (displayed for all pages of //// at left, if no page with the same name exists) * ''////_sidebar_right'' (displayed for all pages of //// 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. ===== Download and Install ====== 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 =====Development===== Recent Changes: http://code.google.com/p/garlanddokuwiki/source/list ===== Sites using this Template ===== Add your site here, if you want: * [[http://tinymelinux.com/]] ===== Comments? ===== Feel free to leave comments here. * --- [[user>jgeluk]] //2012/06/20 16:45//\\ Great template! I added some code to tpl_sidebar() that checks the parent namespaces as well for _sidebar_left pages:\\ /** * fetches the sidebar-pages and displays the sidebar */ function tpl_sidebar($side='left') { global $ID, $REV, $INFO, $lang; $svID = $ID; $svREV = $REV; $page_sidebar_name = $ID.'_'.tpl_getConf('sidebar_pagename').'_'.$side; $default_sidebar_name = tpl_getConf('default_'.$side.'sidebar_name'); foreach (array_reverse(explode(':', getNS($ID))) as $namespace) { $namespace_sidebar_name = $namespace.'_'.tpl_getConf('sidebar_pagename').'_'.$side; if (file_exists(wikiFN($namespace_sidebar_name))) { break; } } if (file_exists(wikiFN($page_sidebar_name))) echo '
'.p_sidebar_xhtml($page_sidebar_name).'
'; elseif (file_exists(wikiFN($namespace_sidebar_name))) echo '
'.p_sidebar_xhtml($namespace_sidebar_name).'
'; elseif (file_exists(wikiFN($default_sidebar_name))) echo '
'.p_sidebar_xhtml($default_sidebar_name).'
'; else echo ' '; $ID = $svID; $REV = $svREV; }
* Mar 22 2012 Apart from the entry below, there are further modifications necessary in .../tpl/drupal-garland-theme/style.ini :../default/_fileuploader.css = screen ../default/_tabs.css = screen * Dec 29 2011 [[m.mccarn@aicr.org]]\\ I had to add the following line to .../tpl/drupal-garland-theme/style.ini to support the new full-screen uploader: ../default/_mediamanager.css = screen * Many thanks - I love it. Gerard. * Beautiful! Thanks! - Joe * Great template. - Kai ... and for other newbies like me: To get top- left- and right-navigation create pages with bullet lists in the root of your namespace named //top_navigation / default_sidebar_left / default_sidebar_right// =) * Wonderful! GRH * Good template! * Very nice template: Two suggestion: * Include some default ''top_navigation'' and ''default_sidebar_left'' pages with some dummy links. * In some places of your code, e.g. in ''conf/default.php'' you use the short '''' syntax. I replaced them with '''' and '''' and now everything is working fine. This in on a Windows/IIS machine using FastCGI in case that matters ;-) * Thank you for reporting the " /** * 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 '
'.p_sidebar_xhtml($page_sidebar_name).'
'; elseif (file_exists(wikiFN($namespace_sidebar_name))) echo '
'.p_sidebar_xhtml($namespace_sidebar_name).'
'; elseif (file_exists(wikiFN($default_sidebar_name))) echo '
'.p_sidebar_xhtml($default_sidebar_name).'
'; else echo ' '; $ID = $svID; $REV = $svREV; $TOC = $svTOC; } --- [[user>schplurtz]] //2011/02/07 13:46// * Very great template ! thank you.\\ I encountered a problem with long ''%%%%'' or ''%%%%'' 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]] {{ http://img201.imageshack.us/img201/29/captureit.png?70x70}}. Can you help fix this? \\ --- [[user>chtiland]] //2011-04-22// * **@schplurtz** : Try to use plugin [[plugin:jquery-syntax|jquery-syntax]], this solve this problem for me ;-) * seems to be a nice tip, have to try it --- [[user>mw0|Mirko]] //2011/06/06 23:25// == LOGO == 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 \\ * --- [[user>oh-mark|oh-mark]] //2011/06/07 07:56//
== new code for sidebar and header == 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. --- [[user>oh-mark|oh-mark]] //2011/06/24 // * replace in the main.php ''p_sidebar_xhtml('top_navigation')'' with ''tpl_sidebar('top')'' (line ~39) * replace conf/metadata.php * replace conf/default.php 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 '
'.p_sidebar_xhtml($namespace_sidebar_name).'
'; } else { echo '
'; if (tpl_getConf('no_creation_message')) echo 'no page defined! click to create one or deactivete this message in the admin config'.p_sidebar_xhtml($namespace_sidebar_name).'
'; /* print nothing if not defined */ echo ' '; } $ID = $svID; $REV = $svREV; $TOC = $svTOC; /** fix from schplurtz 2011/02/07 13:46 **/ }
== Dokuwiki 2013-12-08 == The TOC in sidebar has been broken on mine since Dokuwiki 2012-01-25 even with these changes. Oh well. This new version breaks this theme. Need to create the template.info.txt file. I put the following in it: base drupal-garland-blue author email date 2010-10-22 name Drupal Garland Blue desc Drupal Garland Blue Theme for Dokuwiki