[pmwiki-users] Path to skins question

Hans design5 at softflow.co.uk
Wed Nov 8 11:58:10 CST 2006


Wednesday, November 8, 2006, 5:10:53 PM, Patrick wrote:

> The key question to resolving this is to know if the page is
> being displayed with or without the skin template.  If you're
> getting a "skin not found" error, that indicates a problem with
> the filesystem path (the key).  If the page is displaying
> but none of the .css and/or .gif images are loading, that's
> a problem with the url portion and/or $FarmPubDirUrl.

okay, thank you!
Yes I set $FarmPubDirUrl first.

The problem lies with the filesystem path, i.e. "skin not found"
error, despite what I wrote earlier. At least that is the problem
occurring now. Sorry for the confusion.

And from what you wrote I take that for the keys in $SkinLibDirs
PmWiki wants absolute filepaths.
I also take that Pmwiki only knows $FarmD as an absolute filesystem path?
And I cannot be sure about the absolute filesystem path on the hosting
server, because it may be changing, drive letters may change etc.
But I know in which directory in my site root pmwiki.php resides.
So I should be able to work out the site root filesystem directory
from this? Can I do this with a pregreplace call?
I would need to strip away from the end of the string $FarmD gives
"/pmwiki", which will leave me with the root.

$SiteRoot = str_replace("pmwiki","", $FarmD);

and then use $SiteRoot to build the absolute path for $SkinLibDirs
key:

"$SiteRoot/public_html/farm/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin",

And it worked! Both on my local machine and on the hosting server,
with very different file system paths.


Hans





More information about the pmwiki-users mailing list