In the template
searchresults replace
PHP Code:
<tr align="center">
<td bgcolor="{[i][/i]tableheadbgcolor}" align="left"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Topic</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}" align="left"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Forum</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}" nowrap><smallfont color="{[i][/i]tableheadtextcolor}"><b>Author</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Replies</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Views</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Date</b></smallfont></td>
</tr>
with
PHP Code:
<tr align="center">
<td bgcolor="{tableheadbgcolor}" align="left"><b><a href="search.php?action=showresults&searchid=$searchid&sortby=title&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Topic</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}" align="left"><b><a href="search.php?action=showresults&searchid=$searchid&sortby=forum&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Forum</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}" nowrap><b><a href="search.php?action=showresults&searchid=$searchid&sortby=poster&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Author</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}" nowrap><b><a href="search.php?action=showresults&searchid=$searchid&sortby=replies&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Replies</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}"><b><a href="search.php?action=showresults&searchid=$searchid&sortby=views&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Views</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}"><b><a href="search.php?action=showresults&searchid=$searchid&sortby=lastpost&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Date</smallfont></a></b></td>
</tr>
In the template
searchresults_threadonly replace
PHP Code:
<tr align="center">
<td bgcolor="{[i][/i]tableheadbgcolor}" colspan="3"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Thread</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}" nowrap><smallfont color="{[i][/i]tableheadtextcolor}"><b>Thread Starter</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}" align="left" nowrap><smallfont color="{[i][/i]tableheadtextcolor}"><b>Forum</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Replies</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}"><smallfont color="{[i][/i]tableheadtextcolor}"><b>Views</b></smallfont></td>
<td bgcolor="{[i][/i]tableheadbgcolor}" align="left" nowrap><smallfont color="{[i][/i]tableheadtextcolor}"><b>Last Post</b></smallfont></td>
</tr>
with
PHP Code:
<tr align="center">
<td bgcolor="{tableheadbgcolor}" colspan="3"><b><a href="search.php?action=showresults&searchid=$searchid&sortby=title&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Thread</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}" nowrap><b><a href="search.php?action=showresults&searchid=$searchid&sortby=poster&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Thread Starter</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}" align="left" nowrap><b><a href="search.php?action=showresults&searchid=$searchid&sortby=forum&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Forum</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}"><b><a href="search.php?action=showresults&searchid=$searchid&sortby=replies&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Replies</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}"><b><a href="search.php?action=showresults&searchid=$searchid&sortby=views&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Views</smallfont></a></b></td>
<td bgcolor="{tableheadbgcolor}" align="left" nowrap><b><a href="search.php?action=showresults&searchid=$searchid&sortby=lastpost&sortorder=$newsortorder"><smallfont color="{tableheadtextcolor}">Last Post</smallfont></a></b></td>
</tr>
In
search.php add
PHP Code:
if ($sortorder=="ascending") {
$newsortorder = "desc";
} else {
$newsortorder = "ascending";
}
right
before
PHP Code:
if ($search['showposts']==1) {
$navbits .= gettemplate("nav_joiner",0);
(towards the end of the file)
This should do what you want. If you wanna give it a try I send you a PM with my demo board.