Ad Rotator

Started by PrizeLive.com, June 22, 2006, 12:51:11 PM

Previous topic - Next topic

PrizeLive.com

On my site, http://www.moneytalkpro.com, I am trying to have banners rotate on the top right area. What code would I use for this? I have just been modifying index.template.php but is their any javascript code or anything like that I can use to rotate more than 1 banner?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

H

Use phpadsnew ;)

Google it
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

PrizeLive.com

I just want something like this:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var how_many_ads = 2;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="Text to show under ad";
url="http://www.urlgoeshere.com";
alt="The alt tag for the ad";
banner="http://www.urlgoeshere.com/imagelocation.gif";
width="468";
height="60";
}
if (ad==2) {
txt="Text to show under ad";
url="http://www.urlgoeshere.com";
alt="The alt tag for the ad";
banner="http://www.urlgoeshere.com/imagelocation.gif";
width="468";
height="60";
}
document.write('<center>');
document.write('<a target="_blank" href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small><font color=white>' + txt + '</font></small></a>');
document.write('</center>');
// End -->
</SCRIPT>

That code doesn't work though when I put it in index.template.php, can you help modify it so it will work?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

H

Try the ad mod (http://mods.simplemachines.org) or search for Google Adsense. The prinicples for adding Google adsense code are the same as any other js
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

PrizeLive.com

Quote from: huwnet on June 22, 2006, 03:01:17 PM
Try the ad mod (http://mods.simplemachines.org) or search for Google Adsense. The prinicples for adding Google adsense code are the same as any other js

Thanks but I already have the ad mod installed. That mod doesn't allow two sets of banners or links to rotate with one another. I just want something or a script that will rotate one banner with one or more banners.
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

Advertisement: