Dockaych
10-11-2003, 08:01 PM
Author: Dock
Description:This is a really, really, simple template modification. It basically adds the ability to choose whether to see the search results as posts or threads. I wanted to add this because I found it annoying using the 'simple search', but then realising I wanted to see posts instead of threads.
I realise that it's possible to click on the 'Searched for' text to go back to the search page, but this is nicer IMO :) I don't know whether this is useful for anyone.
EDIT: 1.1 - I changed the code so that it recognises whether it is on threads or posts, and offers to toggle to the other view.
EDIT: 1.2 - I fixed the code so that it doesn't show on the getnew page.
In the 'SEARCH-FORUMS' template, search for:
Search took <b>$searchtime</b> seconds.
and replace with:
Search took <b>$searchtime</b> seconds.
<if condition="$action == 'getnew'">
<else />
<if condition="$search[showposts]">
<b><a href="search.php?$session[sessionurl]$searchquery&showposts=0&do=process">See results as
threads</a></b>
<else />
<b><a href="search.php?$session[sessionurl]$searchquery&showposts=1&do=process">See results as posts</a></b>
</if>
</if>
Example: See attached image
Description:This is a really, really, simple template modification. It basically adds the ability to choose whether to see the search results as posts or threads. I wanted to add this because I found it annoying using the 'simple search', but then realising I wanted to see posts instead of threads.
I realise that it's possible to click on the 'Searched for' text to go back to the search page, but this is nicer IMO :) I don't know whether this is useful for anyone.
EDIT: 1.1 - I changed the code so that it recognises whether it is on threads or posts, and offers to toggle to the other view.
EDIT: 1.2 - I fixed the code so that it doesn't show on the getnew page.
In the 'SEARCH-FORUMS' template, search for:
Search took <b>$searchtime</b> seconds.
and replace with:
Search took <b>$searchtime</b> seconds.
<if condition="$action == 'getnew'">
<else />
<if condition="$search[showposts]">
<b><a href="search.php?$session[sessionurl]$searchquery&showposts=0&do=process">See results as
threads</a></b>
<else />
<b><a href="search.php?$session[sessionurl]$searchquery&showposts=1&do=process">See results as posts</a></b>
</if>
</if>
Example: See attached image