PDA

View Full Version : Banner Rotation


plot
12 Jan 2006, 20:32
Okay, this is the first time ive released something to vbulletin.org and i hope there arnt any errors.

This is a script that uses JavaScript to have banners rotate.
There is an example included in the .rar, just extract the 3 files to a memerable directory and open the .htm in IE or FF or any explorer.

To use this as an advertisment method on your forum place the .css and .js files in you rroot directory and just place the following code where you feel necessary.

Note: The page with the code placed on it should be in the same directory as the .css and .js files (if your using this script somewhere other then your forum).

<link rel="StyleSheet" href="bis_banner.css" type="text/css" />
<script type="text/javascript" src="bis_banner.js"></script>
<script language="javascript">
banner1 = new Banner('banner1');
//First : "FLASH" OR "IMAGE"
//Second: PATH OF THE FILE
//Third : DURATION IN SECONDS
//Fourth : HEIGHT
//Fifth : WIDTH
//Sixth: HYPERLINK
banner1.add("FIRST", "SECOND", THIRD, FORTH, FIFTH,"SIXTH");
//Add more above "//Start" if needed
//Start
document.write(banner1);
banner1.start();
</script></code>

Replaceing the "first" "second" strings and so forth in <code>banner1.add("FIRST", "SECOND", THIRD, FORTH, FIFTH,"SIXTH");

I placed it in my FORUMHOME template under

$navbar

If you want to add another banner just add another line below the original and change the strings accordingly, so your cod would look like this.

<link rel="StyleSheet" href="bis_banner.css" type="text/css" />
<script type="text/javascript" src="bis_banner.js"></script>
<script language="javascript">
banner1 = new Banner('banner1');
//First : "FLASH" OR "IMAGE"
//Second: PATH OF THE FILE
//Third : DURATION IN SECONDS
//Fourth : HEIGHT
//Fifth : WIDTH
//Sixth: HYPERLINK
banner1.add("FIRST", "SECOND", THIRD, FORTH, FIFTH,"SIXTH");
banner1.add("FIRST", "SECOND", THIRD, FORTH, FIFTH,"SIXTH");
//Add more above "//Start" if needed
//Start
document.write(banner1);
banner1.start();
</script>

plot
12 Jan 2006, 20:34
Forgot to attach the file, sorry

Telegon80
13 Jan 2006, 06:45
this looks promising but dont want to travel to guinea tonight :D

EasyTarget
13 Jan 2006, 15:44
nice job plot.

The-Ensemble
28 Jul 2006, 10:58
My documents says file is corupt.