$conf['tpl']['multitemplate']['ttgo_use_discussion'] = 1;
$conf['tpl']['multitemplate']['ttgo_discussion_location'] = 'talk';
$conf['tpl']['multitemplate']['ttgo_use_navigation'] = 1;
$conf['tpl']['multitemplate']['ttgo_navigation_location'] = 'navigation_ttgo';
$conf['tpl']['multitemplate']['ttgo_use_sitenotice'] = 1;
$conf['tpl']['multitemplate']['ttgo_sitenotice_location'] = 'sitenotice_ttgo';
$conf['tpl']['multitemplate']['ttgo_use_copyright'] = 1;
$conf['tpl']['multitemplate']['ttgo_copyright_location'] = 'copyright_ttgo';
$conf['tpl']['multitemplate']['ttgo_use_toolbox'] = 1;
$conf['tpl']['multitemplate']['ttgo_use_defaulttoolbox'] = 1;
$conf['tpl']['multitemplate']['ttgo_toolbox_location'] = 'toolbox_ttgo';
$conf['tpl']['multitemplate']['ttgo_author'] = 'Anonymous Contributors';
2) Replaced the code as you suggested where they appear in these three files in the template:
context.php
main.php
lang/en/settings.php
3) And also updated the default.php and metadata.php files in the template/conf dir.
[[http://www.saidia.org|Tobias Eigen]]
===== Template not applied =====
>>Hi !
>>
>>I would like to try Multitemplate for DokuWiki but, after the installation's procedure, when I force the refresh of my start-page, I obtain a page with all the content but without any css file applied... I don't understand why.
>>To give more details, I used only two templates : the default template and a copy of this one, called "mywiki", with only one change in the layout.css (background-color of the bar changed into red). I assigned the default template to the playground and the "mywiki" template for all the other pages.
>>Thank you for your help.
>>François
>>PS : Sorry if my english is not so good... I did my best but ask me if something is not clear in my explanation !
>
>EDIT : I found the problem : default template needs style.ini file... So it needs multitemplate_styleman plugin... ;-)
===== Bug report with latest version =====
I believe I do have a bug report for multitemplate on rc2008-04-11. *Update: Same problem with 2008-05-05, same way to solve*
If this was somehow my template's fault rather than multitemplate's or dokuwiki's, please don't kill me :) I have quite a lot of things to sort out right now and my top priority was to get it fixed as fast as possible.
I had a dokuwiki installation running multitemplate and the assistant plug-in with three different, self-made themes.
When I upgraded to rc2008-04-11, all pages showed up broken, only the naked content appeared with no CSS definitions at all.
I quickly determined this to be because multitemplate_styleman's css.php did *not* output my template's style sheets even though the style.ini file definitely contained them.
Long story short, the error turned out to be in /lib/exe/css.php.
around line 44, you find
$tpl = trim(preg_replace('/[^\w-]+/','',$_REQUEST['t']));
if($tpl)
{
$tplinc = DOKU_INC.'lib/tpl/'.$tpl.'/';
$tpldir = DOKU_BASE.'lib/tpl/'.$tpl.'/';
}
else
{
$tplinc = DOKU_TPLINC;
$tpldir = DOKU_TPL;
}
$tpl needed to be false for my templates to work and the DOKU_TPLINC/DOKU_TPL constants become authoritative.
Add the following lines directly below the first line quoted above ($tpl = trim...):
if ($tpl == "multitemplate")
$tpl = trim(preg_replace('/[^\w-]+/','',$_REQUEST['tpl']));
Pekka (p@pekkagaiser.de)
> Pekka, I applied your patch but it seems not to help in my case. The web developer toolbar still shows CSS errors -- inside the multiteplate plugin, I still see %%__border__%% and other strings that should be defined in style.ini. I used ''&purge=true'' in the URL as well as the "strong reload", the errors stay. in tpl/multitemplate/local_pref.php is only one valid line, and this line reads ''%%$multitemplate[''] = 'monobook';%%''. I even replaced the style.ini of monobook by the default style.ini and a customized one from ACH template, but to no avail. --- //[[werner.flamme@ufz.de|Werner]] 2008-12-01 14:05 CET//
>> solving my own issue... On [[http://www.dokuwiki.org/plugin:multitemplate_styleman]] I found the hint to insert the statement ''%%$params = str_replace( 't=multitemplate', '', $params );%%'' in css.php would help -- and it did, now %%__text_neu__%% and things like that are gone! There still are warnings, but it's only about attributes unknown to my FireFox 2.0.18 like 'filter', 'white-space' and so on. --- //[[werner.flamme@ufz.de|Werner]] 2008-12-01 14:30 CET//
===== Auto-update translated namespaces =====
I use multitemplate and translations. I did not want to have to update the multitemplate settings for each language, so here is a small extension that automatically applies your $multitemplate settings to every language registered with the translation plugin.
Copy and paste at the very end of multitemplate/local_pref.php, right before the closing "?>".
*/ if (isset($conf['plugin']['translation']['translations'])) { // Borrowed parsing routine for the "translations" string from the latest version of the translations plugin $languages = strtolower(str_replace(',',' ',$conf['plugin']['translation']['translations'])); $languages = array_unique(array_filter(explode(' ',$languages))); sort($languages); /* Now we have all translation languages in an array. Each entry in $multitemplate will now be completed by an entry each language there is. */ // We make a copy of $multitemplate to not confuse the loop $multitemplate_tempCopy = $multitemplate; // Go through every $multitemplate entry and there, through every language. foreach ($multitemplate_tempCopy as $key => $value) { foreach ($languages as $language) $multitemplate[$language.":".$key] = $value; } // end foreach unset ($multitemplate_tempCopy); } // end if isset