Exclude forums from search results

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mrs.T
    Senior Member
    • Nov 2007
    • 1210
    • 6.0.X

    #16
    Well I tried it using the code from Wayne's post changing where the excluded channel in the example as '35' (as In Omnibus explained) to our own node id 282739 but when I clicked today's posts it said there was nothing that met the criteria. I've replaced our original code for now.

    This is what I used:

    search?searchJSON={"date":{"from":"lastDay"},"view&quot ;:"topic","sort":{"lastcontent":"desc"},"excl ude":[282739],"exclude_type":["vBForum_PrivateMessage","vBForum_VisitorMessage","vBForum_Report ","vBForum_Redirect"]}

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 73979

      #17
      Make sure there are no spaces in what you use.
      Translations provided by Google.

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

      Comment

      • Mrs.T
        Senior Member
        • Nov 2007
        • 1210
        • 6.0.X

        #18
        Originally posted by Wayne Luke
        Make sure there are no spaces in what you use.
        I went though it carefully twice and no spaces. Still didn't work.

        Probably a stupid question but in the box where you enter the text it is pre filled in with http, I erased that and just put the code. Should I have left it in?

        Comment

        • Mrs.T
          Senior Member
          • Nov 2007
          • 1210
          • 6.0.X

          #19
          Another thought is, once I've figured out how to exclude it from today's posts, I will also need to exclude it from New Topics

          Will it also come up in a general search too?

          What we are trying to do is create a section only accessible if you know the link, so it must not be found by any search.

          Feeling a bit out of our depth editing the search options, any advice appreciated.

          Comment

          • Mrs.T
            Senior Member
            • Nov 2007
            • 1210
            • 6.0.X

            #20
            ignore all that, it didn't work after all
            Last edited by Mrs.T; Wed 11 Jul '18, 6:32am.

            Comment

            • Wayne Luke
              vBulletin Technical Support Lead
              • Aug 2000
              • 73979

              #21
              What is your current JSON string? Please post it in a reply inside [code] tags.
              Translations provided by Google.

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

              Comment

              • Mrs.T
                Senior Member
                • Nov 2007
                • 1210
                • 6.0.X

                #22
                Originally posted by Wayne Luke
                What is your current JSON string? Please post it in a reply inside [code] tags.
                Hi Wayne

                The 'Todays posts' is

                Code:
                search?searchJSON=%7B%22last%22%3A%7B%22from%22%3A%22lastDay%22%7D%2C%22view%22%3A%22topic%22%2C%22starter_only%22%3A+1%2C%22sort%22%3A%7B%22lastcontent%22%3A%22desc%22%7D%2C%22exclude_type%22%3A%5B%22vBForum_PrivateMessage%22%5D%7D
                new topics is:

                Code:
                search?searchJSON=%7B%22view%22%3A%22topic%22%2C%22unread_only%22%3A1%2C%22sort%22%3A%7B%22lastcontent%22%3A%22desc%22%7D%2C%22exclude_type%22%3A%5B%22vBForum_PrivateMessage%22%5D%7D
                I can't find the general search code, everyone talks about the advanced editor on the search module but I don't see it.


                Yesterday I tried your code from post 5, replacing 35 with the node we want to exclude 282739. Your first code brought in search results but did not exclude it. The second example just said "no search results meet your criteria". I made sure there were no spaces in the code.

                Comment

                • Wayne Luke
                  vBulletin Technical Support Lead
                  • Aug 2000
                  • 73979

                  #23
                  I don't see an exclude clause in either of those strings.
                  Translations provided by Google.

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

                  Comment

                  • Mrs.T
                    Senior Member
                    • Nov 2007
                    • 1210
                    • 6.0.X

                    #24
                    Originally posted by Wayne Luke
                    I don't see an exclude clause in either of those strings.
                    Maybe I misunderstood - you asked for our current JSON string and that's what it is. It's what was in when we moved to cloud.

                    We want to add an exclude to our current string so we can exclude one channel.

                    We don't know how to do that and every example we try doesnt work, so we have to remove it and put our current string back.

                    Comment

                    • Mrs.T
                      Senior Member
                      • Nov 2007
                      • 1210
                      • 6.0.X

                      #25
                      OK so this is what we've tried that didn't work, if that is what you needed to know.

                      The following gave search results but did not exclude the node from showing in search.

                      Code:
                      search?searchJSON={"date":{"from":"lastDay"},"view":"topic","sort":{"lastcontent":"desc"},"exclude":[282739],”exclude_type":["vBForum_PrivateMessage","vBForum_VisitorMessage","vBForum_Report","vBForum_Redirect"]}
                      The following didn't work at all and gave a "nothing met your search criteria" result

                      Code:
                      search?searchJSON={"date":{"from":"lastDay"},"view":"topic","sort":{"lastcontent":"desc"},"exclude":[282739],"exclude_type":["vBForum_PrivateMessage","vBForum_VisitorMessage","vBForum_Report","vBForum_Redirect"]}

                      Comment

                      • webgeek247
                        Senior Member
                        • Mar 2006
                        • 291
                        • 5.7.X

                        #26
                        I entered it like this

                        Code:
                         search?searchJSON={"date":{"from":"lastDay"},"view":"topic","sort":{"lastcontent":"desc"},"exclude":[35,93],"exclude_type":["vBForum_PrivateMessage","vBForum_VisitorMessage","vBForum_Report","vBForum_Redirect"]}
                        That excludes nodes 35 and 93. The parent categories for us. You may replace those with the nodes you want to exclude.

                        PS I see you are using Cloud and also in the previous post the code I got working in Site Builder was

                        Code:
                         
                         search?searchJSON={"date":{"from":"lastDay"},"view":"topic","sort":{"lastcontent":"desc"},"exclude":[35],"exclude_type":["vBForum_PrivateMessage","vBForum_VisitorMessage","vBForum_Report","vBForum_Redirect"]}
                        You would need to replace node 35 with your own and add extra ones if needed. But not sure if that works with the Cloud one as I don't have the Cloud version.

                        Good luck.
                        Web Hosting Forum | Fastest Hosting | Backup Storage

                        Comment

                        • Wayne Luke
                          vBulletin Technical Support Lead
                          • Aug 2000
                          • 73979

                          #27
                          Originally posted by webgeek247
                          But not sure if that works with the Cloud one as I don't have the Cloud version.
                          There is no "Cloud Version". They are using the same software that is downloaded. Everything is controlled through permissions and Products added to vBulletin.

                          Translations provided by Google.

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

                          Comment

                          • Mrs.T
                            Senior Member
                            • Nov 2007
                            • 1210
                            • 6.0.X

                            #28
                            Thanks for your help webgeek247 To edit in Cloud I go to site builder and choose the navigation bar, editing the search we have there for "today's posts".

                            Tried your code and it brings in search results but still includes the node we want to exclude.

                            To exclude from all searches did you also have to edit the main search and also "new topics"?

                            Comment

                            • webgeek247
                              Senior Member
                              • Mar 2006
                              • 291
                              • 5.7.X

                              #29
                              Originally posted by Wayne Luke

                              There is no "Cloud Version". They are using the same software that is downloaded. Everything is controlled through permissions and Products added to vBulletin.
                              Sounds like they are using Cloud version going their previous post and the one from page 1

                              OK thanks Wayne. It was just like that when we moved to Cloud so I left it.
                              Web Hosting Forum | Fastest Hosting | Backup Storage

                              Comment

                              • webgeek247
                                Senior Member
                                • Mar 2006
                                • 291
                                • 5.7.X

                                #30
                                Originally posted by MrsTiggywinkle
                                Thanks for your help webgeek247 To edit in Cloud I go to site builder and choose the navigation bar, editing the search we have there for "today's posts".

                                Tried your code and it brings in search results but still includes the node we want to exclude.

                                To exclude from all searches did you also have to edit the main search and also "new topics"?
                                What is the code you are using now? Which node IDs/threads or categories are you trying to exclude?
                                Web Hosting Forum | Fastest Hosting | Backup Storage

                                Comment

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