Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Simplify Search Feature to be Forum Only Details »»
Simplify Search Feature to be Forum Only
Version: 1.00, by Dan Druff Dan Druff is offline
Developer Last Online: May 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.1.12 Rating:
Released: 07-31-2012 Last Update: Never Installs: 9
Template Edits
Re-useable Code Translations  
No support by the author.

Many site owners (myself included) use vBulletin primarily for its forum. These sites tend to have the vast majority of their content in the forum, and relatively little elsewhere. This is especially true of smaller sites.

In such cases, the vBulletin Advanced Search feature is overly complicated, confusing, and user-unfriendly. I noticed this the first time I used vBulletin software many years ago, and the problem still persists to this day.

If you're like me, you simply want the Advanced Search feature to search forum threads/posts only, and you want the form to be as simple as possible for the user.

This modification does not add anything to vBulletin. Instead, it subtracts a lot of extraneous search choices, and makes it easier on users of sites where the forum is the main feature.

Note that this mod removes the ability to search anything but the forum, so don't install it if you want to keep the ability for users to search blogs, groups, etc.



In this mod, you will be editing three templates: navbar, search_common, search_common_select_type

In navbar search for:
Code:
<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
Change that to:
Code:
<li><a href="search.php?search_type=1{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>


In search_common search for:
Code:
<h3 class="blocksubhead">{vb:rawphrase search_in}</h3>
Right ABOVE it, add:
Code:
<!--

Then search for:
Code:
<h3 class="blocksubhead">{vb:rawphrase search_for}</h3>
Right ABOVE it, add:
Code:
//-->

Then search for:
Code:
	<li class="selected"><a href="search.php{vb:raw session.sessionurl_q}">{vb:rawphrase search_multiple_types}</a></li>
Right ABOVE it, add:
Code:
<!--
Right BELOW it, add:
Code:
//-->


In search_common_select_type, search for:
Code:
			<li><a href="search.php{vb:raw session.sessionurl_q}">{vb:rawphrase search_multiple_types}</a></li>
Right ABOVE it, add:
Code:
<!--
Right BELOW it, add:
Code:
//-->

Then search for:
Code:
{vb:raw input_search_types}
Right ABOVE it, add:
Code:
<!--
Right BELOW it, add:
Code:
//-->


OPTIONAL:
Finally, just for aesthetics, go into the Phrase Manager (in Admin Control Panel) and do Search in Phrases. Enter "search_single_type" in the Search For Text box, and click the radio button for Phrase Variable Name Only. Then click Find.

When you get the results (should be search_single_type), click Edit. In the text box, type "Search Forum", and then press Save.


That's it!

You will notice that most of this mod is simply commenting out features we don't need. I have found that many small sites will benefit from this mod.

See attachment for a screen shot of the Advanced Search feature on my forum, with this mod.

Screenshots

File Type: png search-vbulletin.png (34.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
davidg, ELROBLE

Comments
  #2  
Old 09-01-2012, 05:33 PM
MikeTrin MikeTrin is offline
 
Join Date: Jun 2006
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the post. I have been meaning to do this thanks for making it quick.
Reply With Quote
  #3  
Old 01-31-2013, 04:01 PM
autoescala autoescala is offline
 
Join Date: Oct 2011
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #4  
Old 02-04-2013, 09:02 AM
autoescala autoescala is offline
 
Join Date: Oct 2011
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!! Works like a charm,

Some one know how to be able to have a search in the navbar like this site ? vbulletin.org ?
Reply With Quote
  #5  
Old 02-18-2013, 12:48 PM
neya's Avatar
neya neya is offline
 
Join Date: Jan 2013
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tagged, will deff install this later when I have the time, and I have to agree, the search has always been a pain to me, especially having to wait 30 seconds when making mistakes.
Reply With Quote
  #6  
Old 06-20-2013, 03:27 PM
adfields adfields is offline
 
Join Date: Jan 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this mod! I've followed the instructions but our search screen is different from the screen shot - the Additional Options seem to be following the Multiple Content Search format rather than the Single Content.

Any ideas on how to fix this?
Attached Images
File Type: jpg Search.jpg (41.4 KB, 0 views)
Reply With Quote
  #7  
Old 07-11-2013, 06:32 PM
sub_ubi sub_ubi is offline
 
Join Date: Dec 2004
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much.

For those of you who want to keep functionality but default to forum-only search, simply do the navbar change above and nothing else.
Reply With Quote
  #8  
Old 08-30-2013, 04:57 AM
Dan Druff Dan Druff is offline
 
Join Date: Mar 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adfields View Post
Thanks for this mod! I've followed the instructions but our search screen is different from the screen shot - the Additional Options seem to be following the Multiple Content Search format rather than the Single Content.

Any ideas on how to fix this?
Not sure why that is happening. The instructions here worked for several others.

Which vBulletin version are you using?
Reply With Quote
  #9  
Old 05-06-2018, 08:22 PM
PetrK PetrK is offline
 
Join Date: Feb 2012
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks to this mode we have a clear search in our forum. Thank you very much.

I have one more question. Please, How do I delete a search box "Tag:"?

Thanks, Petr
Attached Images
File Type: jpg obrazek13.jpg (23.3 KB, 0 views)
Reply With Quote
Reply


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 03:20 PM.


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.05626 seconds
  • Memory Usage 2,315KB
  • 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
  • (15)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
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (3)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete