Anyone know how I would do a view for active members? As in a member that had just published a blog, story, etc.. TIA

Comments

CleanCutRogue’s picture

Are you wanting to do it in pure php or in a "view" ? How are you defining "just published a blog, story, etc."? Do you mean within the last x minutes? Is this supposed to list the users with links to their profiles, or is it supposed to list the content they've recently added, grouped by user?

johnhesston’s picture

Thanks for helping. I want to do it in views or block doesn't matter. Just shows members that had just posted anything. Lists members only, no content just like "new members" view
Thanks

johnhesston’s picture

Can anyone help? I'm sure this is easy to do. I'm just too new at this! What's a bro gotta do to get some help around here? Keep bumpin the thread?

Anonymous’s picture

I would create a view that displays the author name in a list view format. The only field in the view would be Node: Author Name. I would use Node Published = Yes as a filter. I would add a sort criteria of Node ID = Descending. This should provide you a view that lists the author name with a link to the profile for the most recent posts.

Rob Safuto
Learn By The Drop is a place to learn Drupal. If you're new to Drupal I recommend having a look at my Beginner's Guide To Drupal.

johnhesston’s picture

Ahhhh thank you. I had everything correct except for Node: Author Name. Instead I use Usernode:Name which gave me a "new members" view instead of "active members" view

Blueeeeie’s picture

Hi,

I followed your suggestion.

But when a member posts or creates multiple content at 1 shot, then that member's image and username will appear many times in that view.

I think the desired effect was to show the image of the latest member who had posted without repeating it over and over again if that member creates multiple content at 1 go.

Is there an additional filter to add to prevent that from happening?

regards,
jamie

Anonymous’s picture

Try using node distinct. I'm not sure how well it will work, but the discussion taking place here (http://drupal.org/node/256148) might help you get it working the way you want it to. Otherwise you may have to search for a php code snippet that can ensure no duplicates are listed.

This has the potential to be a complex issue. You can get into questions like, What does it mean to be active? How do you prevent users from hogging up all the time at the top of the activity queue? That might not necessarily be a bad thing but some people like to keep an eye on that. Those ideas make me think that it would be great to have a module that allows an admin to define what it means to be active as a user and have some control over how active users are displayed. The activity module (http://drupal.org/project/activity), only Drupal 5 at the moment, may be a step in the right direction.

Rob Safuto
Learn By The Drop is a place to learn Drupal. If you're new to Drupal I recommend having a look at my Beginner's Guide To Drupal.

sylvaticus’s picture

http://drupal.org/node/783894

That code snippet lists all users that authored some content-type, but you can easily change it to include only nodes modified whitin a certain time (just add a WHERE statement in the db_query).