Adsense ads and images rotation, how was this again?

Discussion in 'AdSense' started by Edz, Feb 10, 2006.

  1. #1
    I want to have some images next to an adsense ad and i want different ads each time the page loads.

    Could someone be so kind to tell me how to implement this?
    Or point me to a thread where this is explained. I knew of a thread posted by someone from India i believe that posted a code for this but i can't seem to find it. :(
     
    Edz, Feb 10, 2006 IP
  2. brecht

    brecht Peon

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i don't know, but i'm sure keen to find out :).
     
    brecht, Feb 10, 2006 IP
  3. Edz

    Edz Peon

    Messages:
    1,690
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    0
    #3
    LOL, Thanks for sharing that ;)
     
    Edz, Feb 10, 2006 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    you forgot to mention what code language you prefer
    there are so called "random image" scripts out there on the free market - "matt's script archive"
    http://www.scriptarchive.com/
    "Random Image Displayer"
    and other sites ...
    that could be used with perl or other script languages to insert a random image at a predetermined location next to your adsense,
    using a table for example .

    i am sure similar code for "random image" can be found for php or other scripting languages as well depending on your exact preferences or needs

    about ads rotating - i wrote a small howto a while ago
    http://www.kriyayoga.com/how_to/how_to_adsense_ssi.html
     
    hans, Feb 10, 2006 IP
  5. ActiveFarming

    ActiveFarming Active Member

    Messages:
    128
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #5
    ActiveFarming, Feb 10, 2006 IP
    Edz likes this.
  6. Edz

    Edz Peon

    Messages:
    1,690
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Edz, Feb 10, 2006 IP
  7. petalia

    petalia Member

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    Here is my suggestion for images rotation, used for Leaderboard (728 x 90) :

    ----------------
    Images rotation form for Adsense, by Petalia.org:



    <table border="0" width="73%" id="table1" cellspacing="0" cellpadding="0">
    <tr>
    <td width="22%">
    <p align="center">

    <script language="JavaScript">
    <!--
    /*
    Random Image Link Script
    By Website Abstraction (http://www.wsabstract.com)
    edited by Petalia @ Petalia Homepage (http://www.petalia.org)
    */

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

    var ry=Math.floor(Math.random()*myimages.length)

    if (ry==0)
    ry=1
    document.write('<img src="'+myimages[ry]+'" border=0>')
    }

    random_imglink()
    //-->
    </script>

    </td>
    <td width="24%">
    <p align="center">
    <script language="JavaScript">
    <!--
    /*
    Random Image Link Script
    By Website Abstraction (http://www.wsabstract.com)
    edited by Petalia @ Petalia Homepage (http://www.petalia.org)
    */

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

    var ry=Math.floor(Math.random()*myimages.length)

    if (ry==0)
    ry=1
    document.write('<img src="'+myimages[ry]+'" border=0>')
    }

    random_imglink()
    //-->
    </script>
    </td>
    <td width="25%">
    <p align="center">
    <script language="JavaScript">
    <!--
    /*
    Random Image Link Script
    By Website Abstraction (http://www.wsabstract.com)
    edited by Petalia @ Petalia Homepage (http://www.petalia.org)
    */

    function random_imglink(){
    var myimages=new Array()
    //specify random images below. You can have as many as you wish
    myimages[1]="image7.jpg"
    myimages[2]="image8.jpg"
    myimages[3]="image9.jpg"

    var ry=Math.floor(Math.random()*myimages.length)

    if (ry==0)
    ry=1
    document.write('<img src="'+myimages[ry]+'" border=0>')
    }

    random_imglink()
    //-->
    </script>
    </td>
    <td width="28%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <script language="JavaScript">
    <!--
    /*
    Random Image Link Script
    By Website Abstraction (http://www.wsabstract.com)
    edited by Petalia @ Petalia Homepage (http://www.petalia.org)
    */

    function random_imglink(){
    var myimages=new Array()
    //specify random images below. You can have as many as you wish
    myimages[1]="image10.jpg"
    myimages[2]="image11.jpg"
    myimages[3]="image12.jpg"

    var ry=Math.floor(Math.random()*myimages.length)

    if (ry==0)
    ry=1
    document.write('<img src="'+myimages[ry]+'" border=0>')
    }

    random_imglink()
    //-->
    </script>
    </td>
    </tr>
    <tr>
    <td colspan="4">&nbsp;<p>&nbsp;<script type="text/javascript"><!--
    google_ad_client = "your_ad_id";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text_image";
    google_ad_channel ="";
    google_color_border = "000000";
    google_color_bg = "000000";
    google_color_link = "FFFFFF";
    google_color_url = "008000";
    google_color_text = "00FFFF";
    //--></script><script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></td>
    </tr>
    </table>


    ----------

    Hope it helps, please tell me if it works for you :)
     
    petalia, Jun 12, 2006 IP