Black Snow
02-16-2013, 05:11 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=271503), 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.
<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>
I would love some help if anyone has any suggestions.
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 (https://vborg.vbsupport.ru/showthread.php?t=271503), 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.
<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>
I would love some help if anyone has any suggestions.