Implementing Skins
Remember the
indexed multi-dimensional associative array, it’s now time to add a new
configuration set. This is easily done by copy and pasting the existing set and
increasing the skin id by 1(extracted from
visuals.inc
file and its $VISUALS
indexed multi-dimensional associative array, it’s now time to add a new
configuration set. This is easily done by copy and pasting the existing set and
increasing the skin id by 1(extracted from
visuals.inc
):
<?php
$VISUALS[1]['page']['font'] = 'Arial';
$VISUALS[1]['page']['fontsize'] = '12';
$VISUALS[1]['page']['fontunit'] = 'pt';
$VISUALS[1]['page']['background']['color'] = '#838383';
?>
Once you have set new values you can put the following code in the
index.php
file to switch from one skin to another:
<?php
<a href="index.php?SkinID=<?php $SkinID ? echo '1' : echo '0'; ?>">
?>
Using the browser detection as evoked in the “Browser/Platform Based
Behaviors” section, you could also decide to load a totally different skin using
a code similar to this (extracted from
Behaviors” section, you could also decide to load a totally different skin using
a code similar to this (extracted from
index.php
):
<?php
if ( browser.indexOf("explorer") != -1 ) {
location.replace("index.php?SkinID=1);
}
?>