MyBB Central

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?
First im pritty sure you need a plugin which allows you to enter PHP and Conditions into templates;
http://community.mybb.com/thread-31860.html

When I figure out the code ill post it here Smile
Code:
<if in_array($GLOBALS['mybb']->input['fid'],array(2,3)) then>
11111111111111
<else />
22222222222222
</if>

Make sure you download that plugin first Smile
it did'nt work.. here's my code, and already installed the plugin.

Code:
<if in_array($GLOBALS['mybb']->input['fid'],array(47,48,49,50,51)) then>
MY BANNER
</if>
Is it the same plugin? Some similar plugins don't support full php coding.

If it is, would you like togo on TeamViewer tomorrow to see what's wrong?
I have version 1.4 and this plug-in is what I used, http://mybbhacks.zingaburga.com/showthre...260&page=1

@teamviewer
We can make it today Big Grin
Sadly I Can't, yep thats the same plugin.

What time is ot where you are so we can organize a time to be online.
thanks, it's 8pm gmt+8
Ok its 12:20 here so be online 4pm tomorrow your time?
No, I can't on 4pm I have classes.

I'll be online @ 8pm at my time GMT+8
Well i cant be sorry.

PM me when your online, and we will just see what happens.