Closed (fixed)
Project:
Nodequeue
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2008 at 23:32 UTC
Updated:
8 Jan 2010 at 16:37 UTC
Jump to comment: Most recent file
It would be really great if we would state how deep into a taxonomy tree it should create queues for
so if I have
Mammals
-four legs
--cat
--dog
-two legs
-human
-monkey
I would only like it to create queues for terms starting at level 1 or level 2 (as an option)
How hard would it be to code this? I think I could do it if you tell me where to start.
Thanks,
Sara
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | smartqueuep.txt | 7.41 KB | drupalnuts |
Comments
Comment #1
merlinofchaos commentedI think it wouldn't actually be that hard at all.
In smartqueue_taxonomy_nodequeue_subqueues(), when going through the taxonomy on a node, run each $tid thorugh a translation function to get back the top level tid; and then make sure that there are no duplicate tids in case a node has multiple terms with the same top level taxonomy term set. Everything else will be basically untouched, except for adding the option to the UI.
Comment #2
merlinofchaos commentedComment #3
drupalnuts commentedI have tried to do this in the attached module file (not a patch).
It works but only for the first term one tries to add. After that you get a database error in watchdog of
Duplicate entry '0' for key 1 query: INSERT INTO nodequeue_subqueue (qid, reference, title) VALUES (17, '6501', 'Arts') in /home/tmd/public_html/sites/default/modules/nodequeue/nodequeue.module on line 2134.
If anyone can look at it and let me know what mistake I have made it would be appreciated.
I called the module smartqueuep for smartqueue parent, but I do plan to rename it if I release it.
Comment #4
drupalnuts commentedI took care of this, I should really read my code better before I post.
Comment #6
billk2 commentedI've got the same requirement.
I'd really appreciate it if you could post the working version of your smartqueuep.