Post by UnChained on Oct 22, 2006 14:26:48 GMT -8
Tired of having your News Fader make your affiliates table, and welcome table hang up on marquee? Well here's the solution. Plus, there are many more options with this News Fader as described below.
Preview
MAIN HEADER
<style type="text/css">
<!--
#newsfader {background-color: #000000; background-image: url(URL TO IMAGE);}
-->
</style>
<script type="text/javascript">
<!--
/* News Fader Remodel v1.5 by UnChained. Please leave this header intact. Do not repost. */
/* proboardcoding.proboards58.com */
var message = new Array() // DON'T TOUCH THIS LINE!
// Edit Your Message Below.
message[0]="Message 1"
message[1]="Message 2"
message[2]="Message 3"
message[3]="Message 4"
message[4]="Message 5"
message[5]="Message 6"
//Edit Your Settings Below.
var headImg = "URL TO HEAD IMAGE"; // Head Image URL
var baseImg = "URL TO BASE IMAGE"; // Base Image URL
var ffamily = "Verdana"; // Font family
var fsize = "14"; // Font size
var fcolor = "000000"; // Font hex color
var wheight = "60"; // Window height
var wwidth = "728"; // Window width
var wclass = "newsfader"; // Window class name
var tspace = "<br />"; // Top spacer
var bspace = "<br />"; // Bottom Spacer
var txtspd = "4000"; // Speed of text change
// Do Not Edit Anything Below.
var tstart='<center>'+tspace+'<img src='+headImg+' /><table border="0" width='+wwidth+' cellspacing="0" cellpadding="0" class="windowbg"><tr><td><table width='+wwidth+' id='+wclass+' cellpadding="4" cellspacing="1"><tr><td valign="middle" align="center" height='+wheight+'><div id="news" style="font-size: '+fsize+'; font-family: '+ffamily+'; color: '+fcolor+'; align="center">';
var tend='</div></td></tr></table></td></tr></table>';
var i_message = 0;
if(location.href.match(/com\/?((\index\.cgi)?\??(action=home)?)?(#.+)?$/)){
document.write(tstart);
function changetext() {
if(!document.getElementById)
return false; {
} if(i_message == message.length)
i_message = 0;
document.getElementById("news").innerHTML = message[i_message];
i_message++;
setTimeout("changetext()", txtspd)
}
changetext();
document.write(tend+'<img src='+baseImg+' />'+bspace);
}
//-->
</script>
Benefits over the PB default News Fader
1.) Doesn't hang up marquee's (Affiliate faders, or HTML tables with scrolling text).
2.) You can choose your own font styles.
3.) You can add head/base images.
4.) You can add a background image, or a hex color.
5.) You can set the width to accommodate smaller head/base images (like from your quick reply table).
6.) Set the height to accommodate larger text, or images.
*EDITING INSTRUCTIONS*
ORANGE IS NOT TO BE EDITED.
Green is for your background color, or image.
Red is for the message you want displayed in the News Fader. You can use plain text, and HTML tags. Make sure each message has a corresponding number, but don't leave a number blank (unless you want to use it as a message delay).
Blue is for the spacers. Top spacer pushes the News Fader down away from the main menu bar, while the bottom spacer pushes it away from the categories. Leave the <br /> out if you don't want any spacer, or add more to increase the space.
Pink is for the speed of the message change. The lower the number, the faster the message changes. You should stick with whole thousandths, or increments of 500.
The rest is pretty much self explanatory.
Enjoy!