Announcement

Collapse
No announcement yet.

Mutli rotating banners

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mutli rotating banners

    Ok so I put a rotating banner in my header following this thread.

    Here is the plugin code I used for the origional banner in the header (and it works perfect)

    $random_number = rand(1, 7);

    $random_banner[1] = '<img src="/images/banners/banner10.gif" />';
    $random_banner[2] = '<img src="/images/banners/banner11.gif" />';
    $random_banner[3] = '<img src="/images/banners/banner12.gif" />';
    $random_banner[4] = '<img src="/images/banners/banner13.gif" />';
    $random_banner[5] = '<img src="/images/banners/banner14.gif" />';
    $random_banner[6] = '<img src="/images/banners/banner15.gif" />';
    $random_banner[7] = '<img src="/images/banners/banner16.gif" />';
    And the hook location parse_templates

    Now I want to have a second rotating banner in the box above the navbar. I have located exactly where in the navbar template that I need to place the code to call up the banner but here is where I have a question.

    I created a second plugin and called it advertising banners with the hook location parse_templates with the code

    $random_number1 = rand(1, 5);

    $random_adbanner[1] = '<img src="/images/advertisingbanners/smallbanner1.gif" />';
    $random_adbanner[2] = '<img
    src="/images/advertisingbanners/smallbanner2.gif" />'
    ;
    $random_adbanner[3] = '<img
    src="/images/advertisingbanners/smallbanner3.gif" />'
    ;
    $random_adbanner[4] = '<img
    src="/images/advertisingbanners/smallbanner4.gif" />'
    ;
    $random_adbanner[5] = '<img
    src="/images/advertisingbanners/smallbanner5.gif" />'
    ;
    and use $random_adbanner[$random_number1] to call up the banner and it don't work. I don't understand PHP much at all so what am I doing wrong or is this not a possability?

    Thanks

  • #2
    It works for me.

    Make sure both plugins are active. In which templates are you calling the banners?

    Comment


    • #3
      Ok I must have really messed something up because you are correct it works,lol...

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X