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.
 
@Chris D I know it's probably a given, but we assume permissions are respected for trending content items? For example, if forum XYZ is not public but can be viewed by logged in members - then guests won't see trending threads from XYZ?
 
I love this bc my domain is literally about trending topics :)

I've been trying to get myself AWAY from WP and our custom setup, because XF really does have the most robust user system.

Here's how we do our trending content now, and it's something that the top adult sites do too - despite the content they have, their tech is top tier and we should use their concepts for our own non adult needs.

Our top 12 or so posts that's trending is a what people are currently viewing. I think it's on like a 30-60 minute timer, so it's not what's actually viewed RIGHT this instant, bc that would probably be server intensive, but it probably goes by views in the last hour. I forget exactly, but you get the idea. If there's nothing new being viewed in that hour, it just keeps whatever was up there last so the spot is never blank.

We only go by views on that section, but having engagements count in trending content is really amazing because it's way better than just views by people who consume and leave. I love that we can rank things on XF with engagement too, so that could be huge in activity engagement.

We also have filters in place such as most commented, most viewed, most rated (like thumbs up/down), etc and those are lifetime filters. I guess you could put a timeframe on them if you really wanted to, but for my particular project, it wasn't needed.

Anyway, trending content is super cool. Can't wait to test it out.
 
Top Bottom