Hey all, I am trying to implement a semi-complex scenario using nodequeue and would like input / help.

Basically, I have a client who has a portfolio site where they would like to sort / filter the project list specifically for certain user, so user A, once logged-in, might have a different project access and ordering than user B might. I looked into the smartqueue-per-user module, but installing it and attempting to use it seemed unintuitive, and I don't think my client would like it. Also, I got SQL errors on my user profile page after installing the module, the same error a few others were experiencing in the issues listed for that module, so I decided maybe that module wasn't ideally suited for this project.

The workflow I'm looking for is that my client would create a new user with access to the site, and then would create a nodequeue for that user with a custom ordering. Then, via a 3rd content type, would associate certain users with a particular project nodequeue, as well as set other info, such as the expiration date for that nodequeue and other such details, which is why I need this 3rd content type at all.

So, my question is, I'm looking for a way for my client to easily select a nodequeue to associate with a user. At first I thought I might be able to use a node-reference CCK field to select the nodequeue, but apparently that isn't an option, which makes sense I suppose. Then I switched to a system where my client would copy/paste the title they create for a nodequeue into a textfield and associate the nodequeue with the user that way, but the nodequeue API seems to be based entirely on QID and have no options for selection by title. I understand there is probably no uniqueness requirement for titles of nodequeues, so QID is the best way to go, but asking my client to get the QID of a nodequeue he creates and copy paste it somewhere else is probably going to be too much to ask, already the workflow is probably going to be more steps than is appropriate.

In any event, my current solution in progress is to get a list of nodequeues filtered by type using the nodequeue api and manually loop through each one and test for the correct title and just take the top result in the case of title duplication and warn the client to create unique titles. Is this solution adviseable or is pulling that many nodequeues an overtly bad idea? I'm not opposed to writing a CCK field or other module to do nodequeue selection if there's a way to do it without overburdening the site, but hopefully there is a better solution.

Any advice about how to go about this?

thanks much to all who reply!

Comments

meecect’s picture

Did you ever find a solution for this? My use case is quite different but I find I am looking at similar techniques. For me, I need to display (preferably in a view) all the nodequeues that are defined with links to each individual nodequeue.

One solution I though about was somehow to make a new custom content type and then have that cck type reference the appropriate queue.

Then, I could build a view of that content type and with some views magic achieve what I wanted.

However, I haven't found a way to really accomplish that.

tea.time’s picture

Title: Nodequeue query by Title? CCK? » How to reference a nodequeue from a node or user - query by Title? CCK?

Yup, I'm finding myself with similar, if simpler, needs. The root lack of functionality is the ability to reference a nodequeue from something else - CaptShmo needs to associate a nodequeue with a user, and I need to associate a nodequeue with a node. (@meecect - that's where I'm confused about your idea - you mentioned having a content type reference a queue, but how would you do that? The only thing I can think of out of the box is to just have a numeric field that holds a QID, but that provides no automatic integration with views or panels, where references are extremely useful.)

Since there are node-reference and user-reference modules as part of CCK, a "simple" solution to me would be a nodequeue-reference field. I imagine most of the base code for it would be similar to the other *-reference fields. As a potential start, here is a tutorial on programmatically creating a new CCK field:
http://www.lullabot.com/articles/creating-custom-cck-fields
It looks thorough to me as far as all the basic stuff, but I don't think it covers adding a relationship option in Views, nor any integration with Panels.

(editing the issue title slightly to hopefully make it clearer)