XF 2.3 Trending content

Since the initial release of XenForo 2.3, there has been a new system working away behind the scenes. One that some developers might have spotted but one that we hadn't actually talked about yet, because it wasn't relevant. Until now!

Let's talk about this somewhat underlying system first.

Content activity log​

This is a generic system, based on content types, which we strongly recommend you consider using for your own add-ons. Essentially what this does is keep a log of content and tracks various metrics including view counts, reaction count, reaction score and content vote counts/scores. A deeper dive into the technical bits involved in its implementation is beyond the scope of this post, but developers might want to check XF\ActivityLog\AbstractHandler, and one of the implementations for threads or posts.

You can control how long activity logs are kept for using the "Activity log length" option:

1712339680002.webp


On its own, the system doesn't do anything but let's look at how we're going to use it in XenForo 2.3.

Trending content​

Trending content is a new way for users to discover the popular content happening on your forum. We very much see this as a precursor to grander improvements to content discovery in general in the future, focusing around helping users find the content that matters; the content that is currently "hot" or otherwise popular.

1712338857154.webp


For now this is a widget that you can add wherever you want, by default we'll be adding this to the various forum overview pages including the forum list and what's new pages. But you can place yours anywhere you like. Let's take a look at the widget settings:

1712340545268.webp


Contextual content​

Trending contents are fully context aware, and you can control the behaviour of this here. For example, if the widget is enabled on a forum specific widget position, the widget can be configured to display only trending threads from this forum.

Ordering​

The two options here are "Hot" and "Top" and these decide how the results are ordered. Results which are ordered by "Hot" are more heavily weighted by how recent the content is. This is probably the best choice for busier forums.

Duration​

This is the number of days we calculate metrics over. We default this to 7 days, but you can make this as long as the value of the "Activity log length" option.

Content type​

This is where you can restrict the widget to only displaying a specific content type. By default this will be a mixed list of all content on your forum.


We also have a few options to more granularly control how trending content is calculated:

1712340182995.webp


Trending content weights​

You have full control over how the metrics from the activity log are weighted towards trending content. By default we don't include reaction count, vote count and vote score as these are less relevant for mixed content type lists. But you may choose to weight any of the metrics here more or less heavily depending on what metrics you feel are more relevant to indicate what is trending.

Trending content half life​

This is used to tweak how recency of content affects the "Hot" ordering of your trending content. After the period defined here, the weights of the activity log metrics are worth half as much.

And that's it for today. We have enabled the widget here with its default configuration and positions so you can check it out ahead of its release in Beta 4 hopefully next week.
 
"Thread" prefixes in the widget are logical, but so many repetitions of the same word feel weird. Maybe to move prefixes into the small grey author sections, it will be something like "Thread by ...", "Resource by ..."
 
Given the settings mentioned above, it's odd to me that the main trending thread is from over a decade ago, and its current most recent reply is two years old.

1714773614338.webp
 
A lot of those are down to views from bots we can't track :( The top thread has over 4 million views while the next highest in the same forum only has 98 thousand. I don't think we've disabled view tracking for guests here, but the option is available to do so.
 
heh yeah. i am facing a similar issue on my board. 2-3 threads are basically so old and irrelevant to anything on topic that they should not appear here and are definitely not getting a lot of actual human traffic. but since they have tons of pages, bots are definitely hammering them and resulting in inflated view count. i have tried tinkering with the algorithm code by reducing the weight of views but somehow that does not help much. in the end, views are more essential than replies for this widget in any case.

i request xenforo devs to consider updating their robots database in collaboration with the developer of Known Bots @Sim. i am not sure if using this addon automatically extends xenforo database of bots used for this widget. posted a query here.

but definitely worth considering providing a way to basically just hide some threads from appearing on trending. i suppose i can put them in a non public node which should take care of it but i would hate to do that. thanks!

I would have also liked a dedicated page for trending content like there is one for featured so that users can see more of the content that is popular onboard instead of just the ten or so configured in the widget. The data is already there lying unused in the end. But I suppose this is to be posted as a feature request instead of the discussion here.
 
Last edited:
Known Bots should already work with the option to skip robot view counts, I think, and as I said above you can also disable guest view counts entirely. I'm not sure we're committed to maintaining comprehensive bot detection ourselves, given what a cat-and-mouse game it becomes in the long term unfortunately.

I do think the ability to blacklist individual content is worthwhile though.
 
I'm not sure we're committed to maintaining comprehensive bot detection ourselves, given what a cat-and-mouse game it becomes in the long term unfortunately.

I agree - it's definitely not a particularly productive use of time given how frequently user agents change and how inconsistently they are implemented.
 
oh i get that. i was more talking about the more established and stable newer players with officially listed Bots/IPs. i am not sure how regularly core database is updated. but there are a lot of newer bots in town like OpenAI and Google Extended which should be safe to add to core which benefits everyone outside the box. Thanks!
 
i am facing a similar issue on my board. 2-3 threads are basically so old and irrelevant to anything on topic that they should not appear here and are definitely not getting a lot of actual human traffic.
Existing widget for trending content includes functionality to limit thread inclusion by date of last post or date of thread start within a criteria of x number of days. Essential I believe, and without similar functionality in core IMHO it's trending content widget will be next to useless, mainly just self-fulfilling and propagating bots and search engine visits. I want trending content for users/members that engage with the content, not just consume and disappear.

Screenshot 2024-05-05 at 15.25.36.webp
 
I want trending content for users/members that engage with the content, not just consume and disappear.
You can already exclude view counts from the calculation entirely via the weighting options detailed in the first post.
 
You can already exclude view counts from the calculation entirely via the weighting options detailed in the first post.
Yes, and those weightings and their calculation/application to a thread will be largely difficult to calculate or comprehend . Without knowing the weight score applied to threads, it will be challenging to work out why threads expecting to be within trending are not appearing. And thus what changes/tweaks to the config you need to make to have the threads you want appearing.
 
A lot of those are down to views from bots we can't track :( The top thread has over 4 million views while the next highest in the same forum only has 98 thousand. I don't think we've disabled view tracking for guests here, but the option is available to do so.

Could views by logged-in users be counted separately? I appreciate that would exclude members who are not logged in, but it would exclude all robot views and give a truer picture of trending content that members have looked at.

Or would that overly complicate it in terms of logging who views what content?
 
Not presently.

 
This is an awesome feature for sure, but having to scroll all the way down to look for the latest posts is getting tiresome. IMO, latest posts should come first.
 
This is a great feature, but having the top trending content be a thread with no replies in over 10 years, and especially the top thread being a thread that is locked, there should be some better controls over those things. Don't include threads over x days/months/years old, and maybe an option to not include threads that aren't open.
 
Top Bottom