Conditional To Hide Specific Sub-forum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soletrader
    Senior Member
    • Jul 2006
    • 559

    Conditional To Hide Specific Sub-forum

    How do I hide one specific sub forum from displaying on the forum page?

    I do not want to eliminate subforums altogether. Just need to have a specific forum not display its subforums.

    Thanks.
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    <if condition="$forumid != 'x'">show normal code</if>

    if the forum id does not equal x (replace with number of forum you want to hide) then show the sub forum. Meaning, if it is x, then it won't run the code.

    Comment

    • soletrader
      Senior Member
      • Jul 2006
      • 559

      #3
      Hi Floris,

      Which template do I add the conditional in?

      Comment

      • Deidre
        Member
        • Jun 2007
        • 31

        #4
        Floris. I need the info as well. I'm not sure how to do it.

        Comment

        • soletrader
          Senior Member
          • Jul 2006
          • 559

          #5
          Bump

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            FORUMHOME template.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • soletrader
              Senior Member
              • Jul 2006
              • 559

              #7
              Can you please explain this more specifically? Where in the forumhome template will the conditional appear?

              Comment

              • peterska2
                Senior Member
                • Oct 2003
                • 8869
                • 3.7.x

                #8
                Exactly what do you not want to appear? (Pics help )

                Comment

                • soletrader
                  Senior Member
                  • Jul 2006
                  • 559

                  #9
                  All I am trying to do i hide a spefic subforum from appearing in the index page. In my website http://www.traderslaboratory.com/forums/ i want a specific forum to hide its subforum.

                  Do you need further explanation?

                  Comment

                  • Jose Amaral Rego
                    Senior Member
                    • Feb 2005
                    • 11058
                    • 1.1.x

                    #10
                    # find in template: forumhome_subforumbit_post
                    # add conditional statement around template
                    # replace 'X' with forum identification number

                    Code:
                    [COLOR="Red"]<if condition="$forum[forumid]!=[COLOR="Green"]X[/COLOR]">[/COLOR][COLOR="Blue"]<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>[/COLOR][COLOR="#ff0000"]</if>[/COLOR]
                    I see you have another thread with simular question, but about subforum in forumdisplay instead.

                    Comment

                    • soletrader
                      Senior Member
                      • Jul 2006
                      • 559

                      #11
                      Originally posted by Jose Amaral Rego
                      # find in template: forumhome_subforumbit_post
                      # add conditional statement around template
                      # replace 'X' with forum identification number

                      Code:
                      [COLOR="Red"]<if condition="$forum[forumid]!=[COLOR="Green"]X[/COLOR]">[/COLOR][COLOR="Blue"]<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>[/COLOR][COLOR="#ff0000"]</if>[/COLOR]
                      I see you have another thread with simular question, but about subforum in forumdisplay instead.
                      Thank you but that did not do the trick. Is there anything else I can do? Any help from vbulletin staff?

                      Comment

                      • Andy Huang
                        Senior Member
                        • Feb 2004
                        • 4602

                        #12
                        What are you filling in place of X? The above suggested edit should do the trick for you, please paste what you have here so we can take a look for you.
                        Best Regards,
                        Andy Huang

                        Comment

                        • Jose Amaral Rego
                          Senior Member
                          • Feb 2005
                          • 11058
                          • 1.1.x

                          #13
                          It goes the same with the other thread of yours, it does work as I have test this on unmodified and heavily modified style and does what you want it to do. 'Hide a specific subforum' just need to follow the instruction carefully.

                          Comment

                          • peterska2
                            Senior Member
                            • Oct 2003
                            • 8869
                            • 3.7.x

                            #14
                            You need to apply the change to forumhome_subforumbit_nopost as well.

                            Comment

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