Back to vBulletin 3.7 Template Modifications

Navbar Search Form/Input Box
Mod Version: 1.00, by ()

This modification is in the archives.
vB Version: 3.7.x Rating: (4 votes - 4.50 average) Installs: 39
Released: 30 Apr 2008 Last Update: 30 Apr 2008 Downloads: 75
Not Supported Template Edits Is in Beta Stage  

Updated version of my older mod here, fixed for the new security token feature.

This is a quick template mod that roughly emulates the search box here at vB.org, without the forum select dropdown. I saw a few mods somewhat like it but none with the input box, and like many people here once vB.org released the new skin, I had to have the search box. So after a bit of coding and hacking around, here's the way I did it.

Note that simply clicking the search button with no query will bring you to the default search page.

Time to Install: 2 Minutes
Difficulty: Easy
Template Mods: 1
Demo: http://www.sevenstring.org
Login: guest/guest (unregistered search is disabled)

AdminCP -> Style Manager -> Edit Templates -> navbar

Find:

Code:
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
		</if>
	</td>
Add directly after, replacing the colored text with your domain/forum path to search.php

Code:
<!-- Search Box -->
<td valign="middle" class="alt1"> <div style="white-space:nowrap">
<form action="http://www.yourdomain.com/forum/search.php" method="post">
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="text" style="width:100px;" class="bginput" name="query"/>
<input style="font: bold 10px Arial" type="submit" class="button" value="Search" /></form>
<a style="text-decoration:none" href="search.php" accesskey="4" rel="nofollow" id="navbar_search" class=""></a>&nbsp;
</div></td>
<!-- /Search Box -->
Note that the bold text is what's new for 3.7.

Optional: Remove the old search link from your navbar.

Simply comment out the search text, like so. I'm sure there's a better way to accomplish this, but that's how I pull it off on my site. Any input appreciated.

Code:
<!-- $vbphrase[search] -->
Screenshot:

This will be considered beta until I have it running with 3.7 for awhile to ensure there are no other hidden issues.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s 37_searchtemplate.txt (1.7 KB, 79 downloads)

Similar Mods

Mini Mods Navbar Search Form/Input Box with Advanced Options Dropdown vBulletin 3.6 Template Modifications

vblts.ru supports vBulletin®, 2022-2024