(Updated Feb/2009) Mybb 1.2x/1.4x Pure CSS "Custom Forum Icons" with only 1 image
#1
Lightbulb 
This is a nice feature if you want to use custom icons and don't want to kill your CPU usage (if is a Shared Host) - Without <img> tags to each Forum there will be lower http requests.

[Image: custom-forum-icons-mybb-1_44.png]

Updated in Feb/09


(I) New Style Sheet

Create this CSS in ACP => Themes => Edit Theme => Add Stylesheet:

custom_forum_icons.css

[Image: add_stylesheet.gif]

Quote:CSS Example is attached to download with the complete tutorial

This new style must be conected only to forumdisplay.php and index.php

[Image: Css-configuration.gif]


[II] Template Edit
Go to ACP => Templates & Style => Templates => Expand your Template

Expand "Forum Bit Templates":

forumbit_depth2_forum

Find:
Quote:
<img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />

Replace with:

Quote:
<!--Start - CSS Custom Forum Icons-->
<h2 id="{$lightbulb['folder']}_{$forum['fid']}"><a href="forumdisplay.php?fid={$forum['fid']}" rel="nofollow"><span>status</span></a></h2>
<!--End CSS Custom Forum Icons -->



[III] Background Image

Put "custom_forum_icons.png" in "\images\yourtheme\" folder

[Image: custom_forum_icons.png]

..


Thanks Labrocca for Custom Forum Icons for 1.2x and texasli for the code in mybb 1.4

other ways to do it:
http://community.mybboard.net/thread-34606.html
http://www.mybbcentral.com/thread-1663.html


..


Attached Files
.zip   Tutorial mybb custom forum icons with CSS.zip (Size: 54.17 KB / Downloads: 728)
Reply


Messages In This Thread
(Updated Feb/2009) Mybb 1.2x/1.4x Pure CSS "Custom Forum Icons" with only 1 image - by aglioeolio - 2008-08-08, 03:42 PM
CSS FAQ - by Pitter - 2008-09-25, 09:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)