Previous Thread
Next Thread
Print Thread
Rating: 5
#283893 03/08/2005 12:57 AM
Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
Mod Name / Version: Search FIX

Description: Fixes the search modules found in UBBT 6.4+

Unlike conventional search engines such as google and yahoo... When entering multiple search terms to UBBT, you are required to use "+" or "-" in front of each word. If you don't, your results will display ANY matches of ANY of the words.

This fixes the "ANY, ALL or SOME" issue and returns functionality of your board's search engine to what most users are familiar with in the real world.

After inserting this code, the "ANY" feature will no longer work, but the plus side is that your users will no longer be afraid to use your search engine since they will have more positive results returned of what they are looking for.

(it basically returns your search "word" engine to that of what it was in version 6.3 and prior)

Working Under: UBB.Threads 6.4-6.5

Mod Status: Finished

Any pre-requisites: none

Author(s): id242

Date: 03/07/05

Credits: Thanks to Myke for the update!

Files Altered: dosearch.php

New Files: none

Database Altered: no

Info/Instructions: in dosearch.php, find:
Code
 <br />// --------------------------------------------------------- <br />// The forums we are searching will be in a different format <br />// depending on where we are coming from <br />


insert BEFORE it:
Code
 <br />// --------------------------------------------------------- <br />// FIX Search code ===START=== <br />if ($Words != "") { <br />	if (!strstr($Words, '"')) { <br />		if (!strstr($Words, " +")) { <br />			$Words = str_replace(" ", " +", $Words); <br />//			$Words = "+".$Words; <br />		} <br />	} <br />	$Words = str_replace(" +-", " -", $Words); <br />	$Words = str_replace(" ++", " +", $Words); <br />} <br />// FIX Search code ===END=== <br />


Code has been updated with Myke's addtional code from #128269 - 06/09/05 04:32 AM, THANK YOU!

[Version numbers edited: Thanks for the update twisty The correct ubbt version numbers that this fix works under has been corrected - also tested and working fine in a 6.5 install]

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.

Last edited by id242; 07/15/2005 5:18 PM.
Sponsored Links
Entire Thread
Subject Posted By Posted
Finished-[6.4-6.5] Search FIX isaac 03/08/2005 7:57 AM
Re: Beta-[6.3-6.4] Search FIX Tina 03/13/2005 9:54 AM
Re: Beta-[6.3-6.4] Search FIX isaac 03/13/2005 4:30 PM
Re: Beta-[6.3-6.4] Search FIX Twisty 03/13/2005 8:38 PM
Re: Beta-[6.3-6.4] Search FIX isaac 03/14/2005 12:27 AM
Re: Beta-[6.3-6.4] Search FIX Tina 03/14/2005 7:14 AM
Re: Beta-[6.3-6.4] Search FIX Twisty 03/14/2005 11:51 AM
Re: Beta-[6.3-6.4] Search FIX Twisty 03/14/2005 12:06 PM
Re: Beta-[6.4-6.5] Search FIX Myke 04/27/2005 1:06 PM
Re: Beta-[6.4-6.5] Search FIX Myke 06/01/2005 4:09 PM
Re: Beta-[6.4-6.5] Search FIX Myke 06/09/2005 1:32 PM
Re: Beta-[6.4-6.5] Search FIX isaac 07/12/2005 9:26 PM
Re: Finished-[6.4-6.5] Search FIX AllenAyres 07/12/2005 9:36 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2813
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 5
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)