[pmwiki-users] It's time to change pmwiki default skin!
Hans
design5 at softflow.co.uk
Fri Sep 23 02:14:53 CDT 2011
Thursday, September 22, 2011, 10:21:35 PM, Petko Yotov wrote:
>> 4] Moves all [and i mean ALL] standard style declarations into the default
>> css file - the current, occasional, header style injection can be maddening
>> to a first-time customizer
> I agree, but we should go there carefully. Moving these core styles to the
> pmwiki.css file will make them unavailable for existing skins -- published to
> the Cookbook or personal. But it is doable/fixable.
This was discussed years ago on this list.
Don't know if there is a PITS entry for this.
It was suggested to introduce a variable, like
$EnablePmWikiCoreCss, and introduce a pub/cs/pmwiki-core.css
stylesheet.
In absence of this I added such a file to my skins FixFlow, Gemini and
Triad, and use a variable in the skin template, $PmWikiCoreStylesFmt,
which will point to the relevant core style sheet, via the following php
code in the skin php file:
# pmwiki core styles get injected into <head> by default
# This disables this injection and loads the styles from core.css file instead
SDV($EnablePmWikiCoreCss,1);
global $HTMLStylesFmt, $PmWikiCoreStylesFmt, $PmWikiCoreCss, $FarmPubDirUrl, $FarmD;
if($EnablePmWikiCoreCss==1) {
# awaiting pmwiki suport for pmwiki-core.css, $PmWikiCoreCss may need update!
SDV($PmWikiCoreCss, "pmwiki-core.css");
if(file_exists("$FarmD/pub/css/$PmWikiCoreCss")) SDV($PmWikiCoreStylesFmt, "
<link href='$FarmPubDirUrl/css/$PmWikiCoreCss' rel='stylesheet' type='text/css' />");
else
SDV($PmWikiCoreStylesFmt, "
<link href='$SkinDirUrl/css/pm-core.css' rel='stylesheet' type='text/css' />");
$HTMLStylesFmt['pmwiki'] = '';
$HTMLStylesFmt['diff'] = '';
$HTMLStylesFmt['simuledit'] = '';
$HTMLStylesFmt['markup'] = '';
$HTMLStylesFmt['urlapprove'] = '';
$HTMLStylesFmt['vardoc'] = '';
$HTMLStylesFmt['wikistyles']= '';
}
~Hans
More information about the pmwiki-users
mailing list