Test if NID in queue\subqueue - API Function

BryanPflug - July 1, 2007 - 19:39
Project:Nodequeue
Version:5.x-2.2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Great to have this module - it's a nice addition to Drupal! Also, I was pleased to see that you provide support for views, so the PHP snippets aren't required. A note to that effect in the documentation might be useful.

Any chance you could add functionality for a boolean check (accessible from a theme template) that would test if a particular node id was in any queue, or perhaps in a particular queue (after being passed a qid)? I'm sure it's probably not difficult to do if you're knowledgeable, but am afraid it's quite beyond my own skills.

Thanks for the consideration!

#1

merlinofchaos - May 28, 2008 - 17:57
Version:5.x-1.2» 5.x-2.0

#2

ezra-g - July 7, 2008 - 15:37
Title:Test if node id in queue» Test if NID in queue\subqueue - API Function
Version:5.x-2.0» 5.x-2.2

You can query the nodequeue_nodes table for the nid of the node and add a WHERE clause to SELECT specific qids\sqids. This sounds like a reasonable addition to the nodequeue API since it might prevent other modules from rewriting those queries.

#3

daniboy - June 15, 2009 - 09:26

It seems that nodequeue_get_subqueue_position() solves this old issue - It can be called (bool)nodequeue_get_subqueue_position($sqid, $nid) to get a boolean value.

 
 

Drupal is a registered trademark of Dries Buytaert.