inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jan 29, 2011 22:51:26 GMT -8
Random Forum Background Image or Color by SubDevoTested in IE, FF, Opera, Safari and Chrome. This code will give your forum a different background image or color with every page load. Enjoy!!! SubDevo Variables:Enter the URL to your background images or a hex color in the following. var backgrounds=[ // URL to Image or hex color. "URL TO IMAGE", "URL TO IMAGE", "FF00FF" <---- NO COMMA ]; // DON'T TOUCHCopy/paste a line to add more. Make sure there is a comma after each item in the list and that there is NO comma after the last item in the list. Of course, you should have at least two items in the list to be "random". NOTE:If using random colors, make sure you do not have a background image set in your skin settings, otherwise the color will not show. Only the image will show. Location: Global Header<script type="text/javascript"> /* Random Forum Background Image or Color by SubDevo */ /* Global Header - Please leave this header intact. Do not repost. */ /* interoceandesigns.com or lsdp.proboards.com */
var backgrounds=[ // URL to Image or hex color. "URL TO IMAGE", "FF00FF" ]; // DON'T TOUCH
var bg=backgrounds[Math.floor(backgrounds.length*Math.random())]; bg=(bg.indexOf("http:")==0)?"-image:url("+bg+")":"-color:#"+bg; document.write("<style type='text/css'>body{background"+bg+";}</sty"+"le>"); </script>
|
|