Banner Jumble?

Benjay

Seasoned Veteran
Joined
Jun 29, 2010
Messages
2,667
Reaction score
0
FP$
6
How would I set one up for my promotion forum? I want to have some banners randomly placed like this forum has.

Any help is appreciated! 😀
 
I use this:

<div align="center"><script type="text/javascript" language="javascript">function swg_fa_randomads() {var ads = new Array();

// List of banners, first item = banner url, second item = link url
ads[0] = new Array('BANNER URL HERE', 'WEBSITE LINK HERE');

// do not edit
i=Math.floor(Math.random()*ads.length);document.write('<a href="'+ads[1]+'" target="_blank"><img src="'+ads[0]+'" border="0" width="468" height="60"></a>');} swg_fa_randomads();</script></div>
</br>






Editing is self-explanatory.
 
Is that a ProBoards code? The forums phpBB3 by the way.
 
bejay said:
Is that a ProBoards code? The forums phpBB3 by the way.

I don't think so.
The code works on more than just ProBoards forums. I have used it elsewhere.
 
It's just JavaScript.

When I want to rotate things upon page refresh, I use this code. I use this for my rotating welcome message at ZoneXbox:

Code:
<script language="JavaScript">
<!--
var r_text = new Array ();
r_text[0] = "Howdy,";
r_text[1] = "Hey,";
r_text[2] = "Welcome,";
r_text[3] = "Greetings,";
r_text[4] = "Hi,";
r_text[5] = "Hello,";
r_text[6] = "G'day,";
r_text[7] = "Bonjour,";
r_text[8] = "Guten Tag,";
r_text[9] = "Hola,";
r_text[10] = "Hey hey,";
r_text[11] = "Hi there,";
r_text[12] = "Yo,";
r_text[13] = "Hello there,";
r_text[14] = "Salutations,";
r_text[15] = "Toodaloo,";
r_text[16] = "Heya,";
r_text[17] = "So,";
r_text[18] = "Ahoy there";
r_text[19] = "heyyyy";
var i = Math.floor(20*Math.random())

document.write(r_text[i]);

//-->
</script>

Setting the 20 in " var i = Math.floor(20*Math.random()) " to however many variables there are.

This will work with HTML so instead of having a welcome message in each write something like

Code:
r_text[0] = "<img src="zonexbox.png" alt="ZoneXbox - The Ultimate Xbox Community "/>";
 
This is what I use. I am pretty sure it is also the one FP uses.

Code:
<div align="center"><script type="text/javascript" language="javascript">function swg_fa_randomads() {var ads = new Array();

// List of banners, first item = banner url, second item = link url
ads[0] = new Array('ImageLink', 'Link');
ads[1] = new Array('ImageLink', 'Link');
ads[2] = new Array('ImageLink', 'Link');

// do not edit
i=Math.floor(Math.random()*ads.length);document.write('<a href="'+ads[i][1]+'" target="_blank"><img src="'+ads[i][0]+'" border="0" width="468" height="60"></a>');} swg_fa_randomads();</script></div>
 
Death, that's the same code as I posted a few posts before. We use the same code.
 
index_body.html

Look for <!-- INCLUDE forumlist_body.html -->

then place a <br /> above that and then place the rotator code above the br.
 
Back
Top Bottom