[pmwiki-users] Skin Search - PM plz reply...
jbit at ev1.net
Wed Sep 27 13:47:45 CDT 2006
> The above definition of $SkinLibDirs doesn't make any sense --
> there can only be one entry for "$FarmD/pub/skins/\$Skin" in
> an array.
You sure got me there! What was I thinking?!?!?
Of course storing this as an array key limits this
to only one directory. Below is a revised version.
The problem that can be solved is to make placement of a skin
A skin .tmpl and .css file can be palced in the same directory.
When you move the .tmpl file out of the directory to another
it could keep searching the array and find where it is located.
$SkinLibDirs = array(
"./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",
"aplace/pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin",
"$FarmD/pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin");
Notice that the .tmpl file could be in either "./pub/skins/\$Skin"
or "aplace/pub/skins/\$Skin" or "$FarmD/pub/skins/\$Skin", but they
have the same .css location - "$PubDirUrl/skins/\$Skin". I want
the flexibility to place the skin .tmpl in any of these three
directories and it will still work. This will not work if the
.tmpl file is in "aplace/pub/skins/\$Skin" or in
"$FarmD/pub/skins/\$Skin". That is what NewSetSkin Function
allows that SetSkin does not.
To allow the same directory for a tmpl with different directories
for css would require changing the $SkinLibDirs variable and
the setSkin function even more. With this it would have to find
a .tmpl and a .css to qualitfy as a found skin. Not something I
think you are likely to do considering your responses so far.
More information about the pmwiki-users