[dokuwiki] Re: inconsistent usage of DOKU_TPL / DOKU_TPLINC

  • From: Michael Hamann <michael@xxxxxxxxxxxxxxxx>
  • To: dokuwiki <dokuwiki@xxxxxxxxxxxxx>
  • Date: Fri, 17 Sep 2010 11:31:35 +0200


Excerpts from Roland Hager's message of 2010-09-17 10:34:48 +0200:
> In short: I tried to configure individual template-dirs in an wikifarm 
> environment - and failed.

I've already opened a feature request for this in February 2009, see
http://bugs.dokuwiki.org/index.php?do=details&task_id=1596. I would also like
to see this implemented, perhaps you could share your fixes as a (git) patch?
The main reason why this hasn't already been implemented is that I still
haven't found the time to implement and test this properly and that from what I
remember a lot of other developers don't see the need for custom templates for
animals as that might cause security risks when you can't trust the animal
owners but would give them the option to install custom templates. If you could
provide that patch perhaps that can be discussed today or tomorrow at the
DokuWiki Hackfest (tomorrow I will be there, too).

> Okay - I fixed this for me and now the output is correct - BUT - I 
> cannot choose the templates on the admin/configuration site. The 
> templates shown here are just these from the default dir. This was the 
> point where I decided to contact YOU to ask:

That can be changed, see the config.metadata.php file mentioned in the

>      Is there a chance to safely set an individual templatedir without 
> refactoring the whole project?
> or
>      Are there more places where the default tpl-dir is used instead of 
> the DOKU_TPL* Constants?

I've done some search in the code when I created that bugreport, it seems you
haven't found everything I've found but to me it seemed very limited. If you
want to check for all files, just do a recursive search in all files for
"lib/tpl", that should give you everything.

I think that just using DOKU_TPLINC and DOKU_TPL isn't enough as in some places
like the configuration manager you also need the path to the directory where
the templates are in. So probably a new constant with the path to all templates
will be needed, or even with multiple paths in order to make it possible that
animals can both choose their own templates and the ones provided by the

DokuWiki mailing list - more info at

Other related posts: