https://xoops.org/modules/library/singlefile.php?cid=2&lid=281
you can see it running with just small changes onhttp://www.samurize.org
//1. /themes/yourtheme/switch.php
<?php
$set = $_GET['set'];
$set = preg_replace('#[^a-zA-Z0-9_-]#', '', $set);
setcookie ('style', $set, time()+31536000, '/', 'yoursite.com', '0');
header("Location: $HTTP_REFERER");
?>
//2. /themes/yourtheme/theme.html -> before line 1
<{php}>
include_once XOOPS_URL.'/themes/yourtheme/switch.php';
if ( isset($_COOKIE['style'])) {
$sstyle = $_COOKIE['style'];
$GLOBALS['xoopsTpl']->assign( 'xoops_sstyle', $sstyle);
} else {
$sdefault = 'style';
$GLOBALS['xoopsTpl']->assign( 'xoops_sstyle', $sdefault);
}
<{/php}>
//3. /themes/yourtheme/theme.html -> relpace the default theme css link with
<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_imageurl}><{$xoops_sstyle}>.css" />
//4. wherever :) -> switch-link , replace "style" with the css name you want to switch
examples
<a href="<{$xoops_imageurl}>switch.php?set=style1">Style1</a>
<a href="<{$xoops_imageurl}>switch.php?set=style2">Style2</a>