Plugin Loadskin

loadskin plugin by Michael Klier
Allows to specify different templates for different wiki pages or namespaces.

Last updated on 2009-05-21. Provides Admin, Action.
Compatible with DokuWiki > 2009-05-21, 2008-05-05.

Tagged with skin, template.

Download plugin-loadskin.tgz
Github URL http://github.com/chimeric/dokuwiki-plugin-loadskin

Support the ongoing development of DokuWiki Plugins and Templates and buy me a coffee ;-) (Suggested: 3€ for a regular or 5€ for big latte with caramel).

Installation

Download the archive and unpack it into <dokuwiki>/lib/plugins.

  • .tgz Plugin Manager.

The plugin is also available via git.

% cd <dokuwiki>/lib/plugins
% git clone git://github.com/chimeric/dokuwiki-plugin-loadskin.git loadskin

:!: IMPORTANT :!: The plugin won't work without the following small changes to DokuWiki's source code! They are necessary in order to allow the plugin to interfere with the template constants used by DokuWiki.

Remove the following lines in <dokuwiki>/inc/init.php around line 78:

  // define Template baseURL
  if(!defined('DOKU_TPL')) define('DOKU_TPL',
                                  DOKU_BASE.'lib/tpl/'.$conf['template'].'/');
 
  // define real Template directory
  if(!defined('DOKU_TPLINC')) define('DOKU_TPLINC',
                                  DOKU_INC.'lib/tpl/'.$conf['template'].'/');

and add them to <dokuwiki>/doku.php around line 72 after the trigger_event() call:

  trigger_event('DOKUWIKI_STARTED',$tmp=array());
 
  // define Template baseURL
  if(!defined('DOKU_TPL')) define('DOKU_TPL',
                                  DOKU_BASE.'lib/tpl/'.$conf['template'].'/');
 
  // define real Template directory
  if(!defined('DOKU_TPLINC')) define('DOKU_TPLINC',
                                  DOKU_INC.'lib/tpl/'.$conf['template'].'/');

Usage

The plugin comes with an admin component you'll find in the admin menu. Use it to specify the templates to be used.

Changelog

Bugs / Feature Requests

Please report bugs and feature requests at the bug tracker.

Discussion

Does this plugin do the same thing as the multitemplate template? — Terence J. Grant 2008/08/09 05:38

Yes, but it doesn't require to modify the templates (instead it requires a change in the DokuWiki source which isn't optimal either, however with the inc/preload.php in the current devel version this shouldn't be no problem). Hope you don't mind the competition. — Michael Klier 2008/08/09 10:14

I'd rather phase out multitemplate in favor of this actually… — Terence J. Grant 2008/08/10 00:34

This worked just as advertised. Very nice. =) Now, how hard would it be to make a plug-in that allows individual users to choose a template that suits their visual limitations (low lux, large fonts, etc.)? — Joyful 2008/09/18 06:32

Super Plugin!!! Vielen Dank! tokuehn@web.de 05.06.2009

 
plugin/loadskin.txt · Last modified: 2010/02/03 12:22 by chi
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate