Construction of search links (search last week, specific forum etc.)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goyo
    Senior Member
    • Dec 2002
    • 304
    • 3.8.11

    [Forum] Construction of search links (search last week, specific forum etc.)

    Dear support or smart people with vB4 search.php knowledge.
    This info must be somewhere out there but simply couldn't find it yet.

    I'd need to know the vB4 equivalents of vB3 construction of search links especially these:
    • Find new topics/replies from last week and last 30 days.
    • Find topics from specified forum(s) from the last 24 hours, last week and last month
      (vb3 example: search.php?do=getdaily&days=30&f=53 ).
    • Find topics with given prefix(es).


    Any help appreciated!
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    They should be pretty much the same. Look at the Advanced Search form and those are the variables that you can submit.
    Translations provided by Google.

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

    Comment

    • angeljs
      Senior Member
      • Jun 2008
      • 128
      • 3.7.x

      #3
      Is there any way to add specific forums to the advanced search?

      Comment

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

        #4
        Originally posted by angeljs
        Is there any way to add specific forums to the advanced search?
        All forums that are marked as searchable should already be listed on the Advanced Search.
        Translations provided by Google.

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

        Comment

        • angeljs
          Senior Member
          • Jun 2008
          • 128
          • 3.7.x

          #5
          Here's a screenshot of my advanced search:

          Can't see any forums to search

          Comment

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

            #6
            Click the other tab at the top.
            Translations provided by Google.

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

            Comment

            • angeljs
              Senior Member
              • Jun 2008
              • 128
              • 3.7.x

              #7
              I have, but it shows exactly the same content.

              Edit: When clicked the second tab, then the first one again, the forums showed up.

              However, I still don't have a clue how to build a search string from the link produced.

              Comment

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

                #8
                You would have to view the source code of the page. Each form element has a variable name assigned to it. You would then use those variables to build your GET query.
                Translations provided by Google.

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

                Comment

                • angeljs
                  Senior Member
                  • Jun 2008
                  • 128
                  • 3.7.x

                  #9
                  Okay, thanks for that tip. I've done that and the only thing I can see in the source is:
                  Code:
                  <a href="search.php?searchuser={vb:raw post.username}&amp;exactname=1&amp;titleonly=0&amp;searchdate=0&amp;beforeafter=after&amp;contenttypeid=1&amp;sortby=dateline&amp;order=descending&amp;sortorder=descending&amp;saveprefs=1&amp;searchfromtype=vBForum%3APost&amp;showposts=0&amp;starteronly=1&amp;searchthreadid=0&amp;forumchoice[]=112&amp;prefixchoice[]=&amp;prefixchoice[]=Open&amp;prefixchoice[]=On_Hold&amp;prefixchoice[]=Completed&amp;prefixchoice[]=pc&amp;prefixchoice[]=PS2&amp;prefixchoice[]=solved&amp;childforums=1&amp;replyless=0&amp;type[]=1"></a>
                  However, that just takes me to the search page with all of the search details filled in

                  Comment

                  • punchbowl
                    Senior Member
                    • Nov 2006
                    • 3903
                    • 4.0.x

                    #10
                    Live HTTP Headers for firefox

                    Comment

                    • angeljs
                      Senior Member
                      • Jun 2008
                      • 128
                      • 3.7.x

                      #11
                      Can't get anything from that either, though it's a useful addon

                      Comment

                      • tommythejoat
                        Member
                        • Apr 2008
                        • 98
                        • 4.2.x

                        #12
                        Look at current source???

                        When I look at the source for the advanced search page by viewing source in the browser, among many other things I see:

                        HTML Code:
                        <div class="blockrow">
                                     <label for="searchdate">Find Posts:</label>
                                     <ul class="multifield group">            
                         <li>                 <select id="searchdate" name="searchdate" tabindex="1">
                                             <option value="0" selected="selected">Any Date</option>
                                             <option value="lastvisit" >Your Last Visit</option> 
                                            <option value="1" >Yesterday</option>
                                             <option value="7" >A Week Ago</option>
                                             <option value="14" >2 Weeks Ago</option>
                                             <option value="30"> A Month Ago</option>
                                             <option value="90" >3 Months Ago</option>
                        
                                             <option value="180" >6 Months Ago</option>
                                             <option value="365" >A Year Ago</option>
                                         </select>             </li>
                                     <li>                 <select name="beforeafter" tabindex="1"> 
                                            <option value="after" >and Newer</option> 
                                            <option value="before" >and Older</option>
                                         </select>             </li>             </ul>         </div>
                        It looks like the name of the date option is searchdate and the name of the condition before or after is beforeafter. The forums were all listed further up the page each in a template block. The name of the forum choice is forumchoice and it is an array with the additional parameter multiple. I don't think multiple requires a value, but you may need it to complete forumchoice. Or, forumchoice may just work if an array is present.
                        Last edited by tommythejoat; Fri 23 Sep '11, 9:55am. Reason: put back a semblance of formatting after editor deleted it all.
                        Tom McIntyre
                        http://mb.nawcc.org - My vBulletin site
                        http://awco.org - My home

                        Comment

                        Related Topics

                        Collapse

                        Working...