PDA

View Full Version : [RELEASE] No threads found - try raising the lookback period


10-24-2000, 03:06 PM
When forums are set to show only message threads that are new or changed during the last 5 days, often a reader is shown an empty table on account of there being no new or changed message threads during the last 5 days.

I wanted to be able to help out the newbie users by displaying a message that told them what the "problem" is, and how to fix it (namely, adjust the lookback period upwards, to view message threads that are new or changed during the last 10 days, etc.).

In forumthread.php, find this:

} else {
$pagenav="";
}
// parse header ##################


and replace with this:

} else {
$pagenav="";
if ($countposts[threads] == "0") {
$noresults = "There are no message threads
that are new or changed within the lookback period
you've specified above (\"Last 5 days,\" etc.); please
select a longer lookback period and then click \"Go.\"";
}
}



Then go to the forumdisplay template and drop $noresults into an appropriate place -- I just changed "$pagenav" to "$pagenav$noresults" and the message seems to drop into the results table in the right place when there are no results (message threads new or changed) to display.

Sample (link to a quiet message board, which probably has no new or changed messages during the last 5 days):

http://benefitsboards.net/forumdisplay.php?forumid=10&daysprune=5

10-26-2000, 04:13 PM
Very nice. I have been looking to add something to tis effect since my UBB. Thanks.