DokuWiki

It's better when it's simple

User Tools

Site Tools


template:drupal_garland_blue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
template:drupal_garland_blue [2011-06-18 15:51] – changed external links to dokuwiki.org to internal links achtemplate:drupal_garland_blue [2023-03-22 23:07] (current) 89.217.221.175
Line 2: Line 2:
  
 ---- template ---- ---- template ----
-Author_mail   example@example.org Mirko Windhoff +description   : Drupal Garland Theme adapted for DokuWiki (in blue), internals based on the sidebar_theme 
-Description:    Drupal Garland Theme adapted for DokuWiki (in blue), internals based on the sidebar_theme. +author        :  
-LastUpdate_dt 2010-10-22 +email         :  
-Compatible    2011-05-25; 2010-11-07; 2009-12-25c; hopefully also 2005-09-22 and above +lastupdate    : 2010-10-22 
-Template_tags Drupal, Garland, Blue # comma separated tags +compatible    : 2011-05-25; 2010-11-07; 2009-12-25c;  
-Screenshot_imghttp://mirko.windhoff.net/drupal-garland-blue-screenshot.png+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
 ---- ----
  
-[[http://ko.k.vu/testwiki/|{{ http://mirko.windhoff.net/drupal-garland-blue-screenshot.png?600|}}]] 
 I adapted [[template:sidebar_theme]] and styled it like the [[http://drupal.org/node/91964|Drupal Garland Theme]] and with blue color. I adapted [[template:sidebar_theme]] and styled it like the [[http://drupal.org/node/91964|Drupal Garland Theme]] and with blue color.
  
Line 24: Line 29:
 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. 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. 
- 
-:-D [[http://mirko.windhoff.net/drupal-garland-for-dokuwiki|New color configurator for this theme available (beta)]] 
 ===== Download and Install ====== ===== Download and Install ======
- 
-You can download the theme here (both always latest version from svn): 
- 
-  * [[http://mirko.windhoff.net/drupal-garland-blue.tar.gz]] 
-  * [[http://mirko.windhoff.net/drupal-garland-blue.zip]] 
- 
-As root you can execute the following to install it (adapt the path): 
-<code bash> 
-cd /var/www/dokuwiki/lib/tpl && wget -O- http://mirko.windhoff.net/drupal-garland-blue.tar.gz | tar -xzvf - 
-</code> 
-For details refer to [[:template]] on how to install and use templates in DokuWiki. 
  
 Alternatively you can obtain it through subversion: Alternatively you can obtain it through subversion:
Line 46: Line 37:
 </code> </code>
  
-If you want to contribute/improve the theme, I can add you to the member list at Google Code.+=====Development=====
  
 Recent Changes: http://code.google.com/p/garlanddokuwiki/source/list Recent Changes: http://code.google.com/p/garlanddokuwiki/source/list
Line 52: Line 43:
 ===== Sites using this Template ===== ===== Sites using this Template =====
 Add your site here, if you want: Add your site here, if you want:
-  * http://ko.k.vu/testwiki/ (2010-03) 
-  * http://windhoff.net/wiki/ (2010-03) 
-  * [[https://rz-static.uni-hohenheim.de/~feiler/wiki/aktiv]] ( 01.05.2010 , just testing for now)  
-  * [[http://www.lag-erziehungsberatung-lsa.de]]    Landesarbeitsgemeinschaft für Erziehungsberatung Sachsen-Anhalt 
   * [[http://tinymelinux.com/]]   * [[http://tinymelinux.com/]]
-  * [[http://ipsky.org/wiki/]] (2010-10; Law of China) 
 ===== Comments? ===== ===== Comments? =====
 Feel free to leave comments here. 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 <ns>_sidebar_left pages:\\ <code php>
 +/**
 + * 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 '<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 '&nbsp;';
 +
 +    $ID = $svID;
 +    $REV = $svREV;
 +
 +}
 +    </code>
 +
 +  * Mar 22 2012 Apart from the entry below, there are further modifications necessary in  .../tpl/drupal-garland-theme/style.ini :<code>../default/_fileuploader.css = screen
 +../default/_tabs.css         = screen</code>
 +
 +  * 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:<code> ../default/_mediamanager.css = screen</code>
 +
  
   * Many thanks - I love it. Gerard.   * Many thanks - I love it. Gerard.
Line 113: Line 140:
 <code> <code>
 <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>  <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> 
 +</code>
 +
 +== 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)
 +<code>
 +    <?php // echo p_sidebar_xhtml('top_navigation')?>
 +    <?php echo tpl_sidebar('top')?>
 +</code>
 +
 +  * replace  conf/metadata.php
 +<file php metadata.php>
 +<?php
 +$meta['sidebar_namespace'] = array('string'); /** added by mark **/
 +$meta['sidebar_pagename'] = array('string');
 +$meta['no_creation_message'] = array('onoff'); /** added by mark **/
 +?>
 +</file>
 +
 +  * replace conf/default.php
 +<file php default.php>
 +<?php
 +$conf['sidebar_namespace'] = 'wiki:navi'; /** added by mark **/
 +$conf['sidebar_pagename'] = 'sidebar';
 +$conf['no_creation_message'] = false; /** added by mark **/
 +?>
 +</file>
 +
 +modify the file ''tpl_functions.php''  (line ~15-37)
 +<code php>
 +/**
 + * 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 '&nbsp;';    
 +    }
 +        
 +    $ID = $svID;
 +    $REV = $svREV;
 +    $TOC = $svTOC; /** fix from schplurtz 2011/02/07 13:46 **/
 +}
 +</code>
 +
 +== 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:
 +
 +<code>
 +base    drupal-garland-blue
 +author  
 +email   
 +date    2010-10-22
 +name    Drupal Garland Blue
 +desc    Drupal Garland Blue Theme for Dokuwiki
 </code> </code>
  
template/drupal_garland_blue.1308405113.txt.gz · Last modified: 2011-06-18 15:51 by ach

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