PDA

View Full Version : catagory background dependent on ID


jacko_162
07-15-2009, 07:23 AM
Is it possible to have different catagory background colours dependent on the catagory?

perhaps using an "IF" statement ??

here is an example;

http://www.ocean-wonders.co.uk/forum_example.gif

--------------- Added 1247648662 at 1247648662 ---------------

this is what i have on the "forumhome_forumbit_level1_nopost" template;

<if condition="in_array($forum[forumid], array(XX))"> Test </if>

where "XX" is the catagory ID,

this works, how would i edit this code to change the bgcolor="" on the template?

--------------- Added 1247648740 at 1247648740 ---------------

this is my template code;

<tbody>

<tr>
<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
<!-- vBSponsors -->
<if condition="$forum[sponsor_enabled] == 1 AND $vboptions[sponsor_global_enable_sponsorship] == 1">
<div style="float:$stylevar[right]">
<if condition="!empty($forum[sponsor_adsense])">
$forum[sponsor_adsense]
<else />
$vboptions[sponsor_global_default_text] <a href="vB.Sponsors/link.php?f=$forum[forumid]" title="$forum[sponsor_name]" target="_blank">
<if condition="$forum[sponsor_banner_enabled] == 1 AND $vboptions[sponsor_global_enable_banners] == 1">
<img src="$forum[sponsor_banner]" alt="$forum[sponsor_name]" border="0" />
<else />
$forum[sponsor_name]
</if></a>
</if>
</div>
</if>
<!-- / vBSponsors -->
</td>
</tr>
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits

</tbody>
</if>


--------------- Added 1247656666 at 1247656666 ---------------

sorted now :)