Alternate TCAT

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • How2Freelance
    New Member
    • Dec 2005
    • 21
    • 3.6.x

    Alternate TCAT

    Sorry to bother you,

    Was wondering if any of you knew how to make it so that after every tcat there is a different one like on TalkFreelance.com. So a condition is like if f=odd class="tcat" <else> f=even class="tcat2" </if> Like that
  • Chroder
    Senior Member
    • Dec 2002
    • 1449

    #2
    Try using some "pseudo conditions". Edit the forumhome_forumbit_level1_nopost template:
    Code:
    [COLOR=Red]<if condition="$tcat_class=='tcat'">
        <if condition="$tcat_class='[B][COLOR=Blue]tcat2[/COLOR][/B]'"></if>
    <else />
        <if condition="$tcat_class='[B][COLOR=Blue]tcat[/COLOR][/B]'"></if>
    </if>[/COLOR]
    <tbody>
        <tr>
            <td class="[COLOR=Red]$tcat_class[/COLOR]" 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>
            </td>
        </tr>
    </tbody>
    <if condition="$childforumbits">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    $childforumbits
    </tbody>
    </if>

    Comment

    • TheMusicMan
      Senior Member
      • Oct 2002
      • 2140
      • 3.7.x

      #3
      You need to use $bgclass. No point in retyping everything on it out again. have a read of this thread:



      Specifically post #9
      John

      Comment

      • How2Freelance
        New Member
        • Dec 2005
        • 21
        • 3.6.x

        #4
        So would:

        Code:
        <if condition="in_array($forumid, array(1,3,5,7,9,11,13,15,17,19))"><tr><td width="8">
        <img src="skypetalk/tcat_left.gif" width="8" height="33" alt="tcat_right" /></td>
                <td height="33px" class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                    <div class="tcatdiv"><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></div>
                </td><td width="8"><img src="skypetalk/tcat_right.gif" width="8" height="33" alt="tcat_right" />
            </tr>
        <else />
        <tr><td width="8">
        <img src="skypetalk/tcat2_left.gif" width="8" height="33" alt="tcat_right" /></td>
                <td height="33px" class="tcat2" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                    <div class="tcatdiv"><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></div>
                </td><td width="8"><img src="skypetalk/tcat2_right.gif" width="8" height="33" alt="tcat_right" />
            </tr>
        </if>
        Work?

        Comment

        • TheMusicMan
          Senior Member
          • Oct 2002
          • 2140
          • 3.7.x

          #5
          Yes, but you don't need it. Read the thread I pointed to above...
          John

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...