While attempting to remedy the pagination for lists of topics, I got hung up on the fact that one of the parameters supplied for each page link is the dreadful "topicdays" parameter, which sort-of-kind-of allows you to limit the topics in a given forum to only those topics which were updated in the last XXX days.
In practice, this feature sucks. And I'm not even entirely sure anyone uses it, because it clearly sucks and anyone who has tried it knows that it sucks.
To start with, if you click on any of a number of links (the forum name, for instance) you will lose the setting. Also, it doesn't
actually limit strictly to topics updated in XXX days, but rather limits to the nearest page full of topics that sort-of meets that general description.
Which is just
sloppy.
So I changed it. First, passing a parameter on every generated URL (i.e. "/forum/forum2?topicdays=7") is cumbersome within the code (which is why the setting is so easily lost, because not all links respect the parameter).
The solution is that the setting is now stored in each user's per-session cache, meaning that if you make a change to the setting, it will stick -- across all the forums on the site -- until you explicitly undo it or until your session expires (which is after one hour of inactivity). This is quite a bit more robust, and will not be subject to errant links that aren't coded properly.
I've also added a small notice at the top of the page when you are actively limiting the number of topics displayed, so that there is no doubt about why you are only seeing 18 posts in the whole forum. See the image below for an example of that. You can also change the setting from within this notice so as to fine-tune the period of time you want, or you can get rid of the limit entirely by hitting
Undo.
Additionally, the topics shown are actually limited to topics updated in the last XXX days (whatever you've set), instead of just coming within one page's worth of topics.
And finally, I've eliminated the
Go button from beside the popup menu. It's now sufficient to just make a change to the menu and you will immediately see the results.
Nobody actually asked for this, but it was broken and it was also partially preventing better pagination from happening. I hope it's better now.