Posted by theoldfather on July 31, 2009 at 6:39pm
4 followers
| Project: | DraggableViews |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
I have been very pleased without draggableviews. It works as expected with regular nodes. However, I need to be able to sort users. The view seems to display correctly, but it won't sort and save. I can see from the code that this is because it only looks for nid's in the view object.
I have started writing a patch which will include a new handler for sort User Profile. If there is a simpler way for me to go about this, let me know. But from what I see it will require a little coding to accommodate.
Comments
#1
I would prefer modifying the existing handler to support all kinds of base tables. I think replacing the hard-coded "nid" with the varying base-table-ID (nid, uid, tid,..) should do it.
Unfortunately i'll not find time to work on this until the 10th of august. Maybe someone else?
Greetings,
sevi
#2
I've been working on this for the past couple hours, but haven't gotten very far. Are you saying it would be possible to do all the coding necessary simply by modifying the draggableviews_handler_ class? It seems like there are a lot of changes that would need to take place in draggableviews.inc.
#3
This patch provides draggableviews support for the base tables "users", "node_revisions", "node", "comments".
Primarily the patch changes
$node->nidto$node->{$view->base_field}.While we're at it I changed some comments and little code too (don't be confused).
Known bugs so far: The expand/collapse javascript doesn't work if the Anonymous user is listed in the view because it owns the critical user-ID 0.
Caution: This patch may cause loss of already saved structure information. The internal names of the views fields "Draggableviews: Order" and "Draggableviews: Parent" changed, so you have to re-add them to the view as well as you have to reconfigure the style-plugin (the order/parent field). Also the sort criteria must be re-configured.
The patch works for me. Hope it works for you too :)
Greetings,
sevi
(I'm not sure if you can use this patch because it contains the changes of many files. I don't have any experience with such patches.)
#4
This patch is part of DraggableViews since 6--3-2-BETA6. (The current version is 6--3-3-BETA1)
The status "needs review" lost its sense.
Reopen a new issue if you encounter any problems.
Greetings,
sevi
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
Hi,
in the 7.x version it's not possible to sort user views. I'm no coder, but I managed to modify the field_api handler in the subfolder implementations. Maybe it could be used for a fix. I don't know how to work with the language array of fields, so I hardcoded the 'und' key as my order field is not language specific.