Closed (duplicate)
Project:
User Points
Version:
6.x-1.1
Component:
Code: userpoints_views
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jul 2010 at 20:33 UTC
Updated:
3 Aug 2010 at 10:49 UTC
Hello,
in older versions of the User Points module there was 'tid' field declared for 'userpoints' views table. As of current latest version (1.1), this field has gone. But when constructing views it still may be necessary to filter userpoints records by category (my project does that, for example).
So, why not to return this field back by simply returning this piece of code to userpoints.views.inc?
// Describe the points column of the userpoints table.
$data['userpoints']['points'] = array(
'title' => t('!Points', userpoints_translation()),
'help' => t("A User's current !points.", userpoints_translation()), // The help that appears on the UI,
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_numeric',
'numeric' => TRUE,
'name field' => 'points', // display this field in the summary
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
Thank you!
Comments
Comment #1
kbahey commentedPlease try 6.x-1.x-dev and report back if this is still a problem.
Comment #2
berdirThis might be related to what BenK reported as a bug for the 7.x-1.x branch. In particular, the category field uses the default term_node field/sort/argument handlers but that doesn't make sense because it is specifically designed for terms assigned to a node.
I'll try to create a patch for 7.x and backport it later on.
Comment #3
BenK commentedSubscribing...
Comment #4
berdir#871126: Fix Bugs in Views Integration has now a patch for which I will create a backport as soon as it is working.