Just now I've tracked down some problems in the search feature, and discovered that we can, in fact, easily add an option to sort by date or score to Gossamer Forum. To add such a change to your own forum, I've attached the two changed files to this post, and also updated the gforum-1.2.2.tar.gz install file available for download.
Search.pm replaces admin/GForum/Search.pm, and include_search_form.html replaces admin/templates/default/include_search_form.html. Alternatively, if you already have a customized include_search_form.html template, the change involves adding the following after the "Only show posts made by" row:
<td align="right">
<%body_font%>
Sort posts by:
<%/body_font%>
</td>
<td>
<select name="sb" size="1" class="button">
<option value="score"<%if not sb or sb eq 'score'%> selected<%endif%>>Relevance</option>
<option value="post_time"<%if sb eq 'post_time'%> selected<%endif%>>Post date</option>
</select>
</td>
</tr>
If you haven't yet updated to 1.2.2, the updated files below will also work with 1.2.0 or 1.2.1 installations.
[Update, Monday, March 8]: I've replaced the Search.pm file in this post as it led to an error of "unknown column 'score'".
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Search.pm replaces admin/GForum/Search.pm, and include_search_form.html replaces admin/templates/default/include_search_form.html. Alternatively, if you already have a customized include_search_form.html template, the change involves adding the following after the "Only show posts made by" row:
Code:
<tr> <td align="right">
<%body_font%>
Sort posts by:
<%/body_font%>
</td>
<td>
<select name="sb" size="1" class="button">
<option value="score"<%if not sb or sb eq 'score'%> selected<%endif%>>Relevance</option>
<option value="post_time"<%if sb eq 'post_time'%> selected<%endif%>>Post date</option>
</select>
</td>
</tr>
If you haven't yet updated to 1.2.2, the updated files below will also work with 1.2.0 or 1.2.1 installations.
[Update, Monday, March 8]: I've replaced the Search.pm file in this post as it led to an error of "unknown column 'score'".
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com