Shoutbox

Code Help - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Code Help (/showthread.php?tid=59649)

Code Help by Nathan on 05-22-2006 at 06:24 PM

Ok guys,
I have seen code so that a user can change the background colour of the site. So anyone can change the colour.
Does anyone know the code.
Also,
Whats the code so that the background image will change if its IE cos IE6 doesnt support transparency.
Thanks
Nathan


RE: Code Help by Mike on 05-22-2006 at 06:28 PM

quote:
Originally posted by Nathan
IE6 doesnt support transparency.
IE6 does support trasparency.
It just messes up a little with PNG alpha transparency...

Read also this post: forward browser script.
RE: Code Help by Nathan on 05-22-2006 at 06:30 PM

The main one i need is the background changer. Thanks


RE: Code Help by absorbation on 05-22-2006 at 06:47 PM

Hum, there are various ways to do this. PHP (using cookies to remember the users option) or using javascript. Advantages with PHP is that, the browser won't effect what it does, it will still work the same for everyone using every browser. Javascript, is much eaiser to do, people have example code everywhere, and a quick glanse can do it. Yet, it may not work depending on the users browsers options on displaying javascript.

Flaming Text shows a background changer when you generate a logo. But a PHP example would be, if you made a cookie keep a colour in it, then got the cookie via the varible '$cookie':

code:
<?PHP
echo "<body bgcolor=\"#$cookie\">";
?>

Of course you would need to geerate and fetch a cookie, and that is a bad way of doing it, a very dodgy way indeed, even the html there is not 100% correct. I am not good with cookies, sure I know how to use them, but sercuity is not my strong point + I may of let a flaw slip in. :P

I would go for javascript. Google is a great way to find some good stuff. :)
RE: Code Help by Nathan on 05-22-2006 at 06:59 PM

I've found a great one thanks!
Im coding a new site by hand, so i will probaly edit it to make it cleaner (if i can). The site is for school for games :P SO people can go on game even if the internet is off :D
It's very basic a the moment i only started it about 1omins ago but i got loads of ideas in ym head.
I'll upload it on saturday. On a temporoary bit on my server. So you can all see it!

Thanks