08-08-2008, 03:42 PM
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.
(I) New Style Sheet
Create this CSS in ACP => Themes => Edit Theme => Add Stylesheet:
custom_forum_icons.css
[II] Template Edit
Go to ACP => Templates & Style => Templates => Expand your Template
Expand "Forum Bit Templates":
forumbit_depth2_forum
Replace:
with:
[III] Background Image and Screenshot
Put "custom_forum_icons.png" in "\images\yourtheme\" folder
See attachments
[attachment=10361]
[attachment=10362]
..
Thanks Labrocca for Custom Forum Icons for 1.2x and texasli for the code in mybb 1.4
..
(I) New Style Sheet
Create this CSS in ACP => Themes => Edit Theme => Add Stylesheet:
custom_forum_icons.css
Quote:
/* CSS Custom Forum Icons to Mybb 1.4
Customization with less http requests
http:\\agleoeoleo.wordpress.com
*/
/* Margin */
#on_1, #off_1, #offlock_1,
#on_2, #off_2, #offlock_2,
#on_3, #off_3, #offlock_3 { margin:0; padding:0; }
/* New Threads? Lighten up */
#on_1 a,
#on_2 a,
#on_3 a {filter:alpha(opacity=100);-moz-opacity:1.0;
}
/* no new messages? Less attention then */
#off_1 a,
#off_2 a,
#off_3 a {filter:alpha(opacity=25);-moz-opacity:.25;
}
/* hidden span */
#on_1 a span, #off_1 a span, #offlock_1 a span,
#on_2 a span, #off_2 a span, #offlock_2 a span,
#on_3 a span, #off_3 a span, #offlock_3 a span { display:none }
/* All ppl background */
#on_1 a, #off_1 a,
#on_2 a, #off_2 a,
#on_3 a, #off_3 a,
#offlock_1 a,
#offlock_2 a,
#offlock_3 a {display:block;
width:80px; height:70px;
margin:0; padding:0;
background: url(images/yourtheme/custom_forum_icons.png);
text-decoration: none;}
/* Background position - Make you way here */
#on_1 a, #off_1 a { background-position: 0 0; }
#on_2 a, #off_2 a { background-position: 0 -147px; }
#on_3 a, #off_3 a { background-position: 0 -222px; }
/* Locked Forum - Same to all ppl */
#offlock_1 a,
#offlock_2 a,
#offlock_3 a { background-position: 0 -70px;
}
[II] Template Edit
Go to ACP => Templates & Style => Templates => Expand your Template
Expand "Forum Bit Templates":
forumbit_depth2_forum
Replace:
Quote:
<img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />
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 and Screenshot
Put "custom_forum_icons.png" in "\images\yourtheme\" folder
See attachments
[attachment=10361]
[attachment=10362]
..
Thanks Labrocca for Custom Forum Icons for 1.2x and texasli for the code in mybb 1.4
..
