MyBB Community Forums
Custom Forum Icons ~ A Unique icon for Each Forum - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: Custom Forum Icons ~ A Unique icon for Each Forum (/thread-92128.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


Custom Forum Icons ~ A Unique icon for Each Forum - Yaldaram - 2011-04-13

This tutorial will allow you to use separate and unique Custom Forum Icons for each Forum and show images on Index and Forumdisplay 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;
<td class="thead" colspan="5">
and Change it to;
<td class="thead" colspan="6">

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

Save [i]forumbit_depth1_cat[/i] template.

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

Save [i]forumbit_depth2_forum[/i] 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;
<td class="thead" colspan="5" align="center"><strong>{$lang->sub_forums_in}</strong></td>
and Change it to;
<td class="thead" colspan="6" align="center"><strong>{$lang->sub_forums_in}</strong></td>

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

Save [i]forumdisplay_subforums[/i] template.

Now you can see something like this;
       


Thanks. --- [Image: rep.gif]


RE: Custom Forum Icons ~ A Unique icon for Each Forum - zephiroth - 2011-04-13

nice tutorials sir yaldaram


RE: Custom Forum Icons ~ A Unique icon for Each Forum - Yaldaram - 2011-04-13

Thanks for the feedback.


RE: Custom Forum Icons ~ A Unique icon for Each Forum - lucasbytegenius - 2011-04-13

Similar to the other thread out there, but this one doesn't ask you to replace entire templates Smile
Good job.


RE: Custom Forum Icons ~ A Unique icon for Each Forum - Yaldaram - 2011-04-13

Thanks for the feedback.


RE: Custom Forum Icons ~ A Unique icon for Each Forum - Hitman - 2011-04-15

I hate that! I posted a tutorial of another forum!


RE: Custom Forum Icons ~ A Unique icon for Each Forum - Yaldaram - 2011-04-15

(2011-04-15, 10:25 AM)Hitman Wrote: I hate that! I posted a tutorial of another forum!

Hmm.. ??


RE: Custom Forum Icons ~ A Unique icon for Each Forum - Yaldaram - 2011-05-04

Thanks.


RE: Custom Forum Icons ~ A Unique icon for Each Forum - kadhafi - 2011-05-04

Awesome yaldaram, finally found thist tut..By the way what if i will remove the original icon? I mean the on,off,offlock? And replace with the custom icon just like yaldaram.com


RE: Custom Forum Icons ~ A Unique icon for Each Forum - Yaldaram - 2011-05-04

(2011-05-04, 04:43 AM)kadhafi Wrote: Awesome yaldaram, finally found thist tut..By the way what if i will remove the original icon? I mean the on,off,offlock? And replace with the custom icon just like yaldaram.com

From forumbit_depth2_forum and forumbit_depth2_cat find and remove:

<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>