Back to vBulletin 3.7 Template Modifications

Advanced Quick Search form like vBulletin.org
Mod Version: 1.00, by veenuisthebest

This modification is in the archives.
vB Version: 3.7.x Rating: (7 votes - 4.71 average) Installs: 76
Released: 12 Nov 2008 Last Update: Never Downloads: 6
Not Supported Template Edits  


1. This is a search form similar to what you see at this forum (screenshot above) that includes searching by forums, all posts, titles only with a quick menu.

2. It includes quick tag search as well, if you want. Just remove comments to enable it.

3. Under Search Options, you'll find

Code:
My Posts
My Threads
New Posts
Today's Posts
Unanswered Threads
Advanced Search

4. XHTML valid

5. It would be convenient and easiest if we simply place the code in Ad Location Templates -> ad_header_logo template (if you're not using it for ad purposes ofcourse and the spot is free) OR

find this in header template:-

Code:
<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>

and replace the code in red with the below code.

HTML Code:
<if condition="$show['searchbuttons']">
	<!-- header quick search form -->
	<form action="search.php?do=process" method="post">
	<input type="hidden" name="do" value="process" />
	<input type="hidden" name="quicksearch" value="1" />
	<input type="hidden" name="childforums" value="1" />
	<input type="hidden" name="exactname" value="1" />
	<input type="hidden" name="s" value="$session[sessionhash]" />
	<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<div><input type="text" name="query" size="30" style="font-size: 8pt;" />
<select name="forumchoice[]">
            <option value="-1" selected="selected">All Forums</option>
            <option value="1">Forum1</option>
            <option value="2">Forum2</option>
            <option value="3">Forum3</option>
          </select>
<select name="titleonly">
		<option value="0" selected="selected">All Posts</option>
		<option value="1" >Titles Only</option>
	</select><input name="search" value="Search" type="submit" class="button" /><a href="search.php" accesskey="4" rel="nofollow" id="navbar_search1" class=""><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" title="Advanced Search" border="0" /></a>
            <script type="text/javascript"> vbmenu_register("navbar_search1",1); </script>
</div>
</form>
<!-- <br />
<form action="tags.php" method="get">
<span id="tag_wrapper"><input type="text" id="tag_input" name="tag" size="25" style="font-size: 8pt" value="enter tag, and hit enter" onFocus="this.value=''" onBlur="this.value='enter tag, and hit enter'"/></span>
</form> -->
<div class="vbmenu_popup" id="navbar_search1_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
	<tr><td class="thead" align="left">Search Options</td></tr>
	<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$bbuserinfo[userid]" rel="nofollow">My Posts</a></td></tr>
	<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;searchuser=$bbuserinfo[username]" rel="nofollow">My Threads</a></td></tr>
	<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=getnew" rel="nofollow">New Posts</a></td></tr>
	<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=getdaily" rel="nofollow">Today's Posts</a></td></tr>
	<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=process&amp;replyless=1&amp;replylimit=0&amp;exclude=30&amp;nocache=1" rel="nofollow">Unanswered Threads</a></td></tr>
	<tr><td class="vbmenu_option" align="left"><a href="search.php$session[sessionurl]" accesskey="4" rel="nofollow">Advanced Search</a></td></tr>
	</table>
</div>
	<!-- / header quick search form -->
	</if>

6. To add searching within forums, simply find Forum1, Forum2 in the above code and replace them with your forum title and corresponding FORUM ID's in place of option values.

Extras:-

1. To enable quick tag search:-

Simply uncomment the second form after first instance of </form>. Ofcourse position it, style it as you like.

2. You would notice a Javascript effect in tag search form where there is no submit button and a hint text on focus and blur is placed. If you like, you can do the same for the first form

Hope you find this useful. Please if you use it.

Source: http://tech6.com/f51/advanced-quick-search-form-like-vbulletin-org-t588/

Download

No files for download.

Screenshots

Click image for larger version
Name:	Untitled-2.gif
Views:	2641
Size:	3.0 KB
ID:	89282  

Similar Mods

Quick Search with advanced drop down in navbar vBulletin 3.6 Template Modifications
Integration with vBulletin Google/Adsense Site Search Integrated into Advanced Search Page vBulletin 3.6 Template Modifications
Mini Mods Navbar Search Form/Input Box with Advanced Options Dropdown vBulletin 3.6 Template Modifications
Forum Display Enhancements Turkish and Eng Navbar Advanced Search vbulletin.org vBulletin 3.7 Template Modifications

vblts.ru supports vBulletin®, 2022-2024