The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Navbar Search Form/Input Box with Advanced Options Dropdown Details »» | |||||||||||||||||||||||||||
Navbar Search Form/Input Box with Advanced Options Dropdown
Developer Last Online: Jan 1970
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. 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> Code:
<!-- Search Box --> <td valign="middle" class="alt1"> <div style="white-space:nowrap"> <form action="http://www.sevenstring.org/forum/search.php" method="post"> <input type="hidden" name="s" value="" /> <input type="hidden" name="do" value="process" /> <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> </div></td> <!-- /Search Box --> 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 on default style: And on my own: Update 1.01 I've changed this to be a bit more useful, as it will now submit the query itself to search.php. I had it setup differently, but I think more people would prefer it this way. If you've already installed, just replace the template code. Update for 3.7 RC4 or Gold for security token Add the colored code: Code:
<!-- Search Box --> <td valign="middle" class="alt1"> <div style="white-space:nowrap"> <form action="http://www.sevenstring.org/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> </div></td> <!-- /Search Box --> Show Your Support
|
Comments |
#12
|
|||
|
|||
In order to accept POST request originating from this domain, the admin must add this domain to the whitelist.
I get the above. |
#13
|
|||
|
|||
Did you strip the original search, or just remove the phrase?
|
#14
|
|||
|
|||
If you are running 3.7 RC4 or above, you will need to add the following colored code:
Code:
<!-- Search Box --> <td valign="middle" class="alt1"> <div style="white-space:nowrap"> <form action="http://www.sevenstring.org/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> </div></td> <!-- /Search Box --> |
#15
|
|||
|
|||
Thanks Chris, nice mod.
Installed! |
#16
|
|||
|
|||
Anyone know how to add the pre-search wording in the field? Such as the blank search area would say "Search...." and when someone clicks in the field it erases so they can type in what they want to search for?
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|