View Full Version : Moving the Search Bar
shempsall2009
06-20-2010, 10:02 AM
Hi
How do I move the search bar Above the Forums instead of the Navbar?
Thanks.
ChopSuey
06-20-2010, 02:29 PM
Edit the navbar template.....
shempsall2009
06-20-2010, 07:19 PM
What code do I need to edit & where would I put it?
borbole
06-20-2010, 07:45 PM
What code do I need to edit & where would I put it?
This is the code you need to remove the search from the navbar template.
<vb:if condition="$vboptions['enablesearches']">
<div id="globalsearch" class="globalsearch">
<form action="search.php?do=process" method="post" id="navbar_search" class="navbar_search">
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
<span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
</form>
<ul class="navbar_advanced_search">
<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
</ul>
</div>
</vb:if>
As to where to put it, you will need to be a bit more specific than "above the forums". A screenshot of where you want to move it would be even better.
shempsall2009
06-21-2010, 09:54 AM
I have now change my mind and I have created a Forum Block to place Search Box in...
I have copied the above code in the "Specify content you want to display." and it's not working...
Any Ideas?
--------------- Added 1277136905 at 1277136905 ---------------
I have managed to put the Search in ForumBlock...
But now When I search it says : Your submission could not be processed because a security token was invalid...
I have tried
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
and
<input type="hidden" name="securitytoken" value="$bbuserinfo [securitytoken]" />
Please can someone tell me where I am going wrong???
This is my full code:
<vb:if condition="$vboptions['enablesearches']">
<div id="globalsearch" class="block_html">
<form action="search.php?do=process" method="post" id="navbar_search" class="block_html">
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
<span class="buttoncontainer"><span><input type="image" class="searchbutton" src="http://www.******.com/******/images/buttons/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
</form>
<ul class="navbar_advanced_search">
<li><a href="http://www.*****.com/****/search.php">Advanced Search</a></li>
</ul>
</div>
</vb:if>
shempsall2009
07-10-2010, 10:20 AM
bump
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.