#native_company# #native_desc#

PHP enabled stylesheets Page 3

By Bertrand Potier
on November 24, 2002

The Visual Configuration File

This file is meant for the end user. Although being still a text/php file,
its layout as well as the way variables are named is taking that into account:
being as user-friendly as possible is the key. For that reason, I made the
choice to not use variables but multi-dimensional associative arrays that are
giving the opportunity to name the different element in a very comprehensive
This array is named $VISUALS in capital letters to follow a
naming convention I’m using for all “global” arrays. The array is first indexed
on an integer value to allow multiple configuration sets to be defined. This is
the way the eDreamers tools
are made “skin-able”, you can jump from one set to another by just changing the
id which can be provided by an URL (HTTP Get request) for example.
The parameters that you want to make available via this visual configuration
file are up to you. It fully depends on your stylesheet and what is the freedom
that you want to give or not give to your end user. In the scope of this
article, we will consider the following very simple example:


// Retrieving POST and GET variables

if (substr(phpversion(),0,3) != '4.1') { 



// Define which skin you'd like to use.

if (isset($_REQUEST['SkinID'])) { 

$SkinID $_REQUEST['SkinID']; 

 } else if (!isset(
$SkinID) ) { 

$SkinID  '0'



// Default Skin

$VISUALS[0]['page']['font'] = 'Verdana, Tahoma';

$VISUALS[0]['page']['fontsize'] = '10';

$VISUALS[0]['page']['fontunit'] = 'px';

$VISUALS[0]['page']['background']['color'] = '#838383';