[pmwiki-users] how to access configuration variables from skin scripts

Petko Yotov 5ko at 5ko.fr
Sun Mar 18 07:50:02 CDT 2012


Sorry for my late reply. You are using PmWiki in unusual ways so I had to find
some time to test the thing.

a.sonderhoff at gassi-tv.de writes:
> > $HandleBrowseFmt = array(&$PageStartFmt, &$PageRedirectFmt, &$PageEndFmt);
> This works as well, though not exactly like I was hoping to use it. I was  
> hoping to use a directive like this in the skin template’s php file (where I  
> have all the skin related conditional stuff).

You can set this line in pub/skins/yourskin/yourskin.php if you declare the 4
variables global.

> In which order are config.php and skin.php(1) evaluated? 
config.php is used very early, long before a skin-template.php file.

> E. g. can I define a global variable in skin.php to conditionally  
> use the var in config.php? 

No.

> Or are there other ways to achieve this?

I hope that I have correctly understood your need and I hope that the above  
line in a template-skin.php file with a global declaration will work for you.

Petko




More information about the pmwiki-users mailing list