How to exclude forums from the "WHAT'S NEW" link in the nav bar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simon templar
    Member
    • Nov 2009
    • 34
    • 3.8.x

    [Forum] How to exclude forums from the "WHAT'S NEW" link in the nav bar

    Hi ,

    Anyone know how to do that ?

    i tried to follow http://www.vbulletin.com/forum/showt...From-New-Posts with no success..

    Thanks
  • vivamexico55
    Senior Member
    • Mar 2005
    • 1018
    • 3.0.7

    #2
    Originally posted by simon templar
    Hi ,

    Anyone know how to do that ?

    i tried to follow http://www.vbulletin.com/forum/showt...From-New-Posts with no success..

    Thanks
    Well, that's a post from 2006, so it probably shouldn't be followed...

    Sorry, I don't know the answer, but I wanted to tell you that you shouldn't follow the advice in that post.

    Comment

    • Lynne
      Former vBulletin Support
      • Oct 2004
      • 26255

      #3
      That thread is still valid in that you just add "&exclude=X,Y,Z" to the end of the search link in the template (if you are going to try it in the browser, remember to change & to just &).

      Please don't PM or VM me for support - I only help out in the threads.
      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
      Want help modifying your vbulletin forum? Head on over to vbulletin.org
      If I post CSS and you don't know where it goes, throw it into the additional.css template.

      W3Schools <- awesome site for html/css help

      Comment

      • struff
        Member
        • Sep 2008
        • 43
        • 3.7.x

        #4
        Originally posted by Lynne
        That thread is still valid in that you just add "&exclude=X,Y,Z" to the end of the search link in the template (if you are going to try it in the browser, remember to change & to just &).
        I looked at that but I don't find the exact wording in my template. Does it matter?

        Thanks.

        Comment

        • struff
          Member
          • Sep 2008
          • 43
          • 3.7.x

          #5
          I have 7 instances of "getnew" (rather than 2 that are in the old thread). Should I edit all 7?

          Comment

          • Lynne
            Former vBulletin Support
            • Oct 2004
            • 26255

            #6
            If you want to exclude the forums in all 7 of those getnew searches, then yes, you should add it to all 7.

            Please don't PM or VM me for support - I only help out in the threads.
            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
            Want help modifying your vbulletin forum? Head on over to vbulletin.org
            If I post CSS and you don't know where it goes, throw it into the additional.css template.

            W3Schools <- awesome site for html/css help

            Comment

            • struff
              Member
              • Sep 2008
              • 43
              • 3.7.x

              #7
              I'm sorry to ask so many questions about this but I want to be sure that I am not breaking anything. In my template I have things like this, which is a little different from what's in the old instructions:

              <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'">
              <vb:if condition="$show['member']">
              <li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a>
              <ul class="floatcontainer">
              <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
              <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
              <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Event">{vb:rawphrase new_events_nav}</a></li>
              {vb:raw template_hook.navbar_getnew_menu}
              <li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread">{vb:rawphrase mark_forums_read}</a></li>
              </ul>
              So is it safe to add the exclude after all of those getnew's?

              Comment

              • Lynne
                Former vBulletin Support
                • Oct 2004
                • 26255

                #8
                Try it and see. Save a copy and then change it. Or try it on your test site first.

                Please don't PM or VM me for support - I only help out in the threads.
                vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                Want help modifying your vbulletin forum? Head on over to vbulletin.org
                If I post CSS and you don't know where it goes, throw it into the additional.css template.

                W3Schools &lt;- awesome site for html/css help

                Comment

                • Martyn_s30v
                  Member
                  • Nov 2009
                  • 47
                  • 4.0.0

                  #9
                  This does work, I use it myself.

                  As an example from your navbar template, look for examples of "contenttype=vBFor um_Post" and change this...

                  <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post">{vb:rawphrase new_posts_nav}</a></li>
                  To this...

                  <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post&amp;exclude=X,Y,Z">{vb:rawphrase new_posts_nav}</a></li>
                  ...where X,Y,Z are the forum numbers you want to exclude.

                  FYI...

                  &amp;include=X,Y,Z

                  ...also works, obviously anything not included is excluded.

                  There are lots of instances (10?) of "getnew" and "getdaily" in the navbar template. This is because the submenus change depending on what parent tab you are viewing. So if you want to exclude some forums from a getnew search, you have to exclude them in all instances of the search for each tab/section.

                  If you ONLY want to change the "What's New" search, then I think it's this bit near the end of the navbar template....

                  <vb:elseif condition="$show['member']" />
                  <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post&amp;exclude=X,Y,Z">{vb:rawphrase getnew_tab}</a></li>
                  <vb:else />
                  <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post&amp;exclude=X,Y,Z">{vb:rawphrase getnew_tab}</a></li>
                  </vb:if>
                  {vb:raw template_hook.navtab_end}
                  Changing "getnew" will exclude the specified forums for logged in users.
                  Changing "getdaily" will exclude the specified forums for logged out & unregistered users.


                  You can probably also put the exclude/include before the contentype, I've no idea if that makes any difference or not.

                  HTH
                  Last edited by Martyn_s30v; Wed 27 Jan '10, 6:07am.

                  Comment

                  • Sfitzgerald
                    Senior Member
                    • Feb 2008
                    • 125
                    • 3.8.x

                    #10
                    They as in VB just need to add this is a feature - when you create a forum or edit a forum you should have a yes or no check off box - I am not a coder and I have never got this right since VB3.0 seems like a simple thing to do just make a feature for it

                    Comment

                    • kofoid
                      New Member
                      • Feb 2007
                      • 21
                      • 3.5.x

                      #11
                      THANK YOU!!!!!!! Works on www.myoasis.net.

                      There is a mod on vb.org and I am going to link to this. Much easier!

                      The Oasis
                      A harmonious community

                      Comment

                      • vauge
                        Senior Member
                        • Oct 2004
                        • 181
                        • 3.8.x

                        #12
                        How does one remove the "type" under the search breadcrumb?

                        "Type: Posts; Excluded Forums: abc, def, ghi etc..."

                        Thanks!
                        ??

                        Comment

                        • Dirt Bike Addict
                          Senior Member
                          • May 2010
                          • 828
                          • 4.1.x

                          #13
                          Originally posted by vauge
                          How does one remove the "type" under the search breadcrumb?

                          "Type: Posts; Excluded Forums: abc, def, ghi etc..."

                          Thanks!
                          I'd like to know this myself.

                          Comment

                          • Lynne
                            Former vBulletin Support
                            • Oct 2004
                            • 26255

                            #14
                            You can remove that from the search_resultlist template:
                            HTML Code:
                                    <p class="description">
                                        {vb:raw criteriaDisplay}        
                                    </p>
                            (Or write a plugin to set $criteriaDisplay to '' (null) just before spitting out the template? Not sure if that would work though. It's something you can try and if you don't know how to do it, you should ask over on vbulletin.org, the modification site. )

                            Please don't PM or VM me for support - I only help out in the threads.
                            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                            Want help modifying your vbulletin forum? Head on over to vbulletin.org
                            If I post CSS and you don't know where it goes, throw it into the additional.css template.

                            W3Schools &lt;- awesome site for html/css help

                            Comment

                            • Dirt Bike Addict
                              Senior Member
                              • May 2010
                              • 828
                              • 4.1.x

                              #15
                              Thanks Lynne, that worked.

                              Comment

                              Related Topics

                              Collapse

                              Working...