Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Northern_Girl on
Hi.
I'm trying to built a view of most active users. I got part of it using aggregation/count (nid). But I want something a bit different.
I'm looking for a view that would show randomly one user picture within the top 10 of most active users (that have posted the most content). Just cannot find the way to search randomly inside the query giving this top 10.
Some help would be much appreciated.
Comments
Don't think it's possible
Don't think it's possible without a little bit of coding. The easiest way is probably to limit the view to 10 items and then implement:
https://api.drupal.org/api/views/views.api.php/function/hook_views_pre_r...
and instead of shuffling the results as in the example just unsetting all the unwanted items.
I like cookies!
Thanks...
... for pointing into a direction. I'll look into that.
NG
Drupal in the snow