Random Banners

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GDF
    New Member
    • Mar 2008
    • 12

    Random Banners

    I have followed up these instructions to get multiple banners on my forum http://www.vbulletin.com/forum/showthread.php?t=170826

    Enabled plug-in, and entered the links in the "www.linkx.com" field. Do I have to fill in anything in the red marked "path.to..." field?

    After doing this I have changed the template into

    <!-- logo -->
    <a name="top"></a>
    <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
    <tr>
    <td align="center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a>
    $random_banner[$random_number]
    </td>

    </tr>
    </table>
    <!-- /logo -->

    <!-- content table -->
    $spacer_open

    $_phpinclude_output
    What have I done wrong since the banner does not change after I refresh?

    Do I have to fill in something in the "stylevars" bar where the link to the single banner was filled in?

    Thanks in advance.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    There are several things to check. I can check everything is you send me a PM with a URL and admin login to your forum.

    Comment

    • GDF
      New Member
      • Mar 2008
      • 12

      #3
      Originally posted by Jake Bunce
      There are several things to check. I can check everything is you send me a PM with a URL and admin login to your forum.
      Send!

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        First of all, the hook location was wrong. I set it to parse_templates which corrected that problem.

        Second, your plugin code was messed up. You have image locations for the link tags. I fixed it.

        Third, you are apparently trying to replace the title image with a random title image, so I removed the default title image code from the header so the title doesn't show twice.

        Fourth, your plugin code doesn't have links for the banners. If you want the title image to link somewhere then you need to add links to your plugins. For example:

        Code:
        $random_number = rand(1, 3);
        
        $random_banner[1] = '<a href="[color=red]http://www.link.com/[/color]"><img src="http://img.photobucket.com/albums/v666/Omarska/forumzaglavlje5.jpg" alt="" border="0" /></a>';
        $random_banner[2] = '<a href=""><img src="http://img.photobucket.com/albums/v666/Omarska/forumzaglavlje.jpg" alt="" border="0" /></a>';
        $random_banner[3] = '<a href=""><img src="http://img.photobucket.com/albums/v666/Omarska/forumheader3.jpg" alt="" border="0" /></a>';

        Comment

        • GDF
          New Member
          • Mar 2008
          • 12

          #5
          Thank you for your excellent support!

          Comment

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