Translations of this page?:

Plugin Loadskin

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

Last updated on 2008-08-08. Provides Admin, Action.
Compatible with DokuWiki 2008-05-05.

Tagged with skin, template.

Download plugin-loadskin.tgz

Installation

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

If you use darcs you can just download and apply this darcs patch.

Remove the following lines in <dokuwiki>/inc/init.php aournd 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 sepcify the templates to be used.

Bugs

I had problems regarding the mediamanager so I had to deinstall this plugin. Because I thought they are related to the monospace template I originally posted the bug report there.

—- Matthias

Not a bug! Have you tried adding a slash after DOKU_TPL?. ATM I can't guarantee that this plugin works with all templates, it however, will probably work with all templates which setup the CSS the DokuWiki way. I can however guarantee that the plugin works with arctic (probably most of the arctic template derived templates also), simple, dokubook, dokubrick and the default template. — Michael Klier 2008/08/08 15:01

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

 
plugin/loadskin.txt · Last modified: 2008/09/18 12:35 by 24.161.160.94
 

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
WikiForumIRCBugsTranslate