Post by Peter on Oct 29, 2004 9:55:25 GMT
Features
[/li][li] Scrolling Affiliation Mini Banners.
[/li][li] Mini Banner highlight effect on mouseover.
[/li][li] Marquee pause on mouseover.
[/li][li] Classes set to go with board theme without editing.
[/li][li] Automatic Affiliate Code copying button.
[/li][li] Optional Alert for the copy button onClick.
[/li][li] Edjustable Highlight speed.
[/li][li] Easy to add affiliate code function.
[/li][li] Attatch to Info Center option.
__________
var InfoCentAttatch="yes" //'yes' to attatch to info center (normally if in footers)
var MouseOver="5" //speed of highlight when mouseover
var MouseOut="3" //speed of highlight fade when mouseout
var MiniSpace=" " //repeat for more space between banners
var AffiliateAlert = "yes" //'yes' if you want an alert on copy affiliate code
var AffiliateAlertText = "This Board's Affiliate code has been copied onto your clip board. \nPress Ctrl-V to paste the code. Thanks for affiliating!"
function HighlightAll(AffiliateCode) {
if(AffiliateAlert.match(/^yes$/i)){
alert(AffiliateAlertText)
}else{}
var Affiliation=eval("document."+AffiliateCode)
Affiliation.focus();Affiliation.select()
if (document.all){
var TextRange=Affiliation.createTextRange()
TextRange.execCommand("Copy")
setTimeout("window.status=''",'1800')
window.status="Copy the affiliate code!"
}}
var BannerFade = new Object();
var FadeObject = new Object();
function MiniBanFade(object, fade2, rate, delta){
if(!document.all)
return
if(object != "[object]"){
setTimeout("MiniBanFade("+object+","+fade2+","+rate+","+delta+")",0);
return;}
clearTimeout(BannerFade[object.sourceIndex]);
direction = 1;
diff = fade2-object.filters.alpha.opacity;
if(object.filters.alpha.opacity > fade2){
direction = '-1';}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if(object.filters.alpha.opacity != fade2){
FadeObject[object.sourceIndex]=object;
BannerFade[object.sourceIndex]=setTimeout("MiniBanFade(FadeObject["+object.sourceIndex+"],"+fade2+","+rate+","+delta+")",rate);}}
if(InfoCentAttatch.match(/^yes$/i)){
document.write('<center><table border="0" width="'+AffiliateTableWidth+'" cellspacing="1" class="bordercolor" cellpadding="0" style="position: relative; bottom: 14px;">')
}else{document.write('<center><table border="0" width="'+AffiliateTableWidth+'" cellspacing="1" class="bordercolor" cellpadding="0">')}
//-->
</script>
<noscript>
<center><table width="92%" cellspacing="1" class="bordercolor">
</noscript>
<tr>
<td colspan="2" class="catbg" height="18">
<table width="100%" height="100%" cellpadding="4" cellspacing="0">
<tr>
<td class="catbg">Affiliates</td>
<td width="1">
<form name="Copy" style="margin-bottom:0;">
<center><textarea name="AffiliateCode" style="filter: alpha(opacity=0); width: 1px; height: 1px">
YOUR AFFILIATE CODE
</textarea></center></form>
</td>
</tr>
</table>
</td>
<tr>
<td class="windowbg2" width="100%">
<marquee direction="left" scrollamount="2" scrolldelay="1" onmouseover="this.stop()" onmouseout="this.start()">
<script language="JavaScript">
<!--
function Affiliate(AffiliateURL,MiniBanner){
document.write(MiniSpace+"<a href='"+AffiliateURL+"' target='_blank'><img src='"+MiniBanner+"' style='filter:alpha(opacity=50)' onmouseover='MiniBanFade(this,200,20,"+MouseOver+")' onmouseout='MiniBanFade(this,50,20,"+MouseOut+")' width='88' height='31' border='0' /></a>"+MiniSpace)}
//Start Mini Banners
Affiliate("AFFILIATE URL","MINI BANNER URL");
//End Mini Bannners
//-->
</script>
</marquee></td>
<td class="windowbg2" width="1" align="center" valign="middle">
<table cellpadding="3">
<tr>
<td align="center" valign="middle">
<a href="javascript:HighlightAll('Copy.AffiliateCode')"><img src="YOUR MINI BANNER URL" width="88" height="31" border="0" alt="Click here to copy this board's affiliate code!"></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>[/size][/ul]
__________
White: The comments are there to help you edit and understand the code.
You may remove them if you wish.
Blue: You do not have to edit these parts of the code, but you may if you wish.
The comments should help you to understand what editing each part of the code will effect.
Yellow: This is the content of the alert message that appears when you click on the minibanner to copy the affiliate code.
This will only have effect if you have enabled it on the previous line.
Change this message if you wish.
Orange: The message that appears when mouseover the copy button.
Red: You must edit these parts of the code.
Green: Replace this with the Affiliate code of your board.
This is what it should look like...
Change the red:
<img src="URL OF MINI BANNER" width=88 height=31 border=0 alt="banner"></a> [/ul][/size]
Adding Affiliates
This is much easier than in v2;
To add more Affiliates to the code, repeat this line in the code...
__________
Please feel free to make comments, or ask for help if you are having any problems.
Enjoy the code ^_^
#nosmileys
[/li][li] Scrolling Affiliation Mini Banners.
[/li][li] Mini Banner highlight effect on mouseover.
[/li][li] Marquee pause on mouseover.
[/li][li] Classes set to go with board theme without editing.
[/li][li] Automatic Affiliate Code copying button.
[/li][li] Optional Alert for the copy button onClick.
[/li][li] Edjustable Highlight speed.
[/li][li] Easy to add affiliate code function.
[/li][li] Attatch to Info Center option.
__________
var InfoCentAttatch="yes" //'yes' to attatch to info center (normally if in footers)
var MouseOver="5" //speed of highlight when mouseover
var MouseOut="3" //speed of highlight fade when mouseout
var MiniSpace=" " //repeat for more space between banners
var AffiliateAlert = "yes" //'yes' if you want an alert on copy affiliate code
var AffiliateAlertText = "This Board's Affiliate code has been copied onto your clip board. \nPress Ctrl-V to paste the code. Thanks for affiliating!"
function HighlightAll(AffiliateCode) {
if(AffiliateAlert.match(/^yes$/i)){
alert(AffiliateAlertText)
}else{}
var Affiliation=eval("document."+AffiliateCode)
Affiliation.focus();Affiliation.select()
if (document.all){
var TextRange=Affiliation.createTextRange()
TextRange.execCommand("Copy")
setTimeout("window.status=''",'1800')
window.status="Copy the affiliate code!"
}}
var BannerFade = new Object();
var FadeObject = new Object();
function MiniBanFade(object, fade2, rate, delta){
if(!document.all)
return
if(object != "[object]"){
setTimeout("MiniBanFade("+object+","+fade2+","+rate+","+delta+")",0);
return;}
clearTimeout(BannerFade[object.sourceIndex]);
direction = 1;
diff = fade2-object.filters.alpha.opacity;
if(object.filters.alpha.opacity > fade2){
direction = '-1';}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if(object.filters.alpha.opacity != fade2){
FadeObject[object.sourceIndex]=object;
BannerFade[object.sourceIndex]=setTimeout("MiniBanFade(FadeObject["+object.sourceIndex+"],"+fade2+","+rate+","+delta+")",rate);}}
if(InfoCentAttatch.match(/^yes$/i)){
document.write('<center><table border="0" width="'+AffiliateTableWidth+'" cellspacing="1" class="bordercolor" cellpadding="0" style="position: relative; bottom: 14px;">')
}else{document.write('<center><table border="0" width="'+AffiliateTableWidth+'" cellspacing="1" class="bordercolor" cellpadding="0">')}
//-->
</script>
<noscript>
<center><table width="92%" cellspacing="1" class="bordercolor">
</noscript>
<tr>
<td colspan="2" class="catbg" height="18">
<table width="100%" height="100%" cellpadding="4" cellspacing="0">
<tr>
<td class="catbg">Affiliates</td>
<td width="1">
<form name="Copy" style="margin-bottom:0;">
<center><textarea name="AffiliateCode" style="filter: alpha(opacity=0); width: 1px; height: 1px">
YOUR AFFILIATE CODE
</textarea></center></form>
</td>
</tr>
</table>
</td>
<tr>
<td class="windowbg2" width="100%">
<marquee direction="left" scrollamount="2" scrolldelay="1" onmouseover="this.stop()" onmouseout="this.start()">
<script language="JavaScript">
<!--
function Affiliate(AffiliateURL,MiniBanner){
document.write(MiniSpace+"<a href='"+AffiliateURL+"' target='_blank'><img src='"+MiniBanner+"' style='filter:alpha(opacity=50)' onmouseover='MiniBanFade(this,200,20,"+MouseOver+")' onmouseout='MiniBanFade(this,50,20,"+MouseOut+")' width='88' height='31' border='0' /></a>"+MiniSpace)}
//Start Mini Banners
Affiliate("AFFILIATE URL","MINI BANNER URL");
//End Mini Bannners
//-->
</script>
</marquee></td>
<td class="windowbg2" width="1" align="center" valign="middle">
<table cellpadding="3">
<tr>
<td align="center" valign="middle">
<a href="javascript:HighlightAll('Copy.AffiliateCode')"><img src="YOUR MINI BANNER URL" width="88" height="31" border="0" alt="Click here to copy this board's affiliate code!"></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>[/size][/ul]
__________
White: The comments are there to help you edit and understand the code.
You may remove them if you wish.
Blue: You do not have to edit these parts of the code, but you may if you wish.
The comments should help you to understand what editing each part of the code will effect.
Yellow: This is the content of the alert message that appears when you click on the minibanner to copy the affiliate code.
This will only have effect if you have enabled it on the previous line.
Change this message if you wish.
Orange: The message that appears when mouseover the copy button.
Red: You must edit these parts of the code.
Green: Replace this with the Affiliate code of your board.
This is what it should look like...
Change the red:
<img src="URL OF MINI BANNER" width=88 height=31 border=0 alt="banner"></a> [/ul][/size]
Adding Affiliates
This is much easier than in v2;
To add more Affiliates to the code, repeat this line in the code...
__________
Please feel free to make comments, or ask for help if you are having any problems.
Enjoy the code ^_^
#nosmileys