====== Plugin Loadskin ====== ---- plugin ---- description: Allows to specify different templates for different wiki pages or namespaces. author : Michael Klier email : type : action admin lastupdate : 2008-08-08 compatible : 2008-05-05 depends : conflicts : similar : tags : template, skin ---- ^ Download | [[http://chimeric.de/_src/plugin-loadskin.tgz|plugin-loadskin.tgz]] | ===== Installation ===== **:!: 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. If you use darcs you can just download and apply this [[http://chimeric.de/_src/plugin_loadskin.patch|darcs patch]]. Remove the following lines in ''/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 ''/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 de-install this plugin. Because I thought they are related to the monospace template I originally posted the bug report [[http://tjgrant.com/wiki/talk:software:dokuwiki:template:monobook#css-links_in_mediamanager_broken|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. --- //[[chi@chimeric.de|Michael Klier]] 2008/08/08 15:01// ===== Discussion ===== Does this plugin do the same thing as [[http://tjgrant.com/wiki/talk:software:dokuwiki:template:multitemplate|the multitemplate template]]? --- //[[tjgrant@tatewake.com|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. --- //[[chi@chimeric.de|Michael Klier]] 2008/08/09 10:14// I'd rather phase out multitemplate in favor of this actually... --- //[[tjgrant@tatewake.com|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//