MyBB Community Forums

Full Version: Custom icons for 1 forum that has subforums
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

MikeInToshx

Hi guys,

How can I make custom icons for just 1 category with couple subforums?
I just want the subforums in my forum 'Tutorials' to have custom icons, not the Index!

[attachment=29432]

I do NOT want another row in it near the excisting icon, I want the icon to be replaced with the custom one.

Thankiesssssss!
This is a bit of a hack to get this going, but it works! Smile
The easier version requires Google SEO. From your past threads it seems you already have it installed Smile.



Open Admin CP

Themes > your theme > templates > forumbit templates > forumbit_depth2_forum

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

Replace with:
<div class="{$lightbulb['folder']} ajax_mark_read {$forum_url}" id="mark_read_{$forum['fid']}"></div>

Head to your forum homepage, right click on the icon of the forum you want to change. on the bottom it should say something like "img@mark_read_11.ajax_mark_read.forum-announcements"

Now go to: Admin > themes > your theme > global.css

Add to the bottom:
.on, .off, .off-lock {width: 22px; height: 22px; }
.on { background: url(images/on.gif) no-repeat; }
.off { background: url(images/off.gif) no-repeat; }
.off-lock { background: url(images/off_lock.gif) no-repeat; }
.forum-announcements { background: url(path/to/your/img) no-repeat; }

Replace forum-announcements with the name we got earlier.


You can do this for as many forums as you'd like and is much easier/efficient then using a plugin to do it.

This is based off of the default theme so the 22px may need to be changed accordingly.

MikeInToshx

Hey,
It worked! Thanks so much Smile

Some information:
- the forum announcements were divs so # not a .
- and I had to change my .off an .on image directery because of my theme
- And width & height were 30px

I got 1 issue though, but not with the tutorial.
A lot of the images are not showing in IE and Chrome, all work in firefox.
They are all .png files.

I've had this before, when I was helping someone with his website, but I forgot.. Sad
Anyone knows? Big Grin
Try clearing the browser cache and cookies. Chrome is known to cache data and will not browse fresh contents.

MikeInToshx

Hey,

Didn't work

MikeInToshx

Nobody?

This is how it looks like in Chrome/IE:

[attachment=29460]

And this is what it looks like in Firefox: ( as it should be )

[attachment=29461]
^ background image code for your subforums should be like below
.forum-internet--79 {background: url(images/Internet.png) no-repeat;}

not like this --> #mark_read_79.off.ajax_mark_read.forum-internet--79 {background: url(images/Internet.png) no-repeat;}

MikeInToshx

Cheers bro, u always got the right answer! Big Grin