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. ;)
// 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. ;)