[ETA: note that in response to the discussion further down in this thread, I renamed this plugin from "Popular recent threads" to "Active threads", and have indicated in this opening post the changes to links that have needed to be made]
In the Idea for a news page in the Wiki section thread, Chris asked:
I couldn't think of a way to do this through our forum's existing web interface, so I wrote a little plugin to do it, which I've named the "Popular recent threads" plugin. Over the course of a day or two, I've enhanced it so that it now supports a fairly helpful set of features. Other than providing a means for Chris and others to identify which threads have been posted to most over the previous week or fortnight, it can be used for another purpose which I'm very pleased with, because it's bugged me that it's been missing from our MyBB forum software until now.
That purpose is listing in order the most recent post to the most-recently responded-to threads going back a given (and arbitrarily long) period of time. Until now, when logged in, we have had only:
Anonymous (non-logged in) users had been left with even fewer options: only the "Portal" link.
The way the plugin I've written supports this function is that it allows for its "Latest post during this period" column to be sorted in descending order: that is, it allows for the ordering of threads by date of latest post to each thread, in order from most recent to earliest. Perhaps the easiest way to demonstrate is by example:
If you click on this link this link, you will be presented with a listing of threads which have had posts made to them within the past two days (whatever the time happens to be). The threads are ordered in descending order of the date of the most recent post made to them. You can also see the earliest post made to each thread within the past two days, and you can sort by that column if you prefer (just click on the column heading). (Incidentally, there is one other sortable column: that labelled "Number of posts during this period").
I implemented the sorting feature by mimicking the way that the Member listing page supports it.
If you want to arrive at the same link as in that example above manually, here are the steps:
Alternatively, at step two, skip the final part (setting the "Sort by" fields), and, after step three, when the page reloads, click the "Latest post during this period" column heading, which will sort that column in descending order.
This page is available to anonymous viewers too, so hopefully it enables easier browsing of the forum for non-members. And as a bonus, the plugin adds support for the "View Today's Posts" link for anonymous viewers.
Please let me know of any comments, questions, suggestions, criticisms, etc that you might have about this plugin. I hope that it's useful to you guys, as I suspect it will be for me.
(This post was last modified: 2021-04-20, 01:52 PM by Laird.)
In the Idea for a news page in the Wiki section thread, Chris asked:
(2020-01-14, 07:51 AM)Chris Wrote: Would there be an easy way of identifying which threads had most comments during the previous week or fortnight?
I couldn't think of a way to do this through our forum's existing web interface, so I wrote a little plugin to do it, which I've named the "Popular recent threads" plugin. Over the course of a day or two, I've enhanced it so that it now supports a fairly helpful set of features. Other than providing a means for Chris and others to identify which threads have been posted to most over the previous week or fortnight, it can be used for another purpose which I'm very pleased with, because it's bugged me that it's been missing from our MyBB forum software until now.
That purpose is listing in order the most recent post to the most-recently responded-to threads going back a given (and arbitrarily long) period of time. Until now, when logged in, we have had only:
- The "View New Posts" link, which only shows the most recent posts that have been made since one's last visit - but this is of no use if one wants to dig back further than one's last visit in order.
- The "View Unread Posts" link, which shows the most recent posts that one has not yet clicked on and loaded (a proxy for having "read" the post(s) in question) - but again, once one has read the posts, there's no way to go back and view the ordered listing.
- The "View Today's Posts" link, which lists the posts from the past 24 hours - but again, this is of no use if you want to go back further than 24 hours.
- The "Portal" link, which lists only the most recent opening posts from threads, without regard for any later posts.
Anonymous (non-logged in) users had been left with even fewer options: only the "Portal" link.
The way the plugin I've written supports this function is that it allows for its "Latest post during this period" column to be sorted in descending order: that is, it allows for the ordering of threads by date of latest post to each thread, in order from most recent to earliest. Perhaps the easiest way to demonstrate is by example:
If you click on this link this link, you will be presented with a listing of threads which have had posts made to them within the past two days (whatever the time happens to be). The threads are ordered in descending order of the date of the most recent post made to them. You can also see the earliest post made to each thread within the past two days, and you can sort by that column if you prefer (just click on the column heading). (Incidentally, there is one other sortable column: that labelled "Number of posts during this period").
I implemented the sorting feature by mimicking the way that the Member listing page supports it.
If you want to arrive at the same link as in that example above manually, here are the steps:
- Click on the View Threads by Popularity View Active Threads link in the header. This is the entry point to the plugin's output page.
- Once on that page, scroll down to the bottom where there is a section heading "Set the period of interest". Change "Days" to "2", and set "Sort by" to "descending" and "Sort by: date of latest post".
- Click "Go".
Alternatively, at step two, skip the final part (setting the "Sort by" fields), and, after step three, when the page reloads, click the "Latest post during this period" column heading, which will sort that column in descending order.
This page is available to anonymous viewers too, so hopefully it enables easier browsing of the forum for non-members. And as a bonus, the plugin adds support for the "View Today's Posts" link for anonymous viewers.
Please let me know of any comments, questions, suggestions, criticisms, etc that you might have about this plugin. I hope that it's useful to you guys, as I suspect it will be for me.