Diferències

Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.

Enllaç a la visualització de la comparació

dokuwikitemplate [2016/08/12 11:48] (actual)
Línia 1: Línia 1:
 +**Drupal Garland Blue Template for Dokuwiki**
 +
 +http://​www.dokuwiki.org/​template:​drupal_garland_blue
 +
 +
 +====== Drupal Garland Blue Template for Dokuwiki ======
 +
 +---- template ----
 +Author_mail: ​   example@example.org Mirko Windhoff
 +Description: ​   Drupal Garland Theme adapted for DokuWiki (in blue), internals based on the sidebar_theme.
 +LastUpdate_dt: ​ 2010-10-22
 +Compatible: ​    ​2011-05-25;​ 2010-11-07; 2009-12-25c;​ hopefully also 2005-09-22 and above
 +Template_tags: ​ Drupal, Garland, Blue # comma separated tags
 +Screenshot_img:​ http://​mirko.windhoff.net/​drupal-garland-blue-screenshot.png
 +----
 +
 +[[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.
 +
 +This theme shows the content of the following special named pages at the left, right and top:
 +  * ''​top_navigation''​ (displayed at the top) [[top_navigation]]
 +  * ''​default_sidebar_left''​ (displayed at left) [[default_sidebar_left]]
 +  * ''​default_sidebar_right''​ (displayed at right) [[default_sidebar_right]]
 +  * ''//<​page>//​_sidebar_left''​ (displayed only for //<​page>//​ at left instead of the ''​default_sidebar_left''​) [[<​page>​_sidebar_left]]
 +  * ''//<​page>//​_sidebar_right''​ (displayed only for //<​page>//​ at right instead of the ''​default_sidebar_right''​) [[<​page>​_sidebar_right]]
 +  * ''//<​namespace>//​_sidebar_left''​ (displayed for all pages of //<​namespace>//​ at left, if no page with the same name exists) [[<​namespace>​_sidebar_left]]
 +  * ''//<​namespace>//​_sidebar_right''​ (displayed for all pages of //<​namespace>//​ at right, if no page with the same name exists) [[<​namespace>​_sidebar_right]]
 +
 +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 ======
 +
 +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:
 +<code bash>
 +cd /​var/​www/​dokuwiki/​lib/​tpl/​
 +svn checkout http://​garlanddokuwiki.googlecode.com/​svn/​trunk/​drupal-garland-blue drupal-garland-blue
 +</​code>​
 +
 +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
 +
 +===== Sites using this Template =====
 +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://​ipsky.org/​wiki/​]] (2010-10; Law of China)
 +===== Comments? =====
 +Feel free to leave comments here.
 +
 +  * 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 ''<?''​ tag instead of the full ''<?​php''​ tag. some strict settings don't like that.
 +  * I think this is a great template - but I had to fix a couple of issues: The ''<?''​ 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 ;-)
 +    * Thank you for reporting the "<?​php"​ issue. This is now fixed. Conserning the "​Include some default pages" part: They are included, but normally these pages don't exist and have to be filled by the user. One could create and fill them with dummy content, but a template should not create pages I think. --- //​[[mail@example.org|Mirko Windhoff]] 01/​02/​2011//​
 +  * Very nice template.\\ There is an issue with the TOC, though. If a page is so simple that it has no TOC, or when visiting configuration page, the TOC that is shown for the page is the TOC of the sidebar (if it has one). I found how to prevent this. in file ''​tpl_functions.php'',​ function ''​tpl_sidebar''​ should save and restore the global ''​$TOC''​ var. The following code works for me<code php>
 +/**
 + * 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;
 +}
 +</​code> ​ --- [[user>​schplurtz]] //​2011/​02/​07 13:46//
 +  * Very great template ! thank you.\\ I encountered a problem with long ''​%%<​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]] {{ http://​img201.imageshack.us/​img201/​29/​captureit.png?​70x70}}. Can you help fix this? \\ --- [[user>​chtiland]] //​2011-04-22//​
 +    * **@schplurtz** : Try to use plugin [[http://​www.dokuwiki.org/​plugin:​jquery-syntax|jquerry-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//
 +
 +<​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> ​
 +</​code>​
  
  • Mostra pàgina