Banner

2008paul

Paragon
Joined
Mar 10, 2009
Messages
1,039
Reaction score
0
FP$
6
I know this may be in wrong bit.

Just wondering if I could have the code what you use where it show banners you have added what change every time you hit f5
 
It's a standard Javascript code that is public domain last time I checked, so they shouldn't have any issues releasing it... however out of sake for them i'll let an admin make that choice and post / no post it 🙂
 
Here's a pretty easy one, just don't take the "\" off at the end of links.

Code:
</SCRIPT>
<script language="JavaScript">
/*
   Banner rotation script provided by Ultra Advertising
   www.ultraadvertising.net
   Copyright Anawave Software, Inc.
*/

function AdSpace()
{
   var ran = Math.random()
   var num =  4;
   if (num*ran <  1) 
   {
      document.write("<a href=\"http://www.toystoryforum.com\"><img src=\"http://i386.photobucket.com/albums/oo309/theofficefanforum/tsad1.png\" align=center></a>"); 
      return;
       }
if (num*ran <  2) 
   {
      document.write("<a href=\"http://sethforum.atfreeforum.com/forum.html\"><img src=\"http://sethforum.atfreeforum.com/uploads/sethforum/images/1247892267.jpg\" align=center></a>"); 
      return;
     }
if (num*ran <  3) 
   {
      document.write("<a href=\"http://www.forumpromotion.net\"><img src=\"http://i25.tinypic.com/noczn8.gif\" align=center></a>"); 
      return;
     }
if (num*ran <  4) 
   {
      document.write("<a href=\"http://stationheights.net/index.php\"><img src=\"http://i31.tinypic.com/qq8yns.jpg\" align=center></a>"); 
      return;
     }
if (num*ran <  5) 
   {
      document.write("<a href=\"http://ultraadvertising.net/viewforum.php?f=28\"><img src=\"http://i386.photobucket.com/albums/oo309/theofficefanforum/uradhere1.png\" align=center></a>"); 
      return;
     }
}
AdSpace();   // Call the AdSpace function so the random graphic will show up
</script>
</SCRIPT>

I'm pretty sure this is the one FP uses:
Code:
<table width="908px" border="0" cellpadding="0" cellspacing="0">
<tr>              
              <td align="center">
              <div style="font-family: Verdana, Geneva, sans-serif; font-size: 12px; margin-bottom: 5px; margin-top: 5px;">Want your banner here? <a href="http://forumpromotion.net/viewforum.php?f=40">Click here</a> for more information.</div>
              <!-- put banner change script below this line --><script type="text/javascript"> 
<!-- Begin
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
        rnd.seed = (rnd.seed*9301 49297) % 233280;
        return rnd.seed/(233280.0);
};
 
function rand(number) {
	var result = Math.ceil(rnd()*number);
	if (!result)result  ;
        return result
};
var ad_cnt1 = 14;
var ad1 = rand(ad_cnt1);
var link1;
var adBanner1;
var width1
var height1
 
//do not edit the following two entries
 
if (ad1==1) {
link1="http://forums-directory.net";
adBanner1="http://i29.tinypic.com/2nbx0kn.jpg";
width1="468";
height1="60";
alt1="1";
}
 
if (ad1==2) {
link1="http://forum-topsite.net";
adBanner1="http://i30.tinypic.com/29vjne0.gif";
width1="468";
height1="60";
alt1="2";
}
 
// do not edit the above two entries
 
//Anywhere up to 10 banner ads below this line
 
 
if (ad1==3) {
link1="http://www.pokelightforums.com/";
adBanner1="http://i30.tinypic.com/a0if0k.jpg";
width1="468";
height1="60";
alt1="3";
}
 
if (ad1==4) {
link1="http://www.freeadz.org/forum";
adBanner1="http://img29.imageshack.us/img29/7144/ats.png";
width1="468";
height1="60";
alt1="5";
}
 
if (ad1==5) {
link1="http://www.studioresource.net/";
adBanner1="http://i367.photobucket.com/albums/oo116/EoN_Spirit/Ad-Banner.gif";
width1="468";
height1="60";
alt1="6";
}
 
if (ad1==6) {
link1="http://freeinspirations.com/";
adBanner1="http://up2this.com/upload/6c374edb720df1e6f8d5e0347761ed53.gif";
width1="468";
height1="60";
alt1="7";
}
 
 
 
if (ad1==7) {
link1="http://www.gfxresource.com/";
adBanner1="http://i191.photobucket.com/albums/z150/th3drag0n/GfxResource.gif";
width1="468";
height1="60";
alt1="8";
}
 
if (ad1==8) {
link1="http://xwauniverse.com/";
adBanner1="http://i180.photobucket.com/albums/x312/kokiko22/XWABan2.png";
width1="468";
height1="60";
alt1="9";
}
 
 
if (ad1==9) {
link1="http://showdowntown.strategyboards.com/";
adBanner1="http://i28.tinypic.com/33a4g1j.png";
width1="468";
height1="60";
alt1="10";
}
 
if (ad1==10) {
link1="http://screeze.com/";
adBanner1="http://screeze.com/forum/screezeadvert.jpg";
width1="468";
height1="60";
alt1="11";
}
 
if (ad1==11) {
link1="http://generalpalace.exofire.net/";
adBanner1="http://i29.tinypic.com/2eebhmo.jpg";
width1="468";
height1="60";
alt1="12";
}
 
if (ad1==12) {
link1="http://crimson-discussions.com/";
adBanner1="http://img198.imageshack.us/img198/3830/banneretc.gif";
width1="468";
height1="60";
alt1="13";
}
 
if (ad1==13) {
link1="http://gamerzevo.hostei.com/forum";
adBanner1="http://img198.imageshack.us/img198/6018/gamerzevo.gif";
width1="468";
height1="60";
alt1="14";
}
 
if (ad1==14) {
link1="http://olvusulthia.com/";
adBanner1="http://olvusulthia.com/styles/X-Treme/imageset/site_logo.png";
width1="468";
height1="60";
alt1="15";
}
 
 
// do not edit below this line
 
document.write('<script type="text/javascript" src="/banners/banner.js"></scr' 'ipt>');
// End -->
</script><!-- put banner exchange script above this line -->
              
              </td>
              
</tr></table>
 
<br />
 
In all honesty, questions like these belong in the Forum Tech Support section. Really doesn't have anything to do with the actual forum, here, besides wanting our MODs & codes. But, that's just my opinion.

If i got this right ... Just delete the parts of the codes with the excessive numbered groups you don't need, then edit the links and urls into however many you need.
 
That won't work, for FPs code you'll need the above code that has been posted plus this:

Code:
document.write('<center><a href="' + link1 + '" target="_blank">');
document.write('<img src="' + adBanner1 + '" width=' + width1 + ' height=' + height1 + ' border=0 alt="' + alt1 + '"></a>');
document.write('</center>');

Save the following as "banner.js" then change:

Code:
document.write('<script type="text/javascript" src="/banners/banner.js"></scr' 'ipt>');

To:

Code:
document.write('<script type="text/javascript" src="/YOURDIRECTORY/banner.js"></scr' 'ipt>');

Make sure you change "YOURDIRECTORY" to the directory where "banner.js" is.

Moved to tech support.
 
Back
Top Bottom