• I am working on looking for something that will allow me to put ads in my site that change per page load or change during the page (example: https://macthemes2.net/forum/) I am in need of putting them on my site, but i dont want ads everywhere, I will be selling these ad spots, and I DO NOT want to use Google Adsense. Anyone know any code or help with this issue? Thanks in advance!

Viewing 10 replies - 1 through 10 (of 10 total)
  • If you’re able to write or merge some code yourself try this:

    <head>
    <script language="javascript">
    var theImages = new Array() // do not change this
    
    // To add more image files, continue with the
    // pattern below, adding to the array.
    theImages[0] = '1.jpg'
    theImages[1] = '2.jpg'
    // etc...
    
    // do not edit anything below this line
    
    var j = 0
    var p = theImages.length;
    var preBuffer = new Array()
    for (i = 0; i < p; i++){
       preBuffer[i] = new Image()
       preBuffer[i].src = theImages[i]
    }
    var whichImage = Math.round(Math.random()*(p-1));
    function showImage(){
    document.write('<img src="'+theImages[whichImage]+'">');
    }
    </script>
    </head>
    
    <body>
    <script language="javascript">
    showImage();
    </script>
    Thread Starter themacfeed

    (@themacfeed)

    I need there to be a link in that too! do you know how to make the ad a link?

    Thread Starter themacfeed

    (@themacfeed)

    Please reply, I need this fixed

    Just add a link around the <script> portion that’s within your body.

    So: <a href="https://www.yourwebsite.com"><script language="javascript">showImage();</script></a>

    You can also check out openx.com

    they offer a open source ad management setup that works slick.. I am using it on several of my sites and wouldnt go back to doing it any other way.. just some food for thought

    Thread Starter themacfeed

    (@themacfeed)

    You can also check out openx.com

    they offer a open source ad management setup that works slick.. I am using it on several of my sites and wouldnt go back to doing it any other way.. just some food for thought

    How does it work, Im signed up and logged in, how do i use it on my site?

    Thread Starter themacfeed

    (@themacfeed)

    ws5f3dj7: here is another question, it is random right? if so I have 2 ads, side by side, and they always show the same picture, how do i make them different form each other?

    Thread Starter themacfeed

    (@themacfeed)

    OKay, so I put that link in but that makes all ads i have go to the same link, how do make individual ads go to different URLs?

    Thread Starter themacfeed

    (@themacfeed)

    Anyone know the answer?

    Completely different solution – have a look at the AdServe plugin.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Ad that changes per-load, Need HELP!’ is closed to new replies.