ThreadsDev FusionBB Greeting Cards FusionBBDev.com Measurection.com VertexHost NASCAR Racing MouseFunFacts.com Myrtle Beach Info UBB.Threads Modifications threadsdev.net
FusionBB

Trans-D Tropin
Use Coupon Code '1004' to Save $20 Off Your Initial Order of Trans-D Tropin®
V6 Threads Development >> Modifications

Pages: 1
id242
Member
*****

Reged: 05/23/03
Posts: 166
Finished-[6.4-6.5] Search FIX
      #125869 - 03/07/05 11:57 PM

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:

// ---------------------------------------------------------
// The forums we are searching will be in a different format
// depending on where we are coming from



insert BEFORE it:
Code:

// ---------------------------------------------------------
// FIX Search code ===START===
if ($Words != "") {
if (!strstr($Words, '"')) {
if (!strstr($Words, " +")) {
$Words = str_replace(" ", " +", $Words);
// $Words = "+".$Words;
}
}
$Words = str_replace(" +-", " -", $Words);
$Words = str_replace(" ++", " +", $Words);
}
// FIX Search code ===END===



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.


Edited by id242 (07/15/05 05:18 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
FusionGal
User


Reged: 07/22/04
Posts: 46
Re: Beta-[6.3-6.4] Search FIX [Re: id242]
      #126106 - 03/13/05 01:54 AM

Is this an issue in 6.5.1 and, if so, will this work? I, too, have been dissatisfied with too many unfocused search results.

Is it also true that the search engine does not search for strings of words between quotes?

--------------------
Helping the lost & lonely one sweet soul at a time...


Post Extras: Print Post   Remind Me!   Notify Moderator  
id242
Member
*****

Reged: 05/23/03
Posts: 166
Re: Beta-[6.3-6.4] Search FIX [Re: FusionGal]
      #126118 - 03/13/05 08:30 AM

this may also work in 6.5x... but I am currently not running this version.

(Slightly off-topic) I am however running a 100% unmodified version of "mysql.inc.php" from the 6.5x demo version with my current 6.2x highly hacked version - and there are absolutely NO issues. I have found that the error reporting is displayed much better using this file instead of the stock one that comes with 6.2x

--------------------
"Humor is everywhere, in that there's irony in just about anything a human does." - Bill Nye (The Science Guy)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Twisty
Code Monkey
****

Reged: 09/26/03
Posts: 546
Re: Beta-[6.3-6.4] Search FIX [Re: id242]
      #126129 - 03/13/05 12:38 PM

The thing with searches, is that the KISS principle strongly applies. If it's too complicated for the average user to easily grasp then it's going to be far too frustrating and people will just avoid using it.

This is why I like the search functionality in 6.3 the best. It's simple and straight-forward. What I did was hack it up by adding in an extra field to 'limit results by username'. Plus I also coded in the ability to see how many results are returned, with each page showing, for example...

1-25 of 60 (for page 1)
26-50 of 60 (for page 2)
51-60 of 60 (for page 3)

Also, there was a bug in the 6.3 dosearch script which prevented the search 'By Username' selection under Search Options from working that I fixed.

I'm quite happy with it now, very user friendly imho...

http://www.mameworld.info/ubbthreads/search.php?Cat=

--------------------
Twisty

MAMEWorld


Post Extras: Print Post   Remind Me!   Notify Moderator  
id242
Member
*****

Reged: 05/23/03
Posts: 166
Re: Beta-[6.3-6.4] Search FIX [Re: Twisty]
      #126161 - 03/13/05 04:27 PM

Exactly, Twisty! And that is why I wrote this small hack as posted above - because it really does return the search back to the KISS principle.

Many of my members are not programmers and really don't care to be. The use of " + " and " - " in their search arguments is just not going to happen.

So i whipped up the above bit of code so search would work the same functionality as in 6.3x and prior - along with the same ability to select ("hand pick") different forums or cats as you want.

--------------------
"Humor is everywhere, in that there's irony in just about anything a human does." - Bill Nye (The Science Guy)


Post Extras: Print Post   Remind Me!   Notify Moderator  
FusionGal
User


Reged: 07/22/04
Posts: 46
Re: Beta-[6.3-6.4] Search FIX [Re: Twisty]
      #126194 - 03/13/05 11:14 PM

Very nice, Twisty... I imagine this is a bit different than the aforementioned code. Is this something you can share? I like the limit by "username" addition too. Is it, too, possible to place multiple usernames?

--------------------
Helping the lost & lonely one sweet soul at a time...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Twisty
Code Monkey
****

Reged: 09/26/03
Posts: 546
Re: Beta-[6.3-6.4] Search FIX [Re: FusionGal]
      #126204 - 03/14/05 03:51 AM

No multiple usernames aren't supported Sandi. It isn't something that I really find myself needing to be honest.

As for sharing the code, that probably wouldn't work for a number of reasons. I think some of the changes I made are version specific, and furthermore this is something I did a while back and probably can't even remeber what was changed exactly. Sorry

--------------------
Twisty

MAMEWorld


Post Extras: Print Post   Remind Me!   Notify Moderator  
Twisty
Code Monkey
****

Reged: 09/26/03
Posts: 546
Re: Beta-[6.3-6.4] Search FIX [Re: id242]
      #126205 - 03/14/05 04:06 AM

It's a pretty cool concept id242. It's what I'd do as well if using a newer threads version, most definitely.

--------------------
Twisty

MAMEWorld


Post Extras: Print Post   Remind Me!   Notify Moderator  
Myke
Power User


Reged: 09/06/99
Posts: 66
Loc: Sydney, Australia
Re: Beta-[6.4-6.5] Search FIX [Re: id242]
      #127383 - 04/27/05 06:06 AM

Oh my God, thank you! *tears of joy*

Post Extras: Print Post   Remind Me!   Notify Moderator  
Myke
Power User


Reged: 09/06/99
Posts: 66
Loc: Sydney, Australia
Re: Beta-[6.4-6.5] Search FIX [Re: id242]
      #128124 - 06/01/05 09:09 AM

I'm running 6.5.

After installing this fix, did anyone notice the "show all user's posts" when viewing a profile no longer works anymore? The following error message is displayed:

Warning: Compilation failed: nothing to repeat at offset 2 in /path/to/ubb.t/dosearch.php on line 459

I also get the same message if I just try a username search via the search page, except that results are actually shown as well.

Anyone else experience this and have a fix?


Post Extras: Print Post   Remind Me!   Notify Moderator  
Myke
Power User


Reged: 09/06/99
Posts: 66
Loc: Sydney, Australia
Re: Beta-[6.4-6.5] Search FIX [Re: Myke]
      #128269 - 06/09/05 06:32 AM

Quote:

Myke said:
I'm running 6.5.

After installing this fix, did anyone notice the "show all user's posts" when viewing a profile no longer works anymore? The following error message is displayed:

Warning: Compilation failed: nothing to repeat at offset 2 in /path/to/ubb.t/dosearch.php on line 459

I also get the same message if I just try a username search via the search page, except that results are actually shown as well.

Anyone else experience this and have a fix?




Just wanted to share the fix for a problem I reported. BTW, I was getting the same error with the Active Topics and View Recent Messages links.

Anyway, the error seemed to be due to the fact that those specific searches have no search words, yet the fix for this mod assumes there are and starts doing it's string replaces. To fix this, just enclose the fix in an if statement to check for the presence of words before proceeding:

// FIX Search code ===START===
if ($Words != "") {

...

}
// FIX Search code ===END===


Post Extras: Print Post   Remind Me!   Notify Moderator  
id242
Member
*****

Reged: 05/23/03
Posts: 166
Re: Beta-[6.4-6.5] Search FIX [Re: Myke]
      #128692 - 07/12/05 02:26 PM

Thanks Myke. Original post has been updated.

This code-modification has been moved from BETA to FINISHED - Thanks everyone

--------------------
"Humor is everywhere, in that there's irony in just about anything a human does." - Bill Nye (The Science Guy)


Post Extras: Print Post   Remind Me!   Notify Moderator  
AllenAyres
Wizard
****

Reged: 10/12/01
Posts: 5562
Loc: Texas
Re: Finished-[6.4-6.5] Search FIX [Re: id242]
      #128694 - 07/12/05 02:36 PM

thank you, I can use search now intelligently

--------------------
- Allen

- Join Team ThreadsDev

- It's not about you.


Post Extras: Print Post   Remind Me!   Notify Moderator  
huligancho
Lurker


Reged: 08/27/05
Posts: 1
Re: Finished-[6.4-6.5] Search FIX [Re: id242]
      #129160 - 08/27/05 01:01 PM

I dont understand how to do that

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 23 anonymous users are browsing this forum.

Moderator:  JoshPet, Gardener, Ian_W, Anno 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating: *****
Topic views: 4137

Rate this topic

Jump to
 
Hot Topic
No posts have caught fire as of yet.

Developers for Hire
Are you looking for custom modifications? Upgrades? Installs?
We have developers who can help!
View Our Services Page for information.

Login
Enter your username and password to login. If you do not have a username you can register one HERE.
username:
password:

Send Password
Remember Me

Online
113 guests have been online with in the last 90 minutes.

ThreadsDev.com
Trans-D Tropin

Current Threads
No current threads found...

Modifications
Recently Added:
· View Private Messages v0.9.3
· Stop Guests from seeing "Who's Online." [6.5.5]
· User List Display Limited by Post Count 1.0
· Paginate PMs 1.0
· Today and Yesterday

Most Downloaded:
· Inline Images 3.1
· Quote Username 1.0
· Games Arcade Deluxe v1.8
· UbbThreads and Photopost Total Integration Version 4
· Tool Tip Body Preview 3.0

Highest Rated:
· Mass Threads Move for 6.3
· Update Last Posts 1.0
· Update B_Parent User 1.0
· Integrated Index Page (IIP) 5.3.1
· IIP SideBarPal 1.1

Recent Stylesheets:
· Mix-Colors_2-0_3D for UBBT v6.3 - 6.5
· Mix-Colors_2-0 for UBBT v6.3 - 6.5
· Dark-Grey_3-0 for UBBT v6.3 - 6.5
· Green-Orange_1-0 for UBBT v6.3 - 6.5
· ebay_1-0 for UBBT v6.3 - 6.5

Recent Template Mods:
· Postlist modification - line separates new topics and replies
· I need some help with my postlist.tmpl file
· Edit, reply, and quote buttons mod for Facelift 6.5
· Google Add Sense add on for Threads 6.5
· Article templates for Thread 6.5

Shout Box

Short Stats
New Members:
4 Last 24 hours
20 Last 7 days
107 Last 31 days

Boards:
11676 Total topics
73324 Total replies

Totals:
5728 Members
85000 Posts

Max Online:
814 Total
(06/01/06 09:46 AM)


Web Hosting Provided by
VertexHost Web Hosting

Content ©2003-2006 ThreadsDev.NET
Powered By UBB.threads™ 6.5.5

 .: IIP 5.5 by David Lozier ©2003 :. 
Distributed by ThreadsDev.net

Visit Our Sister Sites!
JoshuaPettit.com and ThreadsAddons.com
Web Hosting Provided by
VertexHost Web Hosting

Generated in 0.27 seconds in which 0.244 seconds were spent on a total of 26 queries. Zlib compression enabled.


Whiplash Claims - Handmade Jewellery - Jewellery - Whiplash