Support Forums

Full Version: Different banner for diffrent Forum Categories
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I found a sample code that display a different banners for different Forum Categories but it's written on VBulletin.

here's the code:

Quote:
Code:
<!-- start  code -->
<vb:if condition="in_array($forum['forumid'], array(4,12,36))">
MY BANNER HERE
</vb:if>
<!-- end code -->

The part you need to change is 4,12,36 where the numbers refer to the forum numbers you want to display the buttons in.
The way you get this is in the forum the url will be like:

Code:
http://yoursite.com/forumdisplay.php?4-music-Videos
http://yoursite.com/forumdisplay.php?12-music-Clips
http://yoursite.com/forumdisplay.php?36-music-Gallery

Additional trick

If you don't want the Button to display to members and only to guests you can wrap the above code in the following
PHP Code:
[code]<vb:if condition="$show['guest']">all the code above</vb:if>

credits: MrHappy

This sample codes are taken from VBULLETIN 4.0



How should it be done for MYBB?