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's the same count, but as described in the first post the content activity log buckets the metrics by date.
 
So new Content activity log contains both view_count and view_count_without_bots?

Since you implemented the logic to detect bots, why counting them at all?

view_count column in xf_thread table should also exclude bots, just like GA4 does:
 
Not quite, there is just a single column. The option controls whether the view is counted at all (ie. if robot views are disabled, the view is simply not logged in any fashion). It doesn't apply retroactively but the content activity log is ephemeral anyway. And it applies to the xf_thread table as well.
 
The previous behavior is retained currently but I guess it's hard to imagine that being unreasonable to change.
 
Functionality that digs deep and brings that content back into view is a huge step forward in my view
I find forums have wildly differing views on old content. It tends to be either

  • Don't revive (necroposting) old (zombie) threads or
  • Don't start a new topic if it has already been asked
e.g. on the Wordpress plugins support forums threads are closed after a few months. So even if you have the same issue as someone else and found a solution that would be helpful, you can't post it there you must start a new thread and the OP of the first one may well not see it.

On Apple Support discussions they seem steer you to the same problem threads.

I prefer the second approach as I think it helps searches - both on site and search engines as there is one thread with meatier content and more likely to be found in long tail searches. The Similar threads widget helps with this and that brings me to my point. Hot needs to be current because that is its purpose, but if Trending is supposed to be popular I can see a use for some kind of combination with Similar Threads - or maybe just a refinement of Similar threads to weight towards the trending filters such as vote or reaction. Having said that I think there has already been discussion that Similar threads needs refining in other areas such as weighting towards titles.
 
Last edited:
I find forums have wildly differing views on old content. It tends to be either

  • Don't revive (necroposting) old (zombie) threads or
  • Don't start a new topic if it has already been asked
We fall into the former category, primarily on the busiest forums. Reason being, some threads go on for hundreds of posts, and the type of discussions that take place often get dated. In other words, someone coming in new may not realize everyone is talking about an older version of something vs. newer, and then the thread veers off topic, making it difficult to find in the future. I even stress that staff makes sure threads stay locked, but some get into a pissy fit and unlock them just to spite the rest of us, apparently. There also SEO reasons related to my explanation here--I'd rather see us with a few different threads, with the more recent threads being listed in search results, rather than have them all piled into one long thread that does nobody a bit of good.

With that in mind, I think a way to tell the Trending Content system whether to include locked threads or not. This is good for many reasons, especially when some of the most popular threads could turn sour (arguing starts, or someone injects politics). They might still get views anyway, but we'd rather they just sink quietly into the woodwork and be overlooked.
 
It would be nice to be able to exclude threads based on discussion_state, discussion_type, discussion_open, sticky, prefix_id, minimum(reply_count) , number of distinct users per thread and create forum homepage very similar to Reddit.
 
I have a couple long-running (as in, intended to never end until the site does) threads that are quite active and might need to be excluded to favour actual discussion. But I will see once I get it in my test environment.
 
Since this aggregates all the content types what would be great is to be able to turn off trending to simply use this as a new content widget and "What's new" replacement. Being a widget, you could of course, then have both. But this does look like a step in that direction per:
We very much see this as a precursor to grander improvements to content discovery in general in the future
 
Since this aggregates all the content types what would be great is to be able to turn off trending to simply use this as a new content widget and "What's new" replacement. Being a widget, you could of course, then have both. But this does look like a step in that direction per:
And in another sense, this is probably a hint at where XF 3 is pointing... 😉

I didn't mean to pick apart a new feature above, but I like to think that the team recognizes some of our own experience and can use that to help guide the direction of tweaks on the current version, and improvements for the future.
 
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.
Can view stats be correlated with dates? Say, I want to know how many views a thread has attracted over a specific time/calendar interval. Can I do this?
 
Can I make a thread trending by viewing it and repeatedly clicking F5?
Does that increment the view count? I have not thought to to try. If it does, then this might work. Hoping not, though.

My main concern will be keeping certain threads by certain users from trending. Something I will test, anyhow.
 
Can view stats be correlated with dates? Say, I want to know how many views a thread has attracted over a specific time/calendar interval. Can I do this?
Within the bounds of the content activity log, yes. The metrics are only bucketed by date though, not time.

I also would like some clarity on this question.
Not currently, though a contextual widget can be displayed in a forum to pull results from only that forum. As we build on this system going forward we hope to expand it with additional options and filters.
 
Top Bottom