WEB Banner code up top

Discussion in 'OT Technology' started by daballer2005, Dec 5, 2007.

  1. daballer2005

    daballer2005 New Member

    Joined:
    Mar 15, 2007
    Messages:
    9,525
    Likes Received:
    0
    Location:
    816 up in this bitch
    Anybody know how to write that code fazle uses on top of the page to rotate banners like that? any hlep would be appreciated
     
  2. Vtec44

    Vtec44 OG!

    Joined:
    Mar 15, 2000
    Messages:
    555
    Likes Received:
    0
    Location:
    So. Cal.
    There are several mods for vB that will do that. Check with vbulletin.org.
     
  3. Nakon

    Nakon Guest

    5 minutes in php

    Code:
    <?php
    
    //simple banner rotator
    
    $banner_urls = array('http://www.google.com',
                            'http://www.yahoo.com',
                            'http://www.msn.com');
                            
    $banner_images = array('http://mysite.com/banners/google.jpg',
                            'http://mysite.com/banners/yahoo.jpg',
                            'http://mysite.com/banners/msn.jpg');
                            
    $random = rand(0,count($banner_urls)-1);
    
    echo '<a href="'.$banner_urls[$random].'"><img border=0 src="'.$banner_images[$random].'"></a>';
    
    ?>
    
     
  4. daballer2005

    daballer2005 New Member

    Joined:
    Mar 15, 2007
    Messages:
    9,525
    Likes Received:
    0
    Location:
    816 up in this bitch
    thanks Nakon :h5: Quick n00b question tho :o

    Code:
     $banner_urls = array('http://www.google.com',
                            'http://www.yahoo.com',
                            'http://www.msn.com');
    those will be links that the banner will send them to, say banner 1 goes with url 1 :o
    just making sure :o
     
  5. Nakon

    Nakon Guest

    yah, the first url goes with the first image and so on.
     
  6. daballer2005

    daballer2005 New Member

    Joined:
    Mar 15, 2007
    Messages:
    9,525
    Likes Received:
    0
    Location:
    816 up in this bitch
    thanks :h5:

    so i can just add that code anywhere i want on teh page?:o
     
  7. ROFLCORE

    ROFLCORE Guest

    Just use the mods you can find on VB.

    You'll have way more control via the admin panel.

    I use vbBannerRotator by Frapegliko
     
  8. ROFLCORE

    ROFLCORE Guest

  9. daballer2005

    daballer2005 New Member

    Joined:
    Mar 15, 2007
    Messages:
    9,525
    Likes Received:
    0
    Location:
    816 up in this bitch

Share This Page