Saw this on the project page and wanted to throw in my vote for this feature.

Comments

ghankstef’s picture

+1 for Views integration!

nicholasthompson’s picture

StatusFileSize
new2.17 KB
new5.48 KB

I'm using this module on www.sportbusiness.com (well I will by Monday - currently I've been working on it in dev). I've already submitted the fix for issue #371271: Infinite queue issues).

Attached is a patch. This patch adds several require functions & hook imlpementations for views integration. It also includes the fix from #371271: Infinite queue issues (as I couldn't be arsed to remove it from the patch).

The included tarball is an include folder you need to drop into the userqueue folder. This provides filters, arguments & fields for userqueues when a view is in the user scope (and you provide the relationship for userqueues).

I've not had a chance to test this at all yet and it's still missing a few bits and bobs - mainly the userqueue.views.defaults.inc file which defines all the default views for a userqueue. This wont take long to do though.

The patch also includes a new feature; a userqueues tab on the user profile so you can easily add and remove users from queues (basically makes the interface user-centric, not queue-centric).

Anyways - feedback appreciated. Sorry its lots of stuff lumped into one, but I'm on a really tight/busy schedule and need this module for our site.

Cheers,
Nick

nicholasthompson’s picture

PS: drupal.org security settings mean the includes.tar.gz has been renamed to includes.tar_.gz so you'll probably need to rename it before you do any extracting ;-)

nicholasthompson’s picture

I lied... It's gone live now :)
http://www.sportbusiness.com/about_us3

(That URL may change next week if the page gets pushed to be the main Abuot Us page - currently its more a "proof of concept").

Also.. I just noticed there is a stray "dpm" in the userqueue.views.inc file. It can be removed.

dddave’s picture

Status: Active » Needs review
marcushenningsen’s picture

Thanks for this handy feature. I've come upon two small bugs:

1) On the user profiles, links in the first column of the queue table (i.e. the link to the queues themselves) seem to be wrong. They link to userqueue/# but should link to admin/user/userqueue/#/view.

2) By accident I typed in and added one user to the same queue twice. The user only shows up once in the normal queue view but twice in the view I thereafter made with Views. This is probably a bug in the userqueue module itself, but of course it only appears with costum views.

xmattus’s picture

#1 is a matter of taste, I suppose. If you find the userqueue tab to be more of an admin tool, it ought to link to the admin interface. If you plan for it to be a user-facing function, then you'll need some kind of userqueue display page for that user which lists all the queues they belong to. I originally wrote this module to fill a need for a site I was working on and the user profile tab wasn't in the specs, but that is a legitimate feature provided the queue page could be themed easily.

#2 results from the fact that in the queue admin you're seeing the results of userqueue_get_users() which keys user objects to their uids. This means you could never have the same user occurring twice in the queue -- is that a feature or a bug? :) Yet, the Views integration is probably pulling records directly from the userqueue_user table, where a twice-entered user would have two rows for the same queue. Does anyone have a preference for one behavior over the other?

nicholasthompson’s picture

Version: 6.x-1.0 » 6.x-1.1
StatusFileSize
new14.03 KB

Attached is a slightly better patch which is now "all in one" + it's based on the 1.1 release.

You can patch using:

patch -p0 < path/to/userqueue.patch
markhalliwell’s picture

Version: 6.x-1.1 » 7.x-1.x-dev
Priority: Normal » Major
StatusFileSize
new15.5 KB

Given that the ownership has been reassigned and it's been made clear that D6 is no longer really developed (just bug fixes), I'm moving this issue to D7. Here is a complete initial D7 patch for getting userqueue to work in Views.

abhishek.kumar’s picture

Guys i think it's better to go with the blocks rather than going to integration with views.

markhalliwell’s picture

Actually I'd argue that views integration is rather important. It allows for easier creation of a user queue, without having to know the APIs. Not to mention the amount of style plugins that can be used to output the userqueue. I needed the ability to have many different displays for the same queue, easily done if there is views support.

tinny’s picture

Latest patch doesnt work.

After adding the relationship in Views, it goes to the settings and i get this:

The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.

tinny’s picture

I disabled, uninstalled, then enabled again and it works.

markhalliwell’s picture

@tinny: yes, anytime you patch you should probably clear caches as things have probably changed (which is what disabling, uninstalling and enabling does essentially).

@abhishek.kumar: If you're not going to provide support for view, then take it off your project page and close this issue. Or better yet, realize that this is rather solid patch for 7.x and at least take a look at it. Please don't just assume that others have the same needs as you. Views is actually a very critical module (hence why it's being integrated into D8).

abhishek.kumar’s picture

@Mark: Sure I will apply view patch to it very soon because i have to make it same as nodqueue.

markhalliwell’s picture

You don't have to make it the same as nodequeue. This is a separate module. Granted it originally stemmed from Nodequeue, but it's a beast of it's own now with different needs. It's better to just get something going and add new features down the road if they're needed. It's not like there is currently a stable 7.x branch for this module yet.

jnicola’s picture

What the hell?!?!?

Views integration isn't important?!?!?

Quit smoking guy, and thanks for all the contributed patches. Views support is pretty much essential!

jnicola’s picture

Downloaded and applied patch. No relationships or filters in views.

Disabled, uninstalled, reinstalled. Nothing.

This is definitely not working unfortunately

gaurav.kapoor’s picture

Issue summary: View changes
Status: Needs review » Needs work
akashkumar07’s picture

Assigned: Unassigned » akashkumar07