[pmwiki-users] moving skins out of public accessa

Patrick R. Michaud pmichaud at pobox.com
Tue Sep 12 20:45:19 CDT 2006


On Tue, Sep 12, 2006 at 05:27:13PM -0500, JB wrote:
> Trying to move my custom skin out of public accessibility.
> Problem is that the css for the skin is in the skin direcory 
> same as the skin .tmpl file.

To be honest, I haven't quite figured out *why* you're
trying to get the skin out of pub/ .

Any graphics and css files associated with the skin need
to be publicly available (and so pub/ is the logical place
for them).  The .tmpl file probably doesn't need to be in
pub/, but it makes more sense for it to be in the same place
as the other skin files, and there's generally no harm with
it being public.

That said, you can tell PmWiki to look in other (non-pub)
locations for the skins by using $SkinLibDirs ... read on

> The skin .tmpl file in 
>   /var/www/home/stuff/farm/pub/skins
> 
> The css for the skin in 
>   /var/www/home/stuff/public_html/pub/skins

    $SkinLibDirs = array(
      '/var/www/home/stuff/farm/pub/skins' =>
        '...url of /var/www/home/stuff/public_html/pub/skins...');

The first value tells PmWiki to look at 
/var/www/home/stuff/farm/pub/skins/$Skin for a skin's .tmpl
file, the second value tells PmWiki to use the url to
the .../public_html/pub/skins/$Skin directory for $SkinDirUrl .

Also, there's nothing that says that a .tmpl file has to use
the $SkinDirUrl variable; one is perfectly free to use absolute
paths in the template.  So, in the template, instead of using

    <link rel='stylesheet' href='$SkinDirUrl/skin.css' ... />

one can use an absolute path, as in

    <link rel='stylesheet' href='/pub/skins/myskin/skin.css' ... />

Then the value of $SkinDirUrl doesn't matter.

Pm




More information about the pmwiki-users mailing list