No announcement yet.

How to exclude a folder/forum from the main search?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to exclude a folder/forum from the main search?


    I know that I can include restrictions in the JSON used for the search.
    { "exclude":[1,2,3,4] }
    My objective is not showing certain forums as search result.

    However, when I log in the forum with the super admin account and I try to edit the navigation bar (this navigation bar), I only see options to restrict search results of the Sub Navigation Bar.

    Where do I edit the search used in the main search (magnifying glass)?

    Thanks in advance!

  • #2
    That will require custom coding. Do you always want to exclude those forums every time you search in all instances?

    GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!


    • #3
      Yes, I always want to exclude those forums. However, I only need to exclude those forums in the main search.

      I recently split my forum in two, but both new databases still contain all old posts done before the moment I split the old forum, then I simply hide what I don't want to be shown in the main page. Now I want that results of "new forum 2" not be shown in "new forum 1".
      One of the solutions would be excluding from search.
      Other solution would be physically remove those forums from the DB, but when I tried (in a test environment) to remove big forums (20,000 to 150,000 posts), the routine would stop and some nodes would remain in the DB.


      • #4
        Hello, everyone!

        In case anyone is looking for the same solution, there is an option for Channel Rights and you can set view rights for specific groups not to be able to view certain content.
        So you can enable for "registered users" and "unregistered users" not to see the forum content.



        • #5
          I've added a Jira to have a "Can Search" channel permission added. You can find it here:

          Searching and Viewing are two different use cases in my opinion.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API


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