View Full Version : How can I add Search box to my navbar / header to my site
zachlee47
01-13-2008, 08:42 PM
The search bar (search box) that vbulletin.org uses between the header and navbar is great. I have searched through this site and the main site and have not found how to add this to mine. Can someone point me in the right direction?? Thanks! -Z
--------------- Added 1200282774 at 1200282774 ---------------
does vbulletin.org have a list of their installed mods? I have been hunting around and cannot locate anything. Maybe a sticky somewhere???
Rob1986
01-14-2008, 06:50 PM
Would also like to know.
snakes1100
01-14-2008, 07:08 PM
That is a custom modification created by the admins here at vb.org, they are not publicly released.
You can view the page source code and get a general idea on what to do, i dont recall them ever disallowing the use of their code, not even for the tab'd style.
Rob1986
01-14-2008, 07:14 PM
They should release the code for that search box, its pretty nifty.
zachlee47
01-14-2008, 07:26 PM
Check out my screenshot
Here is the code of what I did:
<table border="0" width="100%">
<tr><!-- Row 1 -->
<td> <center>
<!--searchSTART -->
<form action="search.php?do=process" method="post" name="vbform" id="searchform">
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="" />
<input type="text" class="alt1" name="query" size="40" onfocus="this.value=''" value="$vbphrase[srechercher_defaut]" />
<input type="submit" class="button" value="Search CPS KB" style="vertical-align: middle;"/>
</form>
<!--searchEND-->
</td><!-- Col 1 --></center>
<!--Google Start-->
<td>
<center>
<form method="get" action="http://www.google.com/custom" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="40" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Google It" id="sbb"></input>
<input type="hidden" name="client" value="pub-2949812222115590"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- Google END -->
</td><!-- Col 2 --></center>
</tr>
</table>
Guest210212002
01-14-2008, 10:08 PM
I released this as a mod a while back:
https://vborg.vbsupport.ru/showthread.php?t=147076
It's unsupported now, as I don't have much time to really hack around anymore.
zachlee47
01-14-2008, 10:30 PM
I found a lot of mods that had it up in the header and/or in the navbar. I just wanted a standalone, simple search box. No drop downs, no options, just search.
I use vbulletin for an in-house knowledge_base. My users are "not so computer literate" I have to dumb things down to one step before *simple*
I used to run a football_forum back in the 2.x days, and had a similar search bar.
Rob1986
01-15-2008, 07:53 AM
I released this as a mod a while back:
https://vborg.vbsupport.ru/showthread.php?t=147076
It's unsupported now, as I don't have much time to really hack around anymore.
This is perfect! Thank you.
Working on my site. www.musclemecca.com
zachlee47
01-15-2008, 08:47 AM
This is perfect! Thank you.
Working on my site. www.musclemecca.com
Cool logo. IMO, pre-set word verification (pain) plus image verification is a bit much. Overall, nice design!
--------------- Added 1200394550 at 1200394550 ---------------
I made a slight change to my search box to make it stand out (and more easily recognizable against a white background)
locate the following style code, and add the bold:
<input type="text" class="alt1" name="query" size="40" style="background-color:#FFFF66;" onfocus="this.value=''" value="$vbphrase[srechercher_defaut]" />
zachlee47
01-15-2008, 08:58 AM
The above adition will change the backround color of the searchbox to a pale yellow. A
Rob1986
01-15-2008, 11:57 AM
Cool logo. IMO, pre-set word verification (pain) plus image verification is a bit much. Overall, nice design!
Thank for the comment. I too thought it was abit much but I was getting hit with alot of spam bots. I guess the pre-set word verification is all you need to stop the bots from signing up.
zachlee47
05-23-2008, 04:37 PM
I made the change to the code, so the searchbar will work with version 3.7
<table border="0" width="100%">
<tr><!-- Row 1 -->
<td> <center>
<!--searchSTART -->
<form action="search.php?do=process" method="post" name="vbform" id="searchform" style="display:block; margin:0px">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$searchthreadid" />
<input type="text" class="alt1" name="query" size="40" style="background-color:#FFFF66;" onfocus="this.value=''" value="$vbphrase[srechercher_defaut]" />
<input type="submit" class="button" value="Search CPS KB" style="vertical-align: middle;"/>
</form>
<!--searchEND-->
</td><!-- Col 1 --></center>
<!--Google Start-->
<td>
<center>
<form method="get" action="http://www.google.com/custom" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="40" style="background-color:#FFFF66;" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Google It" id="sbb"></input>
<input type="hidden" name="client" value="pub-2949812222115590"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- Google END -->
</td><!-- Col 2 --></center>
</tr>
</table>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.