The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Navtab Search Box with Options Details »» | |||||||||||||||||||||||||||||
Create search navtab across all skins, remove search from navbar, disable search box for guests, increase rate of accidental ad clicks due to search being right above ads.
Plugin PHP Code: The code in green is where you can disable search for guests. The code in red is where you can move the template hook per Allan's Guide. Code:
// change $allowguests from 'true' to 'false' if you do NOT want guests to see the gallery menu $allowguests = false; /******** NO EDITS below here! ************/ /******************************************/ if ($show['member'] OR $allowguests) { global $vbphrase, $vbulletin, $bbuserinfo; $sess = $vbulletin->session->vars['sessionurl_q']; $template_hook['navbar_after_community'] .= ' <li class="popupmenu nohovermenu forumsearch menusearch" id="forumsearch"> etc... To remove search from the navbar: AdminCP/Styles and Templates/ Style Manager / Edit Templates / Navigation and Breadcrumb Templates / navbar In navbar delete the following code: Code:
<vb:if condition="$vboptions['enablesearches']"> <div id="globalsearch" class="globalsearch"> <form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search"> <vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment> <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<vb:if condition="$stylevar['textdirection'] == 'rtl'">_rtl</vb:if>.<vb:if condition="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" 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> I'll add another product later that disables the search bar in navtab for you. Download Now
Show Your Support
|
Comments |
#12
|
|||
|
|||
Hi there,
here's the way I did it on 4.2.0: in template "navbar_tabs" find: Code:
{vb:raw template_hook.navbar_after_links} Code:
<li class="popupmenu nohovermenu forumsearch menusearch" id="forumsearch"> <h6><a href="javascript://" class="popupctrl">Search</a></h6> <form action="search.php?do=process" method="get"> <ul class="popupbody popuphover"> <li><input type="text" class="searchbox" name="query" value="Search..." tabindex="1" /></li> <li class="formsubmit"> <input type="submit" class="button" value="Search" tabindex="2" /> </li> <li class="formsubmit"> <div class="submitoptions"> <label><input type="radio" name="showposts" value="0" checked="checked" /> Show Threads</label> <label><input type="radio" name="showposts" value="1" /> Show Posts</label> </div> <div class="advancedsearchlink"><a href="search.php?">Advanced Search</a></div> </li> </ul> <input type="hidden" name="s" value="{vb:raw session.sessionhash}" /> <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> <input type="hidden" name="do" value="process" /> <input type="hidden" name="contenttype" value="vBForum_Post" /> <input type="hidden" name="exactname" value="1" /> </form> </li> Code:
<ul class="navbar_advanced_search"> <li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li> {vb:raw template_hook.navbar_advanced_search} </ul> Best regards L.R. |
#13
|
||||
|
||||
This solution above (Post #11) did not work for me - didn't show any Search link on NavBar.
Edit: the above code worked for me when added to template "navbar_tabs_enhanced" using vB 4.2 PL2 Any easy way to get this moved to the far right of the navbar? |
#14
|
|||
|
|||
thanks. I've decided to go back to v4.1
|
#15
|
|||
|
|||
Hi there,
Quote:
You can do that: In template "navbar" find: Code:
<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li> Best regards L.R. |
#16
|
|||
|
|||
is there any way to edit the normal search
from this to this with the code which was posted above? i don't want to use it with the navtab. i want to modify the regular search |
#17
|
|||
|
|||
like this
|
#18
|
|||
|
|||
Can someone help me with this please
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|