3

How to get the Top Author of the week based on user points? I have tried http://drupal.org/project/userpoints_ranking but it has no such options. I am using drupal 7

I have vote up/down module and user-points module enabled and a Rules to add user points for every vote automatically, based on that vote i want to have Top Author of the week.

4
  • 2
    Are we to assume that user points are assigned every time that a user posts a piece of content? Or every time a piece of content is viewed? Could you expand on your use-case somewhat, otherwise this question is too ambiguous.
    – Chapabu
    Feb 15, 2013 at 16:34
  • OK, you can assume that user points are assigned every time a user posts a piece of content... but any ideas?
    – rakibtg
    Feb 16, 2013 at 10:05
  • Did you find any solutions? I need this too. Jun 10, 2015 at 10:51
  • No! but what i dead i have created a table and then i did put all the activities/points of a user id on that table and then i fetch the top author from that database table, that does the job.
    – rakibtg
    Jun 11, 2015 at 7:58

1 Answer 1

1

The Userpoints module has Views integration to make this happen:

  1. Create a new view using Userpoints Transactions as the base table.
  2. Add a Relationship, Userpoints Transactions: User.
  3. Select your fields: User: uid & Userpoints Transactions: Points.
  4. Filter on Userpoints Transactions: Timestamp with the Value Type set to An offset from the current time... so you can input your strtotime() offset (e.g. by rolling week, "-7 day").
  5. Enable the Use aggregation option.
  6. Lastly, for the Aggregation Settings on Userpoints Transactions: Points, set the Aggregation Type to Sum.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.