Trending Content: Option to exclude nodes from trending content

VBX Co

Well-known member
We'd like an option to exclude nodes/forums from trending content.

Our off-topic forums are busy, but they are for members to chat and waffle and we don't need the busy game/quiz threads popping up in trending content all the time, especially as they're of no interest to the on-topic crowd or guests/potential new members. We also have personal and financial member-only sections that we wouldn't want featured in trending content either, so an option to exclude would be cool. 😎

Thanks
 
Upvote 51
It's a little hard to comprehend why something as simple and useful as this has not been included, while its common case to do so for other widgets and functions. It would be very nice to see this in an upcoming release.
 
Same here. We have an off-topic area and a staff area--these should not ever appear in the Trending list.

Similarly, I am going to have a "news" section taht will eventually become the site's main page, and I want Trending to work only on forum discussion nodes. If I post a bunch of news items, I don't need them knocking active discussions way down or off the list.

There are other changes I need as well (such as, allowing only a fixed number of trending threads per node, so a busy node doesn't dominate the list). But I may need to make a new suggestion for that. Essentially I only want three threads per node to display. If the busiest node dominates, casual visitors don't even notice discussions in the areas with far less activity.
 
The trending widget respects permissions, ensuring that content from the staff area remains visible only to staff members. However, it may not be particularly useful to display such content.
He probably knows, but still, should not be included in the trending widget. It makes absolutely no sense.
 
It makes absolutely no sense
Why not?
For the staff this is actually not useful (although...) but why couldn't members who have permission to access forums with premium content see it appear in the trending widgets? It makes perfect sense depending on what you want to do. Fortunately we will have the choice, what would not make sense is that private forums cannot be included in these widgets.
 
The trending widget respects permissions, ensuring that content from the staff area remains visible only to staff members. However, it may not be particularly useful to display such content.
For our purposes, you're correct--it's not useful. If the staff has several active threads, there's no need to have it "pollute" what's happening in the public side of the forum in the trending list. I'd rather have staff see what's trending to our visitors. (It's a good indicator of which threads have high activity among visitors and, if it's a contentious topic, to monitor it more closely to make sure the thread doesn't go off the rails.)
 
Why not?
For the staff this is actually not useful (although...) but why couldn't members who have permission to access forums with premium content see it appear in the trending widgets? It makes perfect sense depending on what you want to do. Fortunately we will have the choice, what would not make sense is that private forums cannot be included in these widgets.
That’s what I meant. 😜
 
Upvoted!

I have been scanning through every available option to get some of the old useless threads out of the trending content widget. Excluding forums is a must.

Not including posts after a specific date should also be considered.
 
Our off-topic forums are busy, but they are for members to chat and waffle and we don't need the busy game/quiz threads popping up in trending content all the time
Also, this suggestion would follow the logic XF already has in place. They allow us to not include certain node posts in the post count, in fact, here on XF in the Off topic section, posts do not count toward post count, meaning they consider them of lesser value and not worthy of counting. Let's see this logic applied to Trending.
 
what creates an odd issue for me wrt trending threads is that if i merge a bunch of old threads for whatever reason, it seems to count them as fresh replies in the final merged thread pushing it to the trending widget. small annoyance.
 
Minor tweak for now:
Edit template widget_trending_content.

Find
HTML:
                    <xf:foreach loop="$content" value="$item">

There should be three of them as there are three styles for this widget. In my example, I am only doing it for the first one, simple, that shows in the sidebar. But, you can do it to all 3 or whichever you use.

Put in a new line:
HTML:
<xf:if is = "!in_array($item.node_id, [3, 18])">

Replace 3 and 18 with a digit (node id) or comma-separated digits (node ids) as shown.

After that and before the next </xf:foreach> place in </xf:if>.

Since I am ignoring content from nodes 3 and 18, only 1 item will appear.

1728435014255.webp

So, I can do one of two things: 1) allow only 1 item to show up, or 2) edit the widget and crank up the maximum entries to 15.

1728435157832.webp

I emphasize "Simple" as I didn't edit all three loops, just the simple one that will be displayed in the sidebar for this demonstration.

And the results will be similar to when I just had it showing 5:

1728435271485.webp

The problem with this method is that you'll need to adjust the maximum entries if it jumps up too high (a list of 10) or goes down too low (a list of 3).

However, it's a quick patch until there's a widget preference for excluding nodes.
 
Minor tweak for now:
Edit template widget_trending_content.
Is this template modification excludes media and resource content from the widget?

Edit: seems to not but that's create server errors...
Code:
InvalidArgumentException: Accessed unknown getter 'node_id' on XFMG:MediaItem[316] src/XF/Mvc/Entity/Entity.php:228
Generated by: Jean-Paul Oct 9, 2024 at 8:20 AM

It will works well if the widget is set to only display threads.
 
Last edited:
Back
Top Bottom