[pmwiki-users] Gemini & Fixflow select in config

Hans design at flutesong.net
Tue Apr 26 01:29:34 CDT 2005


Monday, April 25, 2005, 6:55:20 PM, John wrote:
> Is there a way to pass variables like the skin color and font
> along with the skin selection in the config.php file of a Field for
> the Gemini or Fixflow skin?  Actually the latter mostly.

In GeminiTwo and FixFlow color schemes and font schemes are determined
through variables, which have a default setting in skin.php.
So you could change the default there.
You could also add a conditional switch there, for instance add (ca
line 50, after the default settings) in gemini/skin.php this:

   $grp = FmtPageName('$Group',$pagename);
   if ($grp == 'Student') {
                        $ColorCss = 'sky-color.css';
                        $sc = 'sky'; }

This is an alternative to what Jason achieved and avoids duplicating
the skin folder.

But both skins have by default the user option of switching color
schemes etc via setting a cookie. This could be disabled by disabling
(commenting)
   include_once("$SkinDir/stylechange.php");

But with the default switching options the user's color and font scheme
is determined by the cookie setting on his machine, if s/he did choose
an alternative scheme to the default. Either you give her/him the
option to choose, or you deny it alltogether. :-)

I still have not answered the original question I guess :-)

In a farm situation where you have the skin determined in
farmconfig.php I can't see a way of setting the Css variables like
$ColorCss and $FontCss in a field's config.php.

The most logical way would be to set a switch in skin.php as above for
determining different fields instead of groups, but I have no idea if
that is possible. I have the skin determined in a field's config.php,
and have it sitting in the field's pub/skins/ folder. Then I can set
whatever defaults for that field.

I don't know if I understood your question correctly, John.
Perhaps you can rephrase what you wish to achieve?

Best, 
~Hans                           




More information about the pmwiki-users mailing list