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:

<!-- start  code -->
<vb:if condition="in_array($forum['forumid'], array(4,12,36))">
<!-- 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:


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;

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

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

<if in_array($GLOBALS['mybb']->input['fid'],array(47,48,49,50,51)) then>
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,

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.