[pmwiki-users] local.css in $FarmD/pub (Walter Keller)
Petko Yotov
5ko at 5ko.fr
Thu Jan 5 00:19:22 CST 2012
On Wednesday 04 January 2012 10:53:37, Walter Keller wrote :
> PmWiki did not use my local.css file until I detected, that skins.php
> only looks in the pub directory for it.
> In my installation, however, there is no pub directory, only a
> $FarmD/pub.
There is a reason to only look in the wiki's own pub directory and not in the
farm's pub directory -- to allow you to have different local.css, Group.css
and Group.Page.css files for your different wikis of the farm. If I want local
css styles for wikiB/Main/HomePage, I don't want wikiA/Main/HomePage and
wikiC/Main/HomePage to also change.
> Thus, I added in
> skins.php (after line 30) at the beginning of the array $PageCSSListFmt
> an entry
> '$FarmD/pub/css/local.css' => '$FarmPubDirUrl/css/local.css',
> which activates my $FarmD/pub/local.css.
...
> Did I miss a configuration option?
It is strongly recommended to not modify skins.php, pmwiki.php or any other
core file, otherwise when you upgrade, you'll need to re-apply your changes.
Every PmWiki variable which is defined with SDV() or SDVA() can be overridden
by simply setting it in config.php. If I want PmWiki to use my custom array
$PageCSSListFmt instead of the default one, I can set it in config.php:
$PageCSSListFmt = array( # note the different quotes below
"$FarmD/pub/css/local.css" => '$PubDirUrl/css/local.css',
"$FarmD/pub/css/{$Group}.css" => '$PubDirUrl/css/{$Group}.css',
"$FarmD/pub/css/{$FullName}.css" => '$PubDirUrl/css/{$FullName}.css');
> Could this be integrated in an
> official release? What about group and page level css?
No, because a Group.Page.css file is local to a single wiki, not to all wikis
in the farm. But you can override the default directories as explained above.
Petko
More information about the pmwiki-users
mailing list