vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   catagory background dependent on ID (https://vborg.vbsupport.ru/showthread.php?t=218621)

jacko_162 07-15-2009 06:23 AM

catagory background dependent on ID
 
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 [DATE]1247648662[/DATE] at [TIME]1247648662[/TIME] ---------------

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 [DATE]1247648740[/DATE] at [TIME]1247648740[/TIME] ---------------

this is my template code;

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 [DATE]1247656666[/DATE] at [TIME]1247656666[/TIME] ---------------

sorted now :)


All times are GMT. The time now is 06:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02274 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete