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

   "Recent messages" instead of "Search results" to Del.icio.us Add to del.icio.us
  Digg "Recent messages" instead of "Search results" Digg it
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


Top Posters Last 30 Days
AllenAyres 20
Gizmo 10
blaaskaak 2
S7ARBVCK 2
Iann128 1
Claus1 1
M4D 1
Who's Online
0 Registered (), 35 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Security Patch released for all 7.x versions
by AllenAyres
Yesterday at 08:00 PM
What do you use to edit the files
by AllenAyres
Yesterday at 07:54 PM
Team UBBDev Rides Again!
by AllenAyres
Yesterday at 07:32 PM
Here I am! Rock me like a Hurricane!
by AllenAyres
Yesterday at 07:20 PM
BeyondCompare v3.00
by AllenAyres
Yesterday at 07:16 PM
[7.3.1] add search to showmembers page
by AllenAyres
Yesterday at 07:13 PM
Noob - need help, or a reality check!
by Gizmo
09/04/08 03:21 AM
New Mods
[7.3.1] add search to showmembers page
by blaaskaak
Yesterday at 04:50 AM
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks