Can I create View for "most userpoints in last x days/weeks"

esllou - June 24, 2008 - 19:22
Project:User Points
Version:5.x-3.7
Component:Code: userpoints_views
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

thanks for a great module. I was looking through the Views integration and can't see how to do what I would like: create some time-based views with userpoints integrations.

so for example a View such as "last 30 days' Userpoints" which would show a rolling list of the biggest points earners in the last 30 days". Is that possible?

#1

kbahey - June 25, 2008 - 14:20

Not at the moment.

Any query on points that has a time/date dimension has to use the userpoints_txn table to do so. Depending on the size of the site, this can pose some scalability issues.

#2

esllou - June 25, 2008 - 19:44

OK, great, no problems. It isn't really that important, just thought it would be a nice thing to add. How about a sql query to find out biggest userpoint earners for last X days? Would that be simple? I could then add that block in my online newsletter.

#3

kbahey - June 25, 2008 - 22:04

Yes, you can do that too.

It still has to sift through the userpoints_txn because of the time dimension of the query.

If you do that, then cache the results and refresh them once an hour or once a day so it does not add a lot of load on the database.

#4

kmillecam - June 25, 2008 - 22:25

You may want to check out the User Points Top Contributors module. It can be configured to generate lists of points earned in a designated period.

It creates its own table (using data from userpoints_txn) that gets refreshed at cron time.

AttachmentSize
top1.jpg209.13 KB

#5

jredding - July 25, 2008 - 07:07
Status:active» closed

Top contributors module seems to fix this issue so I'm closing it.

 
 

Drupal is a registered trademark of Dries Buytaert.