MyBB Community Forums

Full Version: Template modification (custom forum icons)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'd like to have for some forums a different forum icon, custom ones. But for the most of them just the default one.

Now I thought something about creating a little PHP script (with the php plugin enabled) so it would like something like:

<if !empty($theme['imgdir']}/ficon/icon_default_$lightbulb['folder'].png) then>
<img src="{$theme['imgdir']}/ficon/icon_default_{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />
<else>
<img src="{$theme['imgdir']}/ficon/icon_{$forum['fid']}_{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />
</if>

I want it to do that when there is no image defined, that it takes the default icon.
But then I get a shitload of errors..

I know the basics of php, but I think I miss a crucial thing..

Thanks in advance!

Tankey

I just thought, it may be better if i can do smth like:
if the category=24 (forum ID), then all forums under this category have the same icons.

Is that possible somehow?

Thanks in advance.
If I recall correctly, there's actually a tutorial to do this in the tutorial section. I'll just try find it.

EDIT: Here we go: http://community.mybb.com/thread-92128.h...orum+icons - it might help you do what you're wanting to do Smile