Since this will be in the header, you likely need to make a global start hook plugin. Try putting the above code in a global start hook.
hook code global start
PHP Code:
// BEGIN STYLESWITCHER CODE
if(!isset($reqPath)){ $reqPath = "./"; }
require_once($reqPath ."_custom_includes/Styleswitcher.php");
$ss = new Styleswitcher();
$ss->addStyle("basic", "basic.css", "", "", true);
$ss->addStyle("blue", "blue.css");
$ss->addStyle("green", "green.css");
... more identical stuff here ...
// End Styleswitcher code
$SS_script = $_SERVER['PHP_SELF'];
$SS_normal = $ss->printSetInputChecked("fonts", "normal")
$SS_large = $ss->printSetInputChecked("fonts", "large");
eval('$SS_template = "' . fetch_template('SS_template') . '";');
SS_template
HTML Code:
<form action="_custom_includes/switcher.php" method="post">
<!-- Automatically redirect to the referer -->
<input type="hidden" name="referer" id="referer" value="$SS_script" />
<input type="hidden" name="inputStyle1" id="inputStyle1" value="fonts" />
<input type="hidden" name="inputStyle2" id="inputStyle2" value="style" />
<strong>Font Style:</strong><br />
<input type="radio" name="fonts" id="fontStyle1" value="normal"$SS_normal /> <label for="fontStyle1">Normal text (smaller)</label>
<input type="radio" name="fonts" id="fontStyle2" value="large"$SS_large /> <label for="fontStyle2">Large text</label><br />
... addtl. form elements here ...
<input type="submit" name="setChanges" value="Change styles" />
</form>
and put $SS_template in the header template. I think that should work. I have not tested it though.
don't forget to cache the template.