8thos
06-25-2011, 10:00 PM
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.
https://vborg.vbsupport.ru/attachment.php?attachmentid=130410&stc=1&d=1309067185
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 (https://vborg.vbsupport.ru/showthread.php?t=232579).
// 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:
<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>
Read this article if you want to create the plugin yourself: https://vborg.vbsupport.ru/showthread.php?t=265810
I'll add another product later that disables the search bar in navtab for you.
https://vborg.vbsupport.ru/attachment.php?attachmentid=130410&stc=1&d=1309067185
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 (https://vborg.vbsupport.ru/showthread.php?t=232579).
// 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:
<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>
Read this article if you want to create the plugin yourself: https://vborg.vbsupport.ru/showthread.php?t=265810
I'll add another product later that disables the search bar in navtab for you.