JavaScript – Advance Ads Rotator v1.32 Hybrid




Tagged Under : , , ,

Version: 1.32 Hybrid
Revision: 34 Build 12

JavaScript – Advance Ads Rotator v1.32 Hybrid

Introduction:
on the 6th of June, my Gmail inbox was dominated by a bunch of users!
They asked me, if I can create another “JavaScript Ads Rotator” that gives individual users’ more control over their banners. Well… this is a pretty good excuse to get my brain working!

If you want to use this new script, please feel free to copy and use it on your website, blogs or forum. However, please don’t remove any of my comments, especially my copyright regulations and rules!

Thank for your support!

Lair360 ~ Administrator

1.] Download notepad++ from the original author or from another source.
——————————-

http://sourceforge.net/projects/notepad-plus/

http://filehippo.com/download_notepad/

——————————-

2.] Copy this ‘JavaScript’ source code and save it as “ad-rotator.js”.

File: ad-rotator.js
—Copy Source Code—

// Version: 1.13 Hybrid
// Revision: 36 Build 21
// Copyrighted by Lair360
// Url: lair360.co.uk/blog/
// *******************************
// If you're using more than three ADS, please change
// the default number.
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
// *******************************
// Replace your own images, banners and urls.
if (ad==1) {
url="http://url-1.com";
alt="url-1.com";
banner="1.gif";
width="125";
height="125";
}
if (ad==2) {
url="http://url-2.com";
alt="url-2.com";
banner="2.gif";
width="125";
height="125";
}
if (ad==3) {
url="http://url-3.com";
alt="url-3.com";
banner="3.gif";
width="125";
height="125";
}
// Modifications Ends Here.
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" ')
document.write('width=\"' + width + '\" height=\"' + height + '\" ');
document.write('alt=\"' + alt + '\" border=0><br></a>');
document.write('</center>');

—End Source Code—

3.] Finally, you’ll need to add this ‘html – string’ into your webpage.

—Copy Source Code—

<script type="text/javascript" language="Javascript" src="ad-rotator.js"></script>

—End Source Code—

4.] Save your webpage and exit. After that, just alter the above JScript with your own images and links.

5.] Finish!

Copyrighted by Lair360




JavaScript – Advance Ads Rotator v1.1




Tagged Under : , ,

Version: 1.1
Revision: 23 Build 43

JavaScript – Advance Ads Rotator v1.1

Introduction:
this script was written for the public. It was a small project to promote and advertise your products, companies and many more. However, you must keep the “Copyright” rules and regulations intact.

This JavaScript is free for use and it’s licence under “Creative Commons Attribution-Non-Commercial”. This means, you are free to copy and reuse any of my codes (non-commercially), as long as you tell people where they’re from.

1.] Download notepad++ from the original author or from another source.
——————————-

http://sourceforge.net/projects/notepad-plus/

http://filehippo.com/download_notepad/

——————————-

2.] Copy this ‘JavaScript’ source code and save it as “ad-rotator.js”.

File: ad-rotator.js
—Copy Source Code—

// Version: 1.1d Revision: 65
// Copyrighted By Lair360 ~2009
// ---------------------------------------------
// Time Synchronization
global.today=new Date();
        global.seed=global.today.getTime();
        function global()
        {
// Please don't modify the calculations and the seed.
        global.seed = (global.seed*9301+49297) % 233280;
        return global.seed/(233280.0);
        };
// This area is the calculation  with random numbers.
// But, please don't change anything here.
        function rand(number)
        {
        return Math.ceil(global()*number);
        };
// If you have more than one ADS, you might want to change the script here.
// Maximum ADS Rotation: 10 Adverts.
        var number=rand(4)-1
// Change the links and images here. Just change these default settings with your own adverts.
// However, please don't remove the "backwards slash" and the "document.write".
if (number == 0) {
        document.write("<div align=center><a href=link1 target=_blank>")
        document.write("<img src=1.png alt=\"sample1\" border=0></a></div>")
}

if (number == 1) {
        document.write("<div align=center><a href=link2 target=_blank>")
        document.write("<img src=2.png alt=\"sample2\" border=0></a></div>")
}

if (number == 2) {
        document.write("<div align=center><a href=link3 target=_blank>")
        document.write("<img src=3.png alt=\"sample3\" border=0></a></div>")
}

if (number == 3) {
        document.write("<div align=center><a href=link4 target=_blank>")
        document.write("<img src=4.png alt=\"sample4\" border=0></a></div>")
}
// ADS Rotation Ends Here.
// ---------------------------------------------

—End Source Code—

3.] Finally, you’ll need to add this ‘html – string’ into your webpage.

—Copy Source Code—

<script type="text/javascript" language="Javascript" src="ad-rotator.js"></script>

—End Source Code—

4.] Save your webpage and exit. After that, just alter the above JScript with your own images and links.

5.] Finish!

Copyrighted By Lair360