psymodz wrote:
hi soul_reaper is me aLz..
i see your wapmaster service, user can change footer, link back and their own Css..
I want, my user can selected my site theme..
Ex. Cywapz.tk/?css=white.css
what should i do??
tell me pleasd.. :)
hy 😀 you need to build a php switcher
The first step is to create a new file on your server ( ex: switch.php )
<?php
setcookie ('sitestyle', $set, time()+31536000, »
'/', 'yourdomain.com', '0');
header("Location: $HTTP_REFERER");
?>
Then all you need to do is write a link to switch.php and append a query string defining the style sheet you want
click here to change to "your color" style!
look an alternative example at href links ...use form to select
<form action="switch.php" method="post">
<select name="set">
<option value="default" »
selected>Default</option>
<option value="new style">new style</option>
<option value="experiment"> »
Experimental Style</option>
</select>
<input type="submit" value="Change Style">
</form>
It’s all very well and good to allow users to choose styles and have cookies written for them, but without a cookie detection script, the whole system falls on its face. So for every page of your site that you want to use user-defined style sheets, paste this next piece of code into the <head>.
<link rel="stylesheet" type="text/css"
media="screen" title="User
Defined Style" href="<?php echo
(!$sitestyle)?'defaultstyle':$sitestyle ?>.css" />
You’ll notice that this is a normal <link> element, the kind you’d use to include any standard CSS file, but there’s an important difference; where you’d normally write the name of your style sheet, we’ve used:
<?php echo (!$sitestyle)?'defaultstyle':$sitestyle ?>
This tiny script detects which style is in the user’s cookies and prints out the result. If the user doesn’t have cookies enabled, or just hasn’t chosen a site style for themselves yet, the script will default to “defaultstyle.css”. Feel free to change “defaultstyle” to whatever your default CSS file is named.
The LORD is my shepherd, i shall not be in want.
He makes me lie down in green pastures,
he leads me beside quiet waters,
he restore my soul.
He guides me in path of righteousness
for his name's sake.
Even though i walk through
the valley of shadow
of death,
i will fear no evil
for you are with me.