justoverclockl / hot-discussions

Widget that display "hot" (most answered) discussions in Flarum
MIT License
6 stars 6 forks source link

Question: What are the factors for hot? #5

Open therealmaxmoon opened 1 year ago

therealmaxmoon commented 1 year ago

I am worried the same posts will be in the list all the time, if it's only about the amount of posts, because posts in the hot list, get intention and people might post even more there.

But if it's time based (like most posts the last 3 days), this could work very well.

danirod commented 2 months ago

To anyone reading this issue and interested in an answer, I had the same question after deploying the widget in a forum and wondering the same, so I looked at the code, and the answer seems to be that the more posts a discussion has, the hotter it is.

https://github.com/justoverclockl/hot-discussions/blob/c20780ed8e1c16c41975b4abbfa2da689dc309b3/js/src/common/components/hotDiscussionsWidget.js#L26-L36

But, yeah, it is not time based.

To be fair, it is difficult to guess the available filters without looking at the backend code for Flarum. There is actually a filter for discussions called created that allows to search for discussions started in a specific date range, something like created:2024-09-02..2024-09-05. However, this would exclude discussions that are older but still popular and receiving new posts in the last couple of days.