Style Switcher

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
coolzeroz

Style Switcher

Post by coolzeroz »

here's the code

called this style.php

Code: Select all

<?php
setcookie ('sitestyle', $set, time()+31536000, '/', '.coolzeroz.com', '0');
header("Location: $HTTP_REFERER");
?>
Place this code in plugin and call it style

Code: Select all

if ($_COOKIE["sitestyle"]  == "")
{
echo "style";
}
else
{
echo $_COOKIE["sitestyle"];
}
 
After , place this code

Code: Select all

<link rel="stylesheet" type="text/css" href="{style}.css" />
To call the script

Code: Select all

<a href="style.php?set=default">Change to Default</a>
Post Reply

Return to “Tips and Tricks”