The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding Search Specific Forum Option
Hi,
I didn't want to bump an old thread so I thought I would create a new one. I am trying to create a search function, similar to the one used here, where a member can search specific forums. Just like this post, I have found the forumchoice[] is not working on 4.2.0. I have titleonly working, as it will only show me threads that have the search term(s) in their title but it will not search in a specific forum. Here is my current code. Code:
<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="footer_search" class="footer_search"> <vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment> <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> <input type="hidden" name="do" value="process" /> <input type="text" value="" name="query" class="textbox" tabindex="99" /> <select name="forumchoice[]"> <option value="-1" selected="selected">All Forums</option> <option value="1">Forum 1</option> <option value="2">Forum 2</option> <option value="3">Forum 3</option> <option value="4">Forum 4</option> <option value="5">Forum 5</option> </select> <select name="titleonly"> <option value="0" selected="selected">All Posts</option> <option value="1" >Titles Only</option> </select> <input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search<vb:if condition="$stylevar['textdirection'] == 'rtl'">_rtl</vb:if>.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/> </form> |
#2
|
|||
|
|||
Anyone help me with this?
|
#3
|
|||
|
|||
Surely someone knows how I can fix this issue? I've been trying everything I can find on the forums to fix this problem.
Seems like nobody wants to help when it comes to making something that looks like or works like something here on vB.org. |
#4
|
|||
|
|||
Bah, guess I'll have to ask for help from somewhere else then.
|
#5
|
|||
|
|||
Having the same issue :-\ been googling for hours.. Just can't get forumchoice[]=xx or forumchoice=xx to work. Search results works fine, it refuses to use the specified Forumchoice (forum section) though. It searches forum-wide instead.
|
#6
|
|||
|
|||
Hmm...well, here's a list of what's being posted when I search from the search page using "single content type" of post and selecting some forums:
Code:
titleonly=0 searchuser= starteronly=0 tag= forumchoice%5B%5D=5 forumchoice%5B%5D=6 forumchoice%5B%5D=7 forumchoice%5B%5D=8 childforums=1 replyless=0 replylimit= searchdate=0 beforeafter=after sortby=dateline order=descending showposts=0 saveprefs=1 dosearch=Search+Now searchthreadid= s= securitytoken=1406582637-cf67eb3a60e2ff5376b1527b3643f4ef0f2351cb searchfromtype=vBForum%3APost do=process contenttypeid=1 Edit: glancing at the list, most of them are just options that I wouldn't think would affect whether or not forumchoice[] is used, so it seems like maybe you need do=process, contenttypeid=1, and/or dosearch=Search+Now. |
#7
|
|||
|
|||
Attach a functional page of code that I can test as a PHP file (so I do not have to create it myself) and I will be glad to take a look at it.
|
#8
|
|||
|
|||
Quote:
Quote:
|
#9
|
|||
|
|||
It does seem like forumchoice[] should work. "include" works, if what you're doing is coding a link like in your example, but it's a comma-separated list of ids so it wouldn't work with an option list (like the OP was asking about).
|
#10
|
|||
|
|||
So you are saying I can't get a section-search to work through a text link url search?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|