Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Navtab Search Box with Options Details »»
Navtab Search Box with Options
Version: 1.00, by 8thos 8thos is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.1.4 Rating:
Released: 06-25-2011 Last Update: 06-26-2011 Installs: 18
Uses Plugins
Re-useable Code Translations  
No support by the author.

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>
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.

Download Now

File Type: xml product-the8thlegion.xml (2.8 KB, 96 views)
File Type: xml product-the8thlegion1.5WhiteFont.xml (2.9 KB, 77 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-30-2012, 01:59 PM
Leica.Robbiani Leica.Robbiani is offline
 
Join Date: Sep 2007
Location: South Germany
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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}
below add:

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>
In template "navbar" find:

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>
Delete it.

Best regards

L.R.
Reply With Quote
  #13  
Old 08-30-2012, 04:11 PM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #14  
Old 08-30-2012, 06:55 PM
bhantugh bhantugh is offline
 
Join Date: Feb 2012
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks. I've decided to go back to v4.1
Reply With Quote
  #15  
Old 08-30-2012, 07:18 PM
Leica.Robbiani Leica.Robbiani is offline
 
Join Date: Sep 2007
Location: South Germany
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there,

Quote:
Originally Posted by bzcomputers View Post
Any easy way to get this moved to the far right of the navbar?
Do I understand right, you like just a replacemnt for the Advanced Search link?

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>
Replace this with the code for the searchbox.

Best regards

L.R.
Reply With Quote
  #16  
Old 02-27-2016, 06:15 PM
Ende1 Ende1 is offline
 
Join Date: Dec 2015
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #17  
Old 02-29-2016, 10:10 PM
Ende1 Ende1 is offline
 
Join Date: Dec 2015
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

like this

Reply With Quote
  #18  
Old 05-15-2016, 06:49 PM
Ende1 Ende1 is offline
 
Join Date: Dec 2015
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone help me with this please
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:58 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06367 seconds
  • Memory Usage 2,300KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (2)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete