Previous Thread
Next Thread
Print Thread
Rate Thread
#277231 07/25/2004 1:34 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Mod Name / Version: Search fix

Description: This allows search 'By Display Name' to function (it was busted and returned no results).

Working Under: UBB.Threads 6.3

Mod Status: Beta

Any pre-requisites:

Author(s): Twisty

Date: 07/25/04

Credits:

Files Altered:

dosearch.php
templates/search.tmpl (optional)

New Files:

Database Altered: no

Info/Instructions: In dosearch.php...

CHANGE THIS:

Code
// ------------------------------------------------------------------------- <br />// If we are searching for all posts by a user we need to know their username <br />	if ($Match == "Username") { <br />      $where = "U_Number = '$Words'";


TO THIS:

Code
// ------------------------------------------------------------------------- <br />// If we are searching for all posts by a user we need to know their username <br />	if ($Match == "Username") { <br />      $where = "U_Username = '$Words'";



OPTIONAL:

I also recommend removing the 'By username' entry box from search.php since it appears to be entirely redundant to the 'Words to search for' entry box, and mimics it's behaviour in an identical manner (not to mention causes extra confusion)...

In templates/search.tmpl...

CHANGE THIS:

Code
{$ubbt_lang['SEARCH_WORDS']}<br /> <br /><input type="text" name = "Words" size="30" class="formboxes" /> <br /><br /> <br /><br /> <br />By username<br> <br /><input type="text" name = "byuser" size="30" class="formboxes" /> <br /><br /> <br /><br />


TO THIS:

Code
{$ubbt_lang['SEARCH_WORDS']}<br /> <br /><input type="text" name = "Words" size="30" class="formboxes" /> <br /><br /> <br /><br />



:-)

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.

Sponsored Links
Entire Thread
Subject Posted By Posted
Finished-[6.3] Search fix Twisty 07/25/2004 8:34 PM
Re: Finished-[6.3] Search fix Twisty 07/27/2004 12:28 PM
Re: Finished-[6.3] Search fix Twisty 08/12/2004 2:45 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
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 585
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 18
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)