diff -up /home/marc/Desktop/nodequeue/nodequeue.module /var/www/d7/sites/all/modules/nodequeue/nodequeue.module
--- /home/marc/Desktop/nodequeue/nodequeue.module	2010-10-07 04:50:35.000000000 +0200
+++ /var/www/d7/sites/all/modules/nodequeue/nodequeue.module	2010-11-25 00:14:01.000000000 +0100
@@ -1915,6 +1915,7 @@ function nodequeue_load_subqueues_by_ref
  * Save a nodequeue. This does not save subqueues; those must be added separately.
  */
 function nodequeue_save(&$queue) {
+  dsm($queue);
   $nodequeue_queue_fields = array(
     'title' => $queue->title,
     'subqueue_title' => $queue->subqueue_title,
@@ -1922,14 +1923,14 @@ function nodequeue_save(&$queue) {
     'link' => $queue->link,
     'link_remove' => $queue->link_remove,
     'owner' => $queue->owner,
-    'show_in_links' => $queue->show_in_links,
+    'show_in_links' => (int)$queue->show_in_links,
     'show_in_tab' => $queue->show_in_tab,
     'show_in_ui' => $queue->show_in_ui,
     'i18n' => $queue->i18n,
     'reverse' => $queue->reverse,
     'reference' => $queue->reference,
   );
-  
+  dsm($nodequeue_queue_fields);
   if (!isset($queue->qid)) {
     $queue->qid = db_insert('nodequeue_queue')
       ->fields($nodequeue_queue_fields)
diff -up /home/marc/Desktop/nodequeue/smartqueue.module /var/www/d7/sites/all/modules/nodequeue/smartqueue.module
--- /home/marc/Desktop/nodequeue/smartqueue.module	2010-10-07 04:50:35.000000000 +0200
+++ /var/www/d7/sites/all/modules/nodequeue/smartqueue.module	2010-11-27 16:39:35.104540000 +0100
@@ -15,13 +15,18 @@ function smartqueue_nodequeue_info() {
  * Implementation of hook_nodequeue_form()
  */
 function smartqueue_taxonomy_nodequeue_form($queue, &$form) {
-  foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
-    $options[$vid] = check_plain($vocabulary->name);
+
+  $options = array();
+  $fields = field_info_fields();
+  foreach ($fields as $field_name => $field) {
+    if ($field['type'] == 'taxonomy_term_reference') {
+      $options[$field['id']] = t('Field %field-name, selecting terms from vocabulary %vocabulary.', array('%field-name' => $field_name, '%vocabulary' => $field['settings']['allowed_values'][0]['vocabulary']));
+    }
   }
-  $form['placeholder']['vocabularies'] = array(
+  $form['placeholder']['taxonomy_fields'] = array(
     '#type' => 'checkboxes',
-    '#title' => t('Vocabularies'),
-    '#description' => t('Select which vocabularies to use; each unique combination of terms from all of these vocabularies will have a subqueue.'),
+    '#title' => t('Taxonomy fields'),
+    '#description' => t('Select which taxonomy term reference fields to use; each unique combination of terms from all of these fields will have a subqueue.'),
     '#options' => $options,
   );
 
@@ -41,8 +46,7 @@ function smartqueue_taxonomy_nodequeue_f
     '#description' => t('What to display for the subqueue title; use %subqueue to embed the actual subqueue title. This is used to distinguish multiple nodequeues with subqueues from each other, as internal subqueue title is filled automatically.'),
   );
 
-
-  if ($queue->qid) {
+  if (isset($queue->qid)) {
     $form['placeholder']['vocabularies']['#disabled'] = TRUE;
     $form['placeholder']['vocabularies']['#default_value'] = explode('-', $queue->reference);
   }
@@ -53,13 +57,13 @@ function smartqueue_taxonomy_nodequeue_f
  */
 function smartqueue_taxonomy_nodequeue_form_validate($queue, &$form_state, &$form) {
   if (!isset($queue->qid)) {
-    $vids = array_keys(array_filter($form_state['values']['vocabularies']));
-    if (empty($vids)) {
-      form_error($form['placeholder']['vocabularies'], t('You must select at least one vocabulary.'));
+    $field_ids = array_keys(array_filter($form_state['values']['taxonomy_fields']));
+    if (empty($field_ids)) {
+      form_error($form['placeholder']['taxonomy_fields'], t('You must select at least one field.'));
     }
 
     // Convert this to our reference.
-    form_set_value($form['reference'], implode('-', $vids), $form_state);
+    form_set_value($form['reference'], implode('-', $field_ids), $form_state);
   }
 }
 
@@ -67,12 +71,12 @@ function smartqueue_taxonomy_nodequeue_f
  * Implementation of hook_nodequeue_form_submit_finish()
  */
 function smartqueue_taxonomy_nodequeue_form_submit_finish($queue, $form_state) {
-  $qid = db_query('SELECT qid FROM {smartqueue} WHERE qid = %d', $queue->qid)->fetchField();
+  $qid = db_query('SELECT qid FROM {smartqueue} WHERE qid = :qid', array(':qid' => $queue->qid))->fetchField();
   if ($qid) {
-    db_query('UPDATE {smartqueue} SET use_parents = %d  WHERE qid = %d', $form_state['values']['use_parents'], $queue->qid);
+    db_query('UPDATE {smartqueue} SET use_parents = :use_parents  WHERE qid = :qid', array(':use_parents' => $form_state['values']['use_parents'], ':qid' => $queue->qid));
   }
   else {
-    db_query('INSERT INTO {smartqueue} (qid, use_parents) VALUES (%d, %d)', $queue->qid, $form_state['values']['use_parents']);
+    db_query('INSERT INTO {smartqueue} (qid, use_parents) VALUES (:qid, :use_parents)', array(':qid' => $queue->qid, ':use_parents' => $form_state['values']['use_parents']));
   }
 }
 
@@ -80,31 +84,19 @@ function smartqueue_taxonomy_nodequeue_f
  * Implementation of hook_nodequeue_subqueues()
  */
 function smartqueue_taxonomy_nodequeue_subqueues(&$queue, $node) {
-  foreach (explode('-', $queue->reference) as $vid) {
-    $vids[$vid] = array();
-  }
-
-  foreach ($node->taxonomy as $key => $value) {
-    // This unfortunate scar is needed because $node->taxonomy looks different when saving a node versus loading.
-    if (!is_object($value)) {
-      // $node comes from a node form submission
-      foreach ((array) $value as $tid) {
-        if (isset($vids[$key])) {
-          $vids[$key][] = $tid;
-        }
-      }
-    }
-    else {
-      // $node comes from node_load()
-      if (isset($vids[$value->vid])) {
-        $vids[$value->vid][] = $value->tid;
-      }
+  //dsm($node);
+  foreach (explode('-', $queue->reference) as $field_id) {
+    $field = field_info_field_by_id($field_id);
+    $field_ids[$field_id] = array();
+    foreach ($node->{$field['field_name']}['und'] as $field_value) {
+      $field_ids[$field_id][] = $field_value['tid'];    
     }
   }
+  //dsm($field_ids);
 
   if ($queue->use_parents) {
     // Replace taxonomy IDs by their parents'
-    foreach ($vids as $vid => &$tids) {
+    foreach ($field_ids as $field_id => &$tids) {
       $tids = smartqueue_taxonomy_get_parents($tids);
     }
   }
@@ -113,12 +105,12 @@ function smartqueue_taxonomy_nodequeue_s
   // various non-terms to be set.
 
   $empty = TRUE;
-  foreach ($vids as $vid => $tids) {
+  foreach ($field_ids as $field_id => $tids) {
     if (!empty($tids)) {
       $empty = FALSE;
     }
-    if (!count($vids[$vid])) {
-      $vids[$vid][] = 0;
+    if (!count($field_ids[$field_id])) {
+      $field_ids[$field_id][] = 0;
     }
   }
 
@@ -126,7 +118,7 @@ function smartqueue_taxonomy_nodequeue_s
     return;
   }
 
-  $references = smartqueue_build_string(array_filter($vids));
+  $references = smartqueue_build_string(array_filter($field_ids));
   // Because of how we built this, the last one will always be all zeros. Lose it.
   //array_pop($references);
 
@@ -186,17 +178,19 @@ function smartqueue_build_string($arrays
 }
 
 function smartqueue_taxonomy_nodequeue_subqueue_title($queue, $reference) {
-  $vids = explode('-', $queue->reference);
+  $field_ids = explode('-', $queue->reference);
   $tids = explode('-', $reference);
-  foreach ($vids as $vid) {
+  foreach ($field_ids as $field_id) {
     $tid = array_shift($tids);
     // $tid can be 0, specifically meaning this term is unset.
     if ($tid) {
-      $terms = smartqueue_taxonomy_get_terms($vid);
+      $terms = smartqueue_taxonomy_get_terms($field_id);
       $titles[$tid] = $terms[$tid];
     }
   }
-  return implode('-', $titles);
+  // @TODO: figure out which title to generate for the subqueue.
+  return 'foobar';
+  //return implode('-', $titles);
 }
 
 /**
@@ -206,8 +200,8 @@ function smartqueue_taxonomy_get_terms($
   static $cache = array();
   if (!isset($cache[$vid])) {
     $cache[$vid] = array();
-    $result = db_query("SELECT tid, name FROM {term_data} WHERE vid = :vid", array(':vid' => $vid));
-    foreach ($result as $tern) {
+    $result = db_query("SELECT tid, name FROM {taxonomy_term_data} WHERE vid = :vid", array(':vid' => $vid));
+    foreach ($result as $term) {
       $cache[$vid][$term->tid] = $term->name;
     }
   }
