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.
 
It is a counter which counts views so yes viewing a thread increments its view counter.
One reason why this surprised me was that I recently checked how resource downloads are tracked, and they are done on a per-user basis... So 100 downloads by one user only adds 1 to the download counter. (This creates issues for the size of the darn table that tracks this, of course.)
 
Yes this is true, though slightly expanded because it tracks user downloads per version. One user downloading two different versions counts as two downloads.

But I think for downloads that's a reasonable way to do it. We don't aim to count views with any sort of uniqueness, not least because that's difficult to enforce when it's also counting guest views.
 
If the magic formula for trending can be tweaked, I would think that replies should have a higher weight than views and views from logged in members should weight more than views from guests. Otherwise, threads highlighted any trending widgets will become self reinforcing trend leaders as they have more visibility (to get more views) - or is that the desired point?
 
Do I understand it correctly that a thread could be considered as Trending by the functionality if the thread gained hundreds of thousands of views decades ago but is no longer getting significant views or activity?
 
What do you mean? It is algorithm based. This is an algorithm but they can take many forms. For example trends on X can be based on people or topics you follow. Ultimately what we have here is very similar to implementations on sites like Reddit though there is likely more filtering, metrics and conditions involved.

So such a suggestion would really need to explain specifically how you would want things to change.

It would be much more interesting if it were individualised based on user history or and behaviour (user to forum/user to user interaction). I haven't really inspected it yet so I am 100% sure if some of what I am referring to has or hasn't been implemented, but I see threads in XF Trending widget that are irrelevant to me.

View/clicks (perhaps certain keywords in title or first post over a period of time)
Watch
revisit
Reaction
Post
user follow etc.
 
I would think that replies should have a higher weight than views
They do, and it can be configured as detailed in the first post.

and views from logged in members should weight more than views from guests
We don't draw a distinction, but a new option has been added to ignore views from robots and/or guests entirely.

Do I understand it correctly that a thread could be considered as Trending by the functionality if the thread gained hundreds of thousands of views decades ago but is no longer getting significant views or activity?
No, the calculation only includes recent activity (the last 7 days by default).
 
If we don't want to use the widget but still need trending threads for a single forum for example.. are there any new finder methods or anything we can look at now? Just curious if we can use the trending threads functionality outside of the widget

And yeah, this is an amazing addition that was really necessary imo - great choice!
 
If you wanted to roll your own thing yes you could do that; we'd recommend using the code in the widget class as a reference.
 
This is great.

But once again (like most other widgets) it's IMHO missing the option for users to directly interact with the content (React, Watch, Reply / Comment, ...) without having to leave the page to open the thread.

Unless I am missing smth. the only widget that allows direct iteraction (so far) is New Profile Posts.

Allowing users to interact with content without having to leave the current page IMHO really could be beneficial for activity.
 
This is great.

But once again (like most other widgets) it's IMHO missing the option for users to directly interact with the content (React, Watch, Reply / Comment, ...) without having to leave the page to open the thread.

Unless I am missing smth. the only widget that allows direct iteraction (so far) is New Profile Posts.

Allowing users to interact with content without having to leave the current page IMHO really could be beneficial for activity.
I think you hit the nail on the head there.
 
If we don't want to use the widget but still need trending threads for a single forum for example.. are there any new finder methods or anything we can look at now? Just curious if we can use the trending threads functionality outside of the widget

This is what I'm hoping for, the ability to use this to sort threads within forums (y)
 
So, now that I installed it on my primary location (after taking enough backups)... I just noticed how trending content appears.

Can I just have thread title Roku Data Breach instead of Thread 'Roku Data Breach'! I never noticed this here.
 
Top Bottom