[Pmwiki-users] Skinning once more

Thomas -Balu- Walter list+pmwiki-users
Thu Feb 26 10:53:37 CST 2004


I'd like to discuss a feature that was already suggested in part by me
when we were discussing on additional template variables for Path, Url
and such.

A pmWiki administrator should not need to specify which template file to
use, but only decide for a Skin itself.

Why? Because it would be easier for Skin coders to add special
functionality. E.g. I needed to add some functions and variables into my
skin and I am now loading the file to do so using a workaround: 
<!--file:$PageTemplateDir/functions.inc.php-->
as first line in my template file

I also can not distribute a skin that chooses different views for
different tasks by now (I'm not sure if I could do somehow, but it would
require more workarounds...) 

All this would additionally need to be done by the admin who installs
my skin e.g. in local/config.php. So I have to tell him what lines to add
there.

I have no real idea how to do this, but I think that PmWiki might load a
file pub/skin/SKINNAME/SKINNAME.php if it exists.  Skin-authors can then
use it to set the template file variable and do other stuff (making sure
that the site admin did not set the variables already?). 

The site admin only would have to set $Skin = 'foobar' to decide for a
skin.

BTW - Right now I have the odd effect, that I can set a global variable
in my functions.inc.php which can be used in the template file:
$GLOBALS['SubTitle'] = $GLOBALS['SubTitle'] + "barfoo";
$GLOBALS['SubTitle2'] = $GLOBALS['SubTitle'] + "foobar"; 

I now can use $SubTitle2 and it will correctly display the set Subtitle
plus "foobar", but if I use $SubTitle in the template it does not use
the new value...

     Balu




More information about the pmwiki-users mailing list