PDA

View Full Version : Hi, suggestion to improve the search feature



The Man
10-02-2003, 12:07 AM
Add this:


// aaron's uber-1337 search enhancement hax //

if (($bbuserinfo[maxposts] != -1) and ($bbuserinfo[maxposts] != 0)) {
$maxposts = $bbuserinfo[maxposts];
}
if (($searchresult[replycount]+1)>$maxposts and $linktopages) {

$totalpages=($searchresult[replycount]+1)/$maxposts;
if ($totalpages!=intval($totalpages)) {
$totalpages=intval($totalpages)+1;
}

$acurpage=0;
$pagenumbers='';
while ($acurpage++<$totalpages) {
if ($acurpage==$maxmultipage) {
eval("\$pagenumbers .= \"".gettemplate('forumdisplay_multipagenav_more')."\";");
break;
} else {
eval("\$pagenumbers .= \"".gettemplate('forumdisplay_multipagenav_pagenumber')."\";");
}
}
eval("\$searchresult[pagenav] = \"".gettemplate('forumdisplay_multipagenav')."\";");
} else {
$searchresult[pagenav]='';
}

// aaron's uber-1337 search enhancement hax //into search.php above this:


$frmjmpsel[search] = " selected class=\"fjsel\"";
makeforumjump();
eval ("\$searchresultbits .= \"".gettemplate("$searchtemplatebit")."\";");
}Then, you will need to edit the searchresultbit_threadonly template and change this line:


<td bgcolor="{firstaltcolor}" align="left"><normalfont>$searchresult[gotonew] $searchresult[typeprefix] $paperclip<a href="showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]$highlightwords">$searchresult[threadtitle]</a></normalfont></td>
to this:


<td bgcolor="{firstaltcolor}" align="left"><normalfont>$searchresult[gotonew] $searchresult[typeprefix] $paperclip<a href="showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]$highlightwords">$searchresult[threadtitle]</a> </normalfont><smallfont>$searchresult[pagenav]</smallfont></td>

This will cause thread-only search results to return page numbers, which is really quite useful for any message board that gets an appreciable amount of traffic. Check http://216.97.98.128/forum/search.php?action=getdaily for an example of this nifty feature in action. It's not really much of a complicated hack, and I think the benefits it returns are bloody well worth it. :P

Note: I just wrote this hack myself. ;)

Citizen Bleys
10-02-2003, 12:19 AM
:skull::skull::skull::skull:er, I didn't know it was you until I actually saw your signature.

Die.

The Man
10-02-2003, 12:22 AM
rofl, who else would post elaborate hack suggestions like this? xP

crono_logical
10-02-2003, 12:25 AM
I saw the word aaron in the comment and glossed over the rest of the post :p

Yamaneko
10-02-2003, 12:26 AM
Originally posted by Deathjester
Note: I just wrote this hack myself. ;)
We can't use it then. :ezpimp:

Edit: Damn you, add The Pimp!

The Man
10-02-2003, 12:32 AM
Yams makes an even better suggestion than mine. :ezpimp:

Citizen Bleys
10-02-2003, 12:34 AM
Bugger the pimp in the rectum with a diode.

The Man
10-02-2003, 12:35 AM
>:O

Citizen Bleys
10-02-2003, 12:35 AM
Try me. Just try em/

The Man
10-02-2003, 12:36 AM
*tries Bleys*

Citizen Bleys
10-02-2003, 12:37 AM
There's always a riesen for the chocolate chew

Yamaneko
10-02-2003, 12:43 AM
This hack is great! Oh wait... it hasn't been installed.

The Man
10-02-2003, 12:46 AM
<z>

m4tt
10-02-2003, 02:03 AM
And it WON'T BE :aimmad:

eestlinc
10-02-2003, 04:48 AM
actually, it sounds like a great hack. it is ridiculously annoying to wade through eight page threads just to find the specific post you searched for. I know it highlights the searched words, but still. Yes, I do these searches on a semi-regular basis.

crono_logical
10-02-2003, 04:59 AM
Or you go back to the search page and refine your search parameters, making sure you've selected post search instead of thread search :p

eestlinc
10-02-2003, 05:22 AM
you could do that, but what fun would it be?

Yamaneko
10-02-2003, 06:05 AM
Just install the hack already. :cool:

crono_logical
10-02-2003, 10:47 AM
Aaron's, or the ezpimp? :p

Raistlin
10-02-2003, 04:17 PM
Both. :ezpimp:

Dr Unne
10-02-2003, 04:25 PM
Both, as in neither? Agreed. *closes thread*

Aw crap. Some habits are hard to break.

crono_logical
10-02-2003, 05:26 PM
I can't add one since I don't have access, and won't add the other either anyway :p