Hi,
My goal is to create a single wiki install that serves up a variety of different wikis, all sharing the same code but each with its own version of the monobook template and associated wiki pages like user, talk etc. This seems very possible thanks to these two terrific DokuWiki projects, both developed by Tatewake and designed to work together:
Multitemplate
Monobook
I've made some progress but am coming up against some issues I don't know the answer to - would be grateful for input from more knowledgeable DokuWiki developers. I think this may be of use to others and would be glad to share what I learn.
What I've done so far:
1) Installed multitemplate in ~/lib/tpl/multitemplate as per instructions on tatewake.com
2) Installed multiple copies of the monobook template in ~/lib/tpl - one for each wiki - also as per instructions on tatewake.com
3) Created a namespace for each wiki - same name for each namespace and template
4) Created ACL for permissions for each namespace
5) So far, minimal customization of the monobook template for each namespace:
- unique logo
- set homepage for each namespace by editing the code referred to
on the monobook talk page. Since this was a very handy discovery, let me paste it here too so it's all together in the same thread:
If logo-image is not wanted...
and its usual position is to be used for navigation links (adaptation of css), I believe that this small change to main.php is appropriate (search for p-logo, to find the position of this code in main.php):
<?php if (file_exists(dirname(__FILE__).'/user/logo.png')
or file_exists(dirname(__FILE__).'/user/logo.gif')
or file_exists(dirname(__FILE__).'/user/logo.jpg')) { ?>
<div class="portlet" id="p-logo">
<a
<?php if (file_exists(dirname(__FILE__).'/user/logo.png')) { ?>
style="background-image: url(<?php echo $DOKU_TPL?>user/logo.png);"
<?php } else if (file_exists(dirname(__FILE__).'/user/logo.gif')) {?>
style="background-image: url(<?php echo $DOKU_TPL?>user/logo.gif);"
<?php } else if (file_exists(dirname(__FILE__).'/user/logo.jpg')) {?>
style="background-image: url(<?php echo $DOKU_TPL?>user/logo.jpg);"
<?php } ?>
href="<?php echo DOKU_BASE?>" accesskey="h" title="[ALT+H]">
</a>
</div>
<?php } ?>
Borut, 2007-03-22
6) Now, where I'm getting into trouble is with trying to configure the monobook template for each namespace template. For some reason it does not want to recognize the configuration files in ~/lib/tpl/monobooktemplate/conf/default.php where I have set up all the various navigation, sitenotice, toolbox, talk pages etc for each namespaces. Here is what is added to local.conf when I update the configuration as per tatewake.com instructions - and it is always reflected across the whole site and not on a per-namespace basis:
$conf['tpl']['multitemplate']['mb_discussion_location'] = 'web_2.0:talk';
$conf['tpl']['multitemplate']['mb_sitenotice_location'] = 'site_notice_web20';
$conf['tpl']['multitemplate']['mb_navigation_location'] = 'navigation_web20';
$conf['tpl']['multitemplate']['mb_copyright_location'] = 'copyright_web20';
$conf['tpl']['multitemplate']['mb_toolbox_location'] = 'toolbox_web20';
Perhaps it is only possible to have one monobook template on a site? Is there a configuration change I can make that will make this possible?
Thanks!
Tobias