Announcement

Collapse
No announcement yet.

Conditional To Hide Specific Sub-forum

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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


    • #3
      Hi Floris,

      Which template do I add the conditional in?

      Comment


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

        Comment


        • #5
          Bump

          Comment


          • #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


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

              Comment


              • #8
                Exactly what do you not want to appear? (Pics help )
                Kerry-Anne :)

                Twitter Blog

                www.peterska2.com www.worldnewszone.com www.popularusenetgroups.com www.superclickers.co.uk www.forumsforchrist.com www.browsergameplanet.com

                Comment


                • #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


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

                    Code:
                    <if condition="$forum[forumid]!=X"><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></if>
                    I see you have another thread with simular question, but about subforum in forumdisplay instead.

                    Comment


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

                      Code:
                      <if condition="$forum[forumid]!=X"><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></if>
                      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


                      • #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


                        • #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.
                          http://www.vbulletin.com/forum/showthread.php?t=218202

                          Comment


                          • #14
                            You need to apply the change to forumhome_subforumbit_nopost as well.
                            Kerry-Anne :)

                            Twitter Blog

                            www.peterska2.com www.worldnewszone.com www.popularusenetgroups.com www.superclickers.co.uk www.forumsforchrist.com www.browsergameplanet.com

                            Comment

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