Facebook Twitter Pinterest Share

vBulletin 3.X Add-ons & Template Modifications All the latest vBulletin 3.X Add-ons & Template Modifications.


New Thread  Post Reply
Daz's Avatar
Daz : To right I fecking bite
Daz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond reputeDaz has a reputation beyond repute
offline Joined: Sep 2007 Posts: 455 Thanked: 166
  #1  
Thread Starter Unread 09-30-07
Invalid (Too Short) Search Keyword Remover

This product removes keywords that are too short and allows a forum search to continue with the remaining valid keywords.

Normally, if the user searches for a word or words that are shorter than the minimum word length, the search crashes and burns with a not-so-user-friendly warning that they need to enter longer keywords. How is the user supposed to know that instead of searching for "racetrack in phoenix" they must leave out the "in" for it to work? This mod allows the user to search for "racetrack in phoenix" and the word "in" is automatically removed and a note is displayed telling the user what was done.

Features

* Removes search terms (keywords) that are shorter than the value set in vB Options -> Message Searching Options -> Search Index Minimum Word Length
* Does not remove the "whitelisted" words that are shorter than the minimum length. The whitelist can be found at vB Options -> Message Searching Options (vB Internal Search) -> Words to be Included Despite Character Limit
* Respects the vB built-in search operators AND OR NOT -AND -OR -NOT (does not remove them)
* Displays a friendly note that the invalid (short) terms were removed from the search, and allows the search to go on.
* You may fully customize how the message is displayed in the templates
* This mod is fully phrased, so you can modify the wording of the message and/or translate them by searching in the phrases.
* No template modifications are necessary to install this.

Installation

1. Extract the XML file from the zip file and import it via ACP -> Manage Products -> Add/Import Product
2. Tell all your members to stop worrying about searching for words that are too short.

Upgrading

* Upgrading is simple. Simply download the new version and import the XML file overwriting the previous version.

Changes that it makes

* This mod adds a template (search_invalid_keywords) for displaying the message to users.
* Adds a couple of phrases
* Adds three plugins that do the work.

Modifying the message that is displayed

You can modify the message by changing the phrases (do a phrase search for the text of the messages) and by changing the template. The template to change is called search_invalid_keywords.

I hope you enjoy this mod. If you have any problems with it, or feature requests, just let me know.

Requirements

I tested this in the following configuration, but this should probably work with vB 3.6.x and up, and PHP 4.1.x and up.

* vB 3.6.8
* PHP 4.4.7
* Apache 1.3.37
* Linux

History

* v 1.0.1 Bug fix. (Sept. 7, 2007)
o Code is now only executed if the user did a search by keyword. It's ignored if they only searched by username etc. (Thanks momo2)
* v 1.0.0 Initial Release (Sept. 5, 2007)


Screenshots

Screenshots are attached below. (1) The first one is an example of the regular vB error message when you search for words that are too short. (2) The second one is the result of searching for "crash in the burn". "in" and "the" are removed, and the search continues with "crash" and "burn". (3) The third screenshot is the message that's displayed when there are no results to the search. The search terms were "cash in the cow, man".



Attached Files Click the thanks button to view this attachment.
New Thread  Post Reply

Thread Tools

Bookmarks
  • Submit Thread to Facebook
  • Submit Thread to Twitter
  • Submit Thread to Pinterest
  • Submit Thread to LinkedIn
  • Submit Thread to Reddit
Tags
keyword, remover, search, short, invalid
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
Powered by GYSN Underground 2021