Add/Change Category Border Color per Category ID - MyBB

In the "forumbit_depth1_cat" template, use this code:

Code:
class="trow_{$forum['fid']}"

Then, in the global.css file, add this CSS:

Code:
.trow_X {
border: 1px solid #000000;
width: 100%;
margin: auto auto;
}

Change X to the forum categories ID. Duplicate the CSS for each category ID and change the color accordingly.
 
Where exactly should I add this code
class="trow_{$forum['fid']}"

In which place on the template


<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td><td class="{$bgcolor}" align="center" valign="top" width="1"><img src="Forum_Icons/{$forum['icon']}" alt="{$forum['name']}" /></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>
 
Woops. I have updated my first other post, I made a mistake! I'll post it here too:

In the "forumbit_depth1_cat" template, replace:

Code:
class="tborder"
with
Code:
class="trow_{$forum['fid']}"

This should be at the very top of the template.

Then, in the global.css file, add this CSS:

Code:
.trow_X {
border: 1px solid #000000;
width: 100%;
margin: auto auto;
}

Change X to the forum categories ID. Duplicate the CSS for each category ID and change the color accordingly.
 
Go to your home page and hover over the categories. Example:

TGZ Rules = 1

Community Zone = 3

Creative Zone = 72

Hover over the rest and you will find it at the end of the link:

thegame-zone.com/forumdisplay.php?fid=XX
 
Yes..I figured that...
Thank you very very much for your help J.
I appreciate it a lot...
 
Back
Top Bottom