How to rotate local adverts on my smf forum

Firstly you can try Google DFP = Read AboutGoogle DFP here

Or you can try an external Ads script.

That will rotate the Ads for you

Or better still try the script below. 

First, place this where you want the banners to be seen:

<script type="text/javascript" src="js/ad-rotation.js"></script>
<noscript>JavaScript must be enabled to view this element</noscript>

Next, build a page called ad-rotation.js in a folder called "js", and in it place:

Code: [Select]
gfx0="http://www.yoursite.com/path/to/image.gif";
lnk0="http://www.advertiserswebsite.com/";
alt0="Advertisers Website";

gfx1="http://www.yoursite.com/path/to/image.gif";
lnk1="http://www.advertiserswebsite.com/";
alt1="Advertisers Website";

gfx2="http://www.yoursite.com/path/to/image.gif";
lnk2="http://www.advertiserswebsite.com/";
alt2="Advertisers Website";

gfx3="http://www.yoursite.com/path/to/image.gif";
lnk3="http://www.advertiserswebsite.com/";
alt3="Advertisers Website";

gfx4="http://www.yoursite.com/path/to/image.gif";
lnk4="http://www.advertiserswebsite.com/";
alt4="Advertisers Website";

gfx5="http://www.yoursite.com/path/to/image.gif";
lnk5="http://www.advertiserswebsite.com/";
alt5="Advertisers Website";

len=6; // Number of banners

today=new Date();
today=Math.round(today.getTime()/10);
rnd=today%len;

// Edit the below for specific banner size
document.writeln('<a href="'+eval("lnk"+rnd)+'" title="'+eval("alt"+rnd)+'" rel="external"><img src="'+eval("gfx"+rnd)+'" alt="'+eval("alt"+rnd)+'" width="468" height="60" /><br /></a>');

<

Get Our Hottest Updates via SMS. Kindly SMS FOLLOW VIBERTECHS to 40404. On Any Network. It Is Totally FREE. Download Our Android App HERE And Start Receiving Latest Browsing Tips Notifications On Your Phone For FREE

No comments:

Also Read

Powered by Blogger.
//Image SEO Script by - Bloggingtipsbyakash.blogspot.com