php forum
php mysql forum
php mysql smarty
 
Topic Options
#217470 - 05/29/02 03:20 PM "Recent messages" instead of "Search results"
Maze Offline
Enthusiast

Registered: 10/13/99
Posts: 468
Well, I don't like the label "Search results for query:" if I actually clicked "View recent messages" on the main page. I didn't enter a search text, so this is not a search result at all (ok, it is a search on the DB, but not for the "normal" user). This fixes this behaviour:<br /><br />In /dosearch.php look for:<pre><font class="small">code:</font><hr> $printwords = htmlspecialchars($Words);</pre><hr> <br />replace with:<pre><font class="small">code:</font><hr> if (!$Words) {<br /> $printwords = "{$ubbt_lang['VIEW_PAST']}";<br /> } else {<br /> $printwords = "{$ubbt_lang['SEARCH_RES']} \"" . htmlspecialchars($Words) . "\"";<br /> }</pre><hr><br /><br />Still in /dosearch.php look for:<pre><font class="small">code:</font><hr>// Send the header <br /> $html -> send_header("{$ubbt_lang['SEARCH_RES']}: $printwords",$Cat,0,$user);</pre><hr><br />replace with:<pre><font class="small">code:</font><hr>// Send the header<br /> $html -> send_header("$printwords",$Cat,0,$user);</pre><hr><br /><br />In /templates/default/dosearch.tmpl find:<pre><font class="small">code:</font><hr>{$ubbt_lang['SEARCH_RES']}: $printwords</pre><hr><br />replace with:<pre><font class="small">code:</font><hr>$printwords</pre><hr><br /><br />Finally in /languages/.../dosearch.php add 1 line:<pre><font class="small">code:</font><hr>$ubbt_lang['VIEW_PAST'] = "Recent messages";</pre><hr>

Top
#217471 - 05/29/02 05:00 PM Re: "Recent messages" instead of "Search results" [Re: mcse007]
caymuc Offline
Enthusiast

Registered: 01/17/01
Posts: 449
Good thinking!<br />Sounds that this is more like a fix to THREADS than an extra.<br /><br />Maybe Scream might suggest this for the release.
_________________________
Carl
Colour-Ize-Forums (test entry: user: 'test' pw: 'test2')

Top
#217472 - 05/29/02 05:09 PM Re: "Recent messages" instead of "Search results" [Re: rodrigo1]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
I agree, very nice improvement! <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#217473 - 05/30/02 08:29 AM Re: "Recent messages" instead of "Search results" [Re: mcse007]
Muhammad Offline
Kahuna

Registered: 09/26/99
Posts: 1289
Loc: Tucson, AZ
I just create duplicate dosearch files, rename them to 12, 24, 48, 7, etc, and then modify them to say "Past 12 hours" or whatever I want... then of course, add the links to the other recent message checks...<br /><br />Example here.
_________________________
Muhammad

Top
#217474 - 05/30/02 09:08 AM Re: "Recent messages" instead of "Search results" [Re: paulj]
Maze Offline
Enthusiast

Registered: 10/13/99
Posts: 468
Or you could check the $Old variable in dosearch.php. There's a block checking for $Old inside dosearch.php anyway for calculating the $time. Just append the appropriate language-string to $printwords and add the new strings to the lang-files.<br /><br />Add some more lines to /languages/.../dosearch.php:<br />$ubbt_lang['VIEW_1day'] = "Past 24 hours";<br />$ubbt_lang['VIEW_2days'] = "Past 48 hours";<br />...

Top
#217475 - 05/30/02 09:40 AM Re: "Recent messages" instead of "Search results" [Re: mcse007]
Muhammad Offline
Kahuna

Registered: 09/26/99
Posts: 1289
Loc: Tucson, AZ
Hmm, that's a good idea, but one wouldn't be able to change the HTML of that page without it also affecting the regular search results... right?
_________________________
Muhammad

Top
#217476 - 05/30/02 09:52 AM Re: "Recent messages" instead of "Search results" [Re: paulj]
Maze Offline
Enthusiast

Registered: 10/13/99
Posts: 468
Only touch the variable $printwords, if $Words is empty<br /><br />if (!$Words) { ... }<br /><br />Doesn't affect the normal search then. Only if the user doesn't type any search-text, but then its also nice to give him the "recent messages" page as result.

Top


Who's Online
0 registered (), 29 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
How to hide sub forums from summary page
by Ruben Rocha
Today at 02:58 PM
Spell Check [beta]
by Bill B
Yesterday at 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
Yesterday at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Yesterday at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Yesterday at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks