Help on Rotating Banner

Discussion in 'vBulletin Discussions' started by timhellsten, Nov 6, 2009.

  1. timhellsten

    timhellsten Newcomer

    Joined:
    Nov 6, 2009
    Messages:
    1
    Likes Received:
    0
    First Name:
    Tim
    Hello

    I am looking for some help to make my Rotating banner work better

    the current banner on the site I manage using VBulletin 3.7.0...

    the site is Manitoba Airsoft Association - Powered by vBulletin

    basically the issue is that banners display properly but only rotate everytime the page is refreshed...

    the banner is located in the header of the page

    I would like to have the banner autorefresh every say 10 seconds

    below is the code I used.

    I created a Plugin with the banners and href's in them and reference those banners

    anywho here is the code in the header


    <!-- logo -->

    <a name="top"></a>
    <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
    <tr>
    <td align="$stylevar
    "><a href="http://mb-airsoft.com"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>

    <td align="$stylevar
    ">
    $random_banner[$random_number]
    </td>

    </tr>
    </table>
    <!-- /logo -->
    <!-- content table -->
    $spacer_open

    $_phpinclude_output





    this is the code that calls the plugin

    <td align="$stylevar
    ">
    $random_banner[$random_number]
    </td>

    I would like some way of refreshing this banner every 10 seconds

    can anyone help me out with this code...


    thanks​
     
  2. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    If its rotating at all then its rotating properly.

    The problem that it is random, and not sequential and it takes every page load in to factor, not just one IP. With random you run the risk of the banner being displayed X number of times in a row, and it will happen more often with the lower number of banners you have set it to display. And on high traffic sites, it could also just be your lucky day to see the same thing numerous times.

    The only way around this would be to install a full fledge advertisement management soultion like Open X or vBAdvertise. Both of these I beleive also support an auto refresh after X seconds
     
  3. gnatster

    gnatster Regular Member

    Joined:
    May 31, 2009
    Messages:
    717
    Likes Received:
    98
    Location:
    Down the hall
    First Name:
    Nathan
    OpenX does support the auto refresh.

    Also...you might want to kill off the -Powered by vBulletin. Does nothing for your SEO.
     
  4. Been Told

    Been Told Regular Member

    Joined:
    May 29, 2009
    Messages:
    217
    Likes Received:
    0
    You may want to have a look at my random image rotator script here:
    Drummy’s Random Image Script | Drummy.org

    It's JavaScript based. You could easily add a timeout function that calls the script ever 10 seconds.
     

Share This Page