Welcome Guest [Log In] [Register]
Viewing Single Post From: Ad System v1
Spark
Member Avatar
Nukem Corporation
[ *  * ]
Ad System v1

Authors: Spark. Thanks to GenerationStudio for the add row to board stats code.
Preview: http://nukem.sytes.net (look in Board Statistics)
Code:
Javascript box:
Quote:
 
<script type="text/javascript"><!--// Ad System v1
window.onload = initBannerLink;

var adImages = new Array("http://linkurl.com","http://linkurl.com","http://linkurl.com","http://linkurl.com"); var adURL = new Array("support.zetaboards.com","support.zetaboards.com","support.zetaboards.com","support.zetaboards.com");

var Ad = 0; function rotate() { Ad++; if (Ad == adImages.length) { Ad = 0;}
document.getElementById("adBanner").src = adImages[Ad]; setTimeout("rotate()", 3 * 1000);}
function newLocation() { document.location.href = "http://" + adURL[Ad]; return false;}
function initBannerLink() { if (document.getElementById("adBanner").parentNode.tagName == "A") { document.getElementById("adBanner").parentNode.onclick = newLocation;}
rotate();}
// Spark --></script>

Below the board:
Quote:
 
<script src='http://209.85.62.24/30/132/0/f23676/addrow.js'>// Add more boxes to Board Statistics</script>
<script type="text/javascript">
// Add more boxes to Board Statistics
$(function(){
$().newZBBS({
isOn: true,
Title: "Advertisements",
Info: "<a href='http://support.zetaboards.com'><img src='http://linkurl.com' id='adBanner' border='0' alt='Advertisement' /></a>",
Image: "http://209.85.62.24/30/132/0/f19188/users.png"
});
});
</script>

Installation: This code may seem complicated but in fact it's very easy to edit. Place the above codes in the boxes I have specified. For the first part, edit all the links in red. Do NOT add http:// in front of the image links, that has been done for you in the code.

For the second part you will need to edit the parts in red as you wish. Now, for the parts in blue. The link in blue is the link you have added first in the first part. In my code, support.zetaboards.com would be my first link. This time you have to add http:// in front of the link. Now, the image link is blue is the the image you have added first in the first part. In this case, http://linkurl.com is my first image link, so I add that. You must get that part right or the ads won't rotate.

Any questions, please ask.
Edited by Spark, Jan 28 2008, 09:38 PM.
Offline Profile Quote Post
Ad System v1 · User Created Codes