• Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Members
  • Team
  • Help
  • More
    • YouTube
    • Facebook
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Members Team Help
    More Subscribe YouTube Facebook
    D&D Forums - MyBB Plugins & Themes MyBB General Discussions Tricks & Tutorials Custom Forum Icons ~ A Unique icon for Each Forum

     
    • 0 Vote(s) - 0 Average
    Custom Forum Icons ~ A Unique icon for Each Forum
    AmazOuz
    Offline

    Administrator

    Posts: 272
    Threads: 34
    Joined: Oct 2017
    Reputation: 11
    #1
    09-27-2022, 01:16 AM (This post was last modified: 09-27-2022, 01:18 AM by AmazOuz.)
    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;
    PHP Code:
    <td class="thead" colspan="5"> 
    and Change it to;
    PHP Code:
    <td class="thead" colspan="6"> 

    Within the same template find;
    PHP Code:
    <td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td> 
    and Change it to;
    PHP Code:
    <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;
    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 Add the following code just after that;
    PHP Code:
    <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;
    PHP Code:
    <td class="thead" colspan="5" align="center"><strong>{$lang->sub_forums_in}</strong></td> 
    and Change it to;
    PHP Code:
    <td class="thead" colspan="6" align="center"><strong>{$lang->sub_forums_in}</strong></td> 

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

    Save `forumdisplay_subforums` template.

    Previews in attachements

    Source : https://community.mybb.com/thread-92128.html


    Attached Files Thumbnail(s)
           
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)



    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    D&D Company

    Home · Members · Team · Help · Contact

    © D&D - Powered by MyBB

    Paris, France

    07 53 04 58 86

    business@developement.design

    About the company We are a growing company of web developers & designers, specialized in MyBB plugins & themes. Our work is our propaganda.

    Linear Mode
    Threaded Mode