Announcement

Collapse
No announcement yet.

How do I: Exclude forums from the Find All search

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

  • How do I: Exclude forums from the Find All search

    Hello everyone,

    Since our board has a dedicated forum for listing the infractions the users receive, the Find All Posts By / Find All Threads Started By searches for a Moderator / Admin / Supermoderator get polluted with all the threads created in the Infraction forum.

    So basically, we want to exclude that particular forum from the above mentioned searches.

    The default search code in the MEMBERINFO template looks like this:

    Code:
    <a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1&amp" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a>
    and we've already tried the "&exclude" conditional, which we use for the Get New Posts search, like this:

    Code:
    <a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1&amp;&exclude=117" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a>
    since the forumid we want to exclude is 117, but the threads are still listed.

    Any help would be greatly appreciated.

  • #2
    Disable this for the infraction forum:

    Admin CP -> Forums & Moderators -> Forum Manager -> Edit Forum -> Index New Posts in Search Engine

    Comment


    • #3
      Thanks for the tip, but we need something that will exclude the threads that have already been created as well.

      Comment


      • #4
        I wonder if you update the counters under maintenance if that would do it?

        You might want to get an official response to be sure
        Archive: 1 ~ 2 ETC in the feedback forums that were closed.

        Comment


        • #5
          It should exclude existing threads too. Otherwise you can rebuild your search index. Check which search engine you are using:

          Admin CP -> vBulletin Options -> Search Type (on the left, not the right)

          If you are using fulltext then run a repair to ensure that the search index is up-to-date:

          Admin CP -> Maintenance -> Repair / Optimize Tables

          If you are using the vBulletin search engine then you can run a rebuild in your:

          Admin CP -> Maintenance -> Update Counters -> Rebuild Search Index

          Comment


          • #6
            Well, a rebuild of the Search Index is definitely out of the question, because it takes way too long to complete and we really can't afford the downtime.

            It's kind of odd though that there isn't a conditional like the exclude one for New Posts for these types of searches, it would be very useful.

            Comment


            • #7
              Im wondering the same thing. We dont want to totally prevent search engine from exlcluding the 'reported posts' forum (or any forum for that matter) since there are instances (like keeping a record of reported posts and infractions issued) that we need to particularly search that forum alone.



              this the most recent thread regarding my concern so even if its ancient old im bringing it back
              vBulletin 4.2.5 | PHP 7.0.31 | MariaDB 10.2.17

              Comment


              • #8
                Originally posted by Silviu View Post
                Hello everyone,

                Since our board has a dedicated forum for listing the infractions the users receive, the Find All Posts By / Find All Threads Started By searches for a Moderator / Admin / Supermoderator get polluted with all the threads created in the Infraction forum.

                So basically, we want to exclude that particular forum from the above mentioned searches.

                The default search code in the MEMBERINFO template looks like this:

                Code:
                <a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1&amp" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a>
                and we've already tried the "&exclude" conditional, which we use for the Get New Posts search, like this:

                Code:
                <a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1&amp;&exclude=117" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a>
                since the forumid we want to exclude is 117, but the threads are still listed.

                Any help would be greatly appreciated.
                You have a typo in the 2nd code box, you have an extra &... it should be:

                Code:
                <a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1&amp;exclude=117" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a>
                I'm not sure if it will work on 3.6 or not but this is the correct way of trying at least.

                Comment

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