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.
 
That's essentially what we have :) The "Hot" ordering and the half life options we've implemented are essentially the same as described in that article. We don't do anything with vote counts by default because not much of our content is focused on votes, but if you have a site that is for example predominantly Q&A based, then including the vote count/score in your weightings would work very well and be producing basically the same kind of results as described in the article.
 
Awesome stuff another one that @BIG LLC will love.
A built in trending content.
I know that there is an addon for this too. Will be perfect that it won't need the addon.
 
We looked at this and those threads actually still get a large number of views. We can adjust the weighting on this site accordingly, but ultimately what weights make sense is going to vary a lot from site to site so there's not a perfect one-size-fits-all.
Maybe it is useful to add the (last post/reply date) as a criteria to exclude some results. For example the last reply in [bd] widget was before 3 years, so even with high views, this thread is not trending anymore.
 
We could potentially add a content date filter, though one consideration we made was that forums are more likely to have content which is relevant in the long term than other platforms. Canonically if older threads still get views they may still have some relevance, though we can reduce or disable the view count contribution here via the options outlined in the first post.

That said, in this particular instance I'm wondering if most of those views come from bots/spiders, so perhaps an option to skip view count logging for them may be useful.
 
Weird Trends.

Indeed 🤔 2 out of 5 are related to XF1.1 since 2012!

We looked at this and those threads actually still get a large number of views. We can adjust the weighting on this site accordingly, but ultimately what weights make sense is going to vary a lot from site to site so there's not a perfect one-size-fits-all.
Before reading these posts I was holding back from asking what I suspect a lot of forum owners might consider an irrelevant question, namely just how far back will the algorithms go.

Personally I find a lot of older content on my forums to be just as relevant today as it was twenty years ago and I know many of my members agree with that. Functionality that digs deep and brings that content back into view is a huge step forward in my view. It's what gives forums an edge over other forms of social media where content is so much more disposable.

I think this a great addition with a huge amount of potential.
 
Before reading these posts I was holding back from asking what I suspect a lot of forum owners might consider an irrelevant question, namely just how far back will the algorithms go.
It pulls from the activity log, so the last 90 days of activity by default. The log length can be adjusted from disabled up to 365 days, as there are performance considerations depending on how busy the site is. Activity isn't recorded retroactively, but recent activity is logged regardless of the content age.
 
We could potentially add a content date filter, though one consideration we made was that forums are more likely to have content which is relevant in the long term than other platforms. Canonically if older threads still get views they may still have some relevance, though we can reduce or disable the view count contribution here via the options outlined in the first post.
I ran into this in the Reddit-like IPS add-on I made. Ultimately made configurable what field (or alias) each feed's algorithm would sort by, what the cutoff date was for each algorithm, and whether to use aggregated scores or not (votes from all posts or just OP).
 
Each widget can specify a cut-off date, it just turns out those threads have actually had quite a few views logged in the past 7 days. We want to build more on this system in the future, potentially including the ability to choose a specific metric to sort by instead of the combined score. In any case we've introduced an option to not count views from all guests or just robots, so we'll see how that shakes out and if not we can just adjust the weights here.
 
In any case we've introduced an option to not count views from all guests or just robots, so we'll see how that shakes out and if not we can just adjust the weights here.
Is such counter introduced in 2.3, since I don't see it in 2.2? xf_thread table has view_count column only.
 
Top Bottom