Active
Project:
User Points Top Contributors
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2010 at 05:57 UTC
Updated:
1 Dec 2011 at 12:56 UTC
Any chance there are plans for Views support? Would be great to be able to create views based off the Top Contrib tables -- particularly creating a variety of different blocks/pages based on time ranges, as well as adding user picture support.
Comments
Comment #1
glitz commentedany update on this?
Comment #2
YK85 commentedsubscribing
Comment #3
BeaPower commentedSub
Comment #4
aaronbauman+1
Comment #5
frognation commentedI thought I'd post here what I did with views to display points of last week and last month from the current date in Views 2 without using userpoints_top_contributors in case the subscribers of this thread would be interested.
Change interval 1 week to 1 month if you want the previous month's points. Also this is for the views_customfield module, so you might have to replace $data->uid with something else if you're using the views_php module.
If you're sorting by this custom field, you need to use the table view!
Comment #6
aaronbaumanInstead of creating an additional SQL query for each item returned from the view, I used a hook_views_query_alter() like so:
Replace "my_module", "my_view_name" and "applicable_display" with the appropriate values.
You can adjust the timeframe however you'd like.
Comment #7
mrwhizkid commentedHi --- thanks for this but I'm a bit confused. I made a custom module with this and activated it.
But this is where I get lost:
Should I use this in conjunction with the code in #5?
OR with a specific field in my views display?
Thanks in advance.