MyBB Community Forums

Full Version: Custom icons for defined FID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I am using Mybb 1.8.3.
I've edited functions_forumlist.php to show custom icons for only pre-defined FID's. It works perfectly, but... it ignores the 'default' values. Instead of default icons (off/on/offlock) I get the 404 error images. It seems to ignore my default reference.

http://pastebin.com/kVCXk1Xq <- code
http://myhpspl.pl/new/ <- forum adress
Is there any solution for this ?

Regards
modifying MyBB system source files is not recommended.

I'd suggest to modify templates code to display required folder icons
this guidance should work for MyBB 1.8.x , though it was provided for earlier version of MyBB
Actually I do not understand why it could cause any problems.
By the way it is the suggested way to 'custom icons' from the MyBB Polish Support team Wink

EDITED///

This guidance provides custom icons for ALL FID's.
^ suggested guidance can be used for specific forums. blank image may be added for the other forums.
How to do it then ?

If code responsible for icon is looking like this:
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="images/{$forum['fid']}.png" /></td>

Then how I am able to make any exceptions?
^ suppose you do not need custom images for fid 1, 3, 5
then you can have a 1px x 1px blank image for 1.png, 3.png, 5.png .. etc
I need the custom images for the fids mentioned in the case I've written earlier(there are the main forums on the index page), and also I need the default off/on/offlock images for sub-forums with functions with which they were meant for in the vanilla version.
In mybb 1.8.* are no img tags for forum status, there are classes now.

Code from your site
<span class="forum_status forum_2 ajax_mark_read" title="Dział nie zawiera nowych postów" id="mark_read_2"></span>

Add new classes to global.css and call your images

e.g.:
.forum_2 {
	background: url(images/imageforforum2.png);
}
Thank you all for the replies Smile
I guess i will do this by editing code for custom thead: <td class="thead_{$forum['fid']} thead_g" colspan="5">.