Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

Custom Forum Icons. A Unique icon for Each Forum MYBB

Ads
banner
banner
banner
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#1
Support Team
Hi, there here is a quick and very simple tutorial on how to change default MYBB forum icons to your own custom ones. Each forum will have it's own custom, separate and unique icon. After seeing so many users looking for Custom Forum Icons I have decided to post this tutorial.

So lets get started!

First you need to have installed plugin called "Template Conditionals"

Now we have to edit forumbit_depth2_forum template so go to:

ACP >> Templates >> Your theme's templates >> Forum Bit Templates > forumbit_depth2_forum

Make sure you have your custom icons already made and uploaded to ./images directory or some other directory. If icons are not in the ./images folder then make sure you edit this image path:

PHP Code:
<img src="images/your_forum_icon.png" alt="Add here the name of the forum" /> 

We have to add this PHP conditional to that template:

PHP Code:
<if $forum['fid'] == 143  then>
// Your code goes here
</if> 

So the final code to use will look like this:

PHP Code:
<if $forum['fid'] == 143  then>
<
img src="images/your_forum_icon.png" alt="Add here the name of the forum" />
</if> 

In this code 143 stands for ID.

Inside the template find:

PHP Code:
<td class="{$bgcolor}align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}title="{$lightbulb['altonoff']}class="ajax_mark_read" id="mark_read_{$forum['fid']}/></td

And replace it with:

PHP Code:
<td class="{$bgcolor}align="center" valign="top" width="1">
<!-- 
This is a custom icon for forum ID 143 START--> 
<if 
$forum['fid'] == 143  then>
<
img src="images/your_forum_icon.png" alt="Add here the name of the forum" />
</if>
<!-- 
This is a custom icon for forum ID 143 END-->
</
td

Remember that you have to add new conditional for each forum!
Thanks
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#2
Senior Member
A really need post thanks!
surenot Offline referral

Posts: 500
Joined: Jan 2014
Reputation: 16

#3
Senior Member
Thanks Marcus for taking time posting all these MYBB tutorials. This is the easiest way to add Custom Forum Icons I saw so far Smile
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#4
Support Team
Thanks guys it's cool to have a different icon for each forum this way users know better what that forum is about. "Template Conditionals" plugin is amazing definitely one of the best MYBB plugins!





User(s) browsing this thread: 1 Guest(s)