Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

  • Admin Junkies is proud to announce 📣 an awesome ☀️ summer special on ✍️ Content Bundles for YOUR forums! Kickstart your discussions with a Content Bundle. For the entire month of June, use the promo code AJSUMMER 🎉 to receive 50% 🎁 off your content bundle. For example, a package that normally only costs 100 Credits will only cost 50 💰 credits. Full news here.

[Tutorial] Custom forum icons

NickyP

Member
Joined
Jun 23, 2013
Messages
7
Website
divinweb.com
Credits
0
This tutorial will allow you to use separate and unique Custom Forum Icons for each Forum and show images on Index and Forum display pages without running a single query OR without using a single plugin. You need to edit 3 templates.
Go to: ACP > Templates > Your theme's templates > Forumbit templates > forumbit_depth1_cat > and find:
HTML:
<td class="thead" colspan="5">
and Change it to;
HTML:
<td class="thead" colspan="6">

Within the same template find;
HTML:
<td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
and Change it to;
HTML:
<td class="tcat" colspan="3"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>

Save `forumbit_depth1_cat` template.

Now Go to: ACP > Templates > Your theme's templates > Forumbit templates > forumbit_depth2_forum and find;
HTML:
<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 Add the following code just after that;
HTML:
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="images/ficons/{$forum['fid']}.png" alt="" title="" class="" id="" /></td>

Save `forumbit_depth2_forum` template.

On this point you can see an <img src=""> tag with a {$forum['fid']}.png variable. This variable is the key in our tutorial which show a Unique Custom Icon in front of its corresponding Forum ID.

Go to: Cpanel > File Manager > public_html > [ Your Forum Path ] > images > and make a folder with "ficons" name (without quotes).

Now all you need to do is to copy images to be used as Custom Forum Icons (relevant to the Forum Name) and upload them to ./images/ficons/ folder.

NOTE: Image's name should be same to the Forum ID. For example if your Forum ID (where these Icons are going to show) is 2 then you'll have to rename the Icon as 2.png and upload it to images/ficons/ folder. Do the same with rest of the Icons.

Now we have almost finished to show Custom icons on Index. Next, we have to do it on Forumdisplay pages.

Go to: ACP > Templates > Your theme's templates > Forumdisplay templates > forumdisplay_subforums and find;
HTML:
<td class="thead" colspan="5" align="center"><strong>{$lang->sub_forums_in}</strong></td>
and Change it to;
HTML:
<td class="thead" colspan="6" align="center"><strong>{$lang->sub_forums_in}</strong></td>

Within the same template find;
HTML:
<td class="tcat" width="2%">&nbsp;</td>
and the following just after that;
HTML:
<td class="tcat" width="2%">&nbsp;</td>

Save `forumdisplay_subforums` template.

That's it! Hope you liked it :D
 
Advertisement Placeholder
I have bookmarked this.
I will be changing the icons as soon as I get some art work. I am not good at art so I wouldn't dare try to make some stuff by myself. I always though those icons are 'on.png' and "off.png". So, only some global stuff for these two images can be used with mybb.
I did come across certain other tutorials and plugins but they add these ficons along with the on and off images and somehow that never appealed to me. So, I never changed anything so far.
Now though, I am going to see what I can do to show a custom icon for each forum.
Thank you for the tutorial :D
 

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 5 17.9%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 23 82.1%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds