PDA

View Full Version : Advartising, image change......


cooly291
03-08-2005, 11:39 PM
Hi, I would like to set up a kind of advertising program for my site. People can come, and sign up, and put a 468 x 60 banner on there sites, and it will advertise different zelda sites. The only problem is, I want it to change like advertisements do. I don't want it to say "Zelda Links" all the time. Is this possible? I don't know if this php, html, or java, so I tuck in here.

PS - I also want the members to link to one thing, and I can add sites in to the database whenever I want, and it will automatically start processing through their sites................

harbingerOTV
03-09-2005, 04:19 AM
http://www.javascriptkit.com/script/cut144.shtml

your .js file


<!--

function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"

//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://image1's target URL"
imagelinks[2]="http://etc..."
imagelinks[3]="http://etc..."
imagelinks[4]="http://etc..."
imagelinks[5]="http://etc..."
imagelinks[6]="http://etc..."

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
}
random_imglink()
//-->


and the link they paste into thier site pointing to your .js file:


<script type="text/javascript" src="YourURL/ads.js"></script>


you can go into your ads.js file and add/delete images/links easily enough.

cooly291
03-09-2005, 10:38 PM
thanks a lot, this exaclty what I was looking for!!!


EDIT: Problem fixed, it works now!