13,178c13,344
<   $queues = nodequeue_load_queues(nodequeue_get_all_qids(NULL));
<   foreach ($queues as $queue) {
<     $view = new view;
<     $view->name = "nodequeue_$queue->qid";
<     $view->description = t("Display a list of all nodes in queue '@queue'", array('@queue' => $queue->title));
<     $view->tag = t('nodequeue');
<     $view->view_php = '';
<     $view->base_table = 'node';
<     $view->is_cacheable = '0';
<     $view->api_version = 2;
<     $view->disabled = FALSE; // Edit this to true to make a default view disabled initially
<     $view->display = array();
<       $display = new views_display;
<       $display->id = 'default';
<       $display->display_title = t('Defaults');
<       $display->display_plugin = 'default';
<       $display->position = '1';
<       $display->display_options = array(
<       'style_plugin' => 'default',
<       'style_options' => array(),
<       'row_plugin' => 'node',
<       'row_options' => array(
<         'teaser' => 1,
<         'links' => 1,
<       ),
<       'relationships' => array(
<         'nodequeue_rel' => array(
<           'id' => 'nodequeue_rel',
<           'table' => 'node',
<           'field' => 'nodequeue_rel',
<           'label' => 'queue',
<           'required' => 1,
<           'limit' => TRUE,
<           'qids' => array($queue->qid => $queue->qid),
<           'relationship' => 'none',
<         ),
<       ),
<       'fields' => array(
<         'title' => array(
<           'id' => 'title',
<           'table' => 'node',
<           'field' => 'title',
<           'label' => '',
<           'relationship' => 'none',
<           'link_to_node' => 1,
<         ),
<       ),
<       'sorts' => array(
<         'position' => array(
<           'id' => 'position',
<           'table' => 'nodequeue_nodes',
<           'field' => 'position',
<           'order' => 'ASC',
<           'relationship' => 'nodequeue_rel',
<         ),
<       ),
<       'arguments' => array(),
<       'filters' => array(
<         'status_extra' => array(
<           'id' => 'status_extra',
<           'table' => 'node',
<           'field' => 'status_extra',
<           'operator' => '=',
<           'value' => '',
<           'group' => 0,
<           'exposed' => FALSE,
<           'expose' => array(
<             'operator' => FALSE,
<             'label' => '',
<           ),
<           'relationship' => 'none',
<         ),
<       ),
<       'items_per_page' => 10,
<       'use_pager' => '1',
<       'pager_element' => 0,
<       'title' => t("Queue '@queue'", array('@queue' => $queue->title)),
<       'use_more' => 1,
<     );
<     $view->display['default'] = $display;
<       $display = new views_display;
<       $display->id = 'page';
<       $display->display_title = t('Page');
<       $display->display_plugin = 'page';
<       $display->position = '2';
<       $display->display_options = array(
<       'defaults' => array(
<         'access' => TRUE,
<         'title' => TRUE,
<         'header' => TRUE,
<         'header_format' => TRUE,
<         'header_empty' => TRUE,
<         'footer' => TRUE,
<         'footer_format' => TRUE,
<         'footer_empty' => TRUE,
<         'empty' => TRUE,
<         'empty_format' => TRUE,
<         'use_ajax' => TRUE,
<         'items_per_page' => TRUE,
<         'offset' => TRUE,
<         'use_pager' => TRUE,
<         'pager_element' => TRUE,
<         'use_more' => TRUE,
<         'distinct' => TRUE,
<         'link_display' => TRUE,
<         'style_plugin' => TRUE,
<         'style_options' => TRUE,
<         'row_plugin' => TRUE,
<         'row_options' => TRUE,
<         'relationships' => TRUE,
<         'fields' => TRUE,
<         'sorts' => TRUE,
<         'arguments' => TRUE,
<         'filters' => TRUE,
<       ),
<       'relationships' => array(),
<       'fields' => array(),
<       'sorts' => array(),
<       'arguments' => array(),
<       'filters' => array(),
<       'path' => "nodequeue/$queue->qid",
<     );
<     $view->display['page'] = $display;
<       $display = new views_display;
<       $display->id = 'block';
<       $display->display_title = t('Block');
<       $display->display_plugin = 'block';
<       $display->position = '3';
<       $display->display_options = array(
<       'defaults' => array(
<         'access' => TRUE,
<         'title' => TRUE,
<         'header' => TRUE,
<         'header_format' => TRUE,
<         'header_empty' => TRUE,
<         'footer' => TRUE,
<         'footer_format' => TRUE,
<         'footer_empty' => TRUE,
<         'empty' => TRUE,
<         'empty_format' => TRUE,
<         'use_ajax' => TRUE,
<         'items_per_page' => FALSE,
<         'offset' => FALSE,
<         'use_pager' => FALSE,
<         'pager_element' => FALSE,
<         'use_more' => TRUE,
<         'distinct' => TRUE,
<         'link_display' => TRUE,
<         'style_plugin' => FALSE,
<         'style_options' => FALSE,
<         'row_plugin' => FALSE,
<         'row_options' => FALSE,
<         'relationships' => TRUE,
<         'fields' => TRUE,
<         'sorts' => TRUE,
<         'arguments' => TRUE,
<         'filters' => TRUE,
<       ),
<       'relationships' => array(),
<       'fields' => array(),
<       'sorts' => array(),
<       'arguments' => array(),
<       'filters' => array(),
<       'style_plugin' => 'list',
<       'style_options' => array(
<         'type' => 'ul',
---
>   $single_view = variable_get('nodequeue_single_view',0);
>   $multi_view = variable_get('nodequeue_multi_view',0);
>  
>   if($single_view == 1){	
> 	  $queues = nodequeue_load_queues(nodequeue_get_all_qids(NULL));
> 	  foreach ($queues as $queue) {
> 	    $view = new view;
> 	    $view->name = "nodequeue_$queue->qid";
> 	    $view->description = t("Display a list of all nodes in queue '@queue'", array('@queue' => $queue->title));
> 	    $view->tag = t('nodequeue');
> 	    $view->view_php = '';
> 	    $view->base_table = 'node';
> 	    $view->is_cacheable = '0';
> 	    $view->api_version = 2;
> 	    $view->disabled = FALSE; // Edit this to true to make a default view disabled initially
> 	    $view->display = array();
> 	      $display = new views_display;
> 	      $display->id = 'default';
> 	      $display->display_title = t('Defaults');
> 	      $display->display_plugin = 'default';
> 	      $display->position = '1';
> 	      $display->display_options = array(
> 	      'style_plugin' => 'default',
> 	      'style_options' => array(),
> 	      'row_plugin' => 'node',
> 	      'row_options' => array(
> 	        'teaser' => 1,
> 	        'links' => 1,
> 	      ),
> 	      'relationships' => array(
> 	        'nodequeue_rel' => array(
> 	          'id' => 'nodequeue_rel',
> 	          'table' => 'node',
> 	          'field' => 'nodequeue_rel',
> 	          'label' => 'queue',
> 	          'required' => 1,
> 	          'limit' => TRUE,
> 	          'qids' => array($queue->qid => $queue->qid),
> 	          'relationship' => 'none',
> 	        ),
> 	      ),
> 	      'fields' => array(
> 	        'title' => array(
> 	          'id' => 'title',
> 	          'table' => 'node',
> 	          'field' => 'title',
> 	          'label' => '',
> 	          'relationship' => 'none',
> 	          'link_to_node' => 1,
> 	        ),
> 	      ),
> 	      'sorts' => array(
> 	        'position' => array(
> 	          'id' => 'position',
> 	          'table' => 'nodequeue_nodes',
> 	          'field' => 'position',
> 	          'order' => 'ASC',
> 	          'relationship' => 'nodequeue_rel',
> 	        ),
> 	      ),
> 	      'arguments' => array(),
> 	      'filters' => array(
> 	        'status_extra' => array(
> 	          'id' => 'status_extra',
> 	          'table' => 'node',
> 	          'field' => 'status_extra',
> 	          'operator' => '=',
> 	          'value' => '',
> 	          'group' => 0,
> 	          'exposed' => FALSE,
> 	          'expose' => array(
> 	            'operator' => FALSE,
> 	            'label' => '',
> 	          ),
> 	          'relationship' => 'none',
> 	        ),
> 	      ),
> 	      'items_per_page' => 10,
> 	      'use_pager' => '1',
> 	      'pager_element' => 0,
> 	      'title' => t("Queue '@queue'", array('@queue' => $queue->title)),
> 	      'use_more' => 1,
> 	    );
> 	    $view->display['default'] = $display;
> 	      $display = new views_display;
> 	      $display->id = 'page';
> 	      $display->display_title = t('Page');
> 	      $display->display_plugin = 'page';
> 	      $display->position = '2';
> 	      $display->display_options = array(
> 	      'defaults' => array(
> 	        'access' => TRUE,
> 	        'title' => TRUE,
> 	        'header' => TRUE,
> 	        'header_format' => TRUE,
> 	        'header_empty' => TRUE,
> 	        'footer' => TRUE,
> 	        'footer_format' => TRUE,
> 	        'footer_empty' => TRUE,
> 	        'empty' => TRUE,
> 	        'empty_format' => TRUE,
> 	        'use_ajax' => TRUE,
> 	        'items_per_page' => TRUE,
> 	        'offset' => TRUE,
> 	        'use_pager' => TRUE,
> 	        'pager_element' => TRUE,
> 	        'use_more' => TRUE,
> 	        'distinct' => TRUE,
> 	        'link_display' => TRUE,
> 	        'style_plugin' => TRUE,
> 	        'style_options' => TRUE,
> 	        'row_plugin' => TRUE,
> 	        'row_options' => TRUE,
> 	        'relationships' => TRUE,
> 	        'fields' => TRUE,
> 	        'sorts' => TRUE,
> 	        'arguments' => TRUE,
> 	        'filters' => TRUE,
> 	      ),
> 	      'relationships' => array(),
> 	      'fields' => array(),
> 	      'sorts' => array(),
> 	      'arguments' => array(),
> 	      'filters' => array(),
> 	      'path' => "nodequeue/$queue->qid",
> 	    );
> 	    $view->display['page'] = $display;
> 	      $display = new views_display;
> 	      $display->id = 'block';
> 	      $display->display_title = t('Block');
> 	      $display->display_plugin = 'block';
> 	      $display->position = '3';
> 	      $display->display_options = array(
> 	      'defaults' => array(
> 	        'access' => TRUE,
> 	        'title' => TRUE,
> 	        'header' => TRUE,
> 	        'header_format' => TRUE,
> 	        'header_empty' => TRUE,
> 	        'footer' => TRUE,
> 	        'footer_format' => TRUE,
> 	        'footer_empty' => TRUE,
> 	        'empty' => TRUE,
> 	        'empty_format' => TRUE,
> 	        'use_ajax' => TRUE,
> 	        'items_per_page' => FALSE,
> 	        'offset' => FALSE,
> 	        'use_pager' => FALSE,
> 	        'pager_element' => FALSE,
> 	        'use_more' => TRUE,
> 	        'distinct' => TRUE,
> 	        'link_display' => TRUE,
> 	        'style_plugin' => FALSE,
> 	        'style_options' => FALSE,
> 	        'row_plugin' => FALSE,
> 	        'row_options' => FALSE,
> 	        'relationships' => TRUE,
> 	        'fields' => TRUE,
> 	        'sorts' => TRUE,
> 	        'arguments' => TRUE,
> 	        'filters' => TRUE,
> 	      ),
> 	      'relationships' => array(),
> 	      'fields' => array(),
> 	      'sorts' => array(),
> 	      'arguments' => array(),
> 	      'filters' => array(),
> 	      'style_plugin' => 'list',
> 	      'style_options' => array(
> 	        'type' => 'ul',
> 	      ),
> 	      'row_plugin' => 'fields',
> 	      'row_options' => array(
> 	        'inline' => array(),
> 	        'separator' => '',
> 	      ),
> 	      'block_description' => t("Queue '@queue'", array('@queue' => $queue->title)),
> 	      'items_per_page' => 5,
> 	      'offset' => 0,
> 	      'use_pager' => '0',
> 	      'pager_element' => 0,
> 	    );
> 	    $view->display['block'] = $display;
> 	    $views[$view->name] = $view;
> 	  }
>   }
>   
>   
> /* multi queue view */
> 	if($multi_view == 1){
> 		$queues = nodequeue_load_queues(nodequeue_get_all_qids(NULL));
> 		$qids = nodequeue_get_array_qids($queues); 
> 		$multiview = new view;
> 		$multiview->name = 'multi_nodequeue_queue';
> 		$multiview->description = 'Display a list of all nodes in queue \'Multi Nodequeue Queue\'';
> 		$multiview->tag = 'nodequeue';
> 		$multiview->view_php = '';
> 		$multiview->base_table = 'node';
> 		$multiview->is_cacheable = FALSE;
> 		$multiview->api_version = 2;
> 		$multiview->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
> 		$handler = $multiview->new_display('default', 'Defaults', 'default');
> 		$handler->override_option('relationships', array(
> 		  'nodequeue_rel' => array(
> 		    'label' => 'queue',
> 		    'required' => 1,
> 		    'limit' => 1,
> 		    'qids' => $qids,
> 		    'id' => 'nodequeue_rel',
> 		    'table' => 'node',
> 		    'field' => 'nodequeue_rel',
> 		    'relationship' => 'none',
> 		  ),
> 		));
> 		$handler->override_option('fields', array(
> 		  'title' => array(
> 		    'id' => 'title',
> 		    'table' => 'node',
> 		    'field' => 'title',
> 		    'label' => '',
> 		    'relationship' => 'none',
> 		    'link_to_node' => 1,
> 		  ),
> 		));
> 		$handler->override_option('sorts', array(
> 		  'position' => array(
> 		    'id' => 'position',
> 		    'table' => 'nodequeue_nodes',
> 		    'field' => 'position',
> 		    'order' => 'ASC',
> 		    'relationship' => 'nodequeue_rel',
> 		  ),
> 		));
> 		$handler->override_option('arguments', array(
> 		  'qid' => array(
> 		    'default_action' => 'not found',
> 		    'style_plugin' => 'default_summary',
> 		    'style_options' => array(),
> 		    'wildcard' => 'all',
> 		    'wildcard_substitution' => 'All',
> 		    'title' => '',
> 		    'default_argument_type' => 'fixed',
> 		    'default_argument' => '',
> 		    'validate_type' => 'none',
> 		    'validate_fail' => 'not found',
> 		    'break_phrase' => 0,
> 		    'not' => 0,
> 		    'id' => 'qid',
> 		    'table' => 'nodequeue_nodes',
> 		    'field' => 'qid',
> 		    'relationship' => 'nodequeue_rel',
> 		    'default_options_div_prefix' => '',
> 		    'default_argument_user' => 0,
> 		    'default_argument_fixed' => '',
> 		    'default_argument_php' => '',
> 		    'validate_argument_node_type' => array(
> 		      'poll' => 0,
> 		      'bestbuy' => 0,
> 		      'page' => 0,
> 		      'story' => 0,
> 		    ),
> 		    'validate_argument_node_access' => 0,
> 		    'validate_argument_nid_type' => 'nid',
> 		    'validate_argument_vocabulary' => array(),
> 		    'validate_argument_type' => 'tid',
> 		    'validate_argument_php' => '',
> 		  ),
> 		  'type' => array(
> 		    'default_action' => 'not found',
> 		    'style_plugin' => 'default_summary',
> 		    'style_options' => array(),
> 		    'wildcard' => 'all',
> 		    'wildcard_substitution' => 'All',
> 		    'title' => '',
> 		    'default_argument_type' => 'fixed',
> 		    'default_argument' => '',
> 		    'validate_type' => 'none',
> 		    'validate_fail' => 'not found',
> 		    'id' => 'type',
> 		    'table' => 'node',
> 		    'field' => 'type',
> 		    'relationship' => 'none',
> 		    'default_options_div_prefix' => '',
> 		    'default_argument_user' => 0,
> 		    'default_argument_fixed' => '',
> 		    'default_argument_php' => '',
> 		    'validate_argument_node_type' => array(
> 		      'poll' => 0,
> 		      'bestbuy' => 0,
> 		      'page' => 0,
> 		      'story' => 0,
> 		    ),
> 		    'validate_argument_node_access' => 0,
> 		    'validate_argument_nid_type' => 'nid',
> 		    'validate_argument_vocabulary' => array(),
> 		    'validate_argument_type' => 'tid',
> 		    'validate_argument_php' => '',
> 		  ),
>     //new updated date argument
>     'changed' => array(
>       'id' => 'changed',
>       'table' => 'node',
>       'field' => 'changed',
>       'validate_type' => 'none',
>       'validate_fail' => 'not found',
>       'default_argument_type' => 'php',
>       'relationship' => 'none',
>       'title' => '',
>       'default_action' => 'not found',
>       'wildcard' => '',
>       'wildcard_substitution' => '',
>       'default_options_div_prefix' => '',
>       'default_argument_user' => 0,
>       'default_argument_fixed' => '',
>       'default_argument_php' => '',
>       'validate_argument_node_type' => array(
>         'poll' => 0,
>         'image' => 0,
>         'feed' => 0,
>         'feed_item' => 0,
>         'bestbuy' => 0,
>         'feature' => 0,
>         'fivestar' => 0,
>         'guide' => 0,
>         'interview' => 0,
>         'news' => 0,
>         'page' => 0,
>         'press_release' => 0,
>         'promotion' => 0,
>         'report' => 0,
>         'research' => 0,
>         'story' => 0,
180,183c346,350
<       'row_plugin' => 'fields',
<       'row_options' => array(
<         'inline' => array(),
<         'separator' => '',
---
>       'validate_argument_node_access' => 0,
>       'validate_argument_nid_type' => 'nid',
>       'validate_argument_vocabulary' => array(
>         '2' => 0,
>         '1' => 0,
185,193c352,411
<       'block_description' => t("Queue '@queue'", array('@queue' => $queue->title)),
<       'items_per_page' => 5,
<       'offset' => 0,
<       'use_pager' => '0',
<       'pager_element' => 0,
<     );
<     $view->display['block'] = $display;
<     $views[$view->name] = $view;
<   }
---
>       'validate_argument_type' => 'tid',
>       'validate_argument_php' => '',
>     ),
> 		));
> 		$handler->override_option('filters', array(
> 		  'status_extra' => array(
> 		    'id' => 'status_extra',
> 		    'table' => 'node',
> 		    'field' => 'status_extra',
> 		    'operator' => '=',
> 		    'value' => '',
> 		    'group' => 0,
> 		    'exposed' => FALSE,
> 		    'expose' => array(
> 		      'operator' => FALSE,
> 		      'label' => '',
> 		    ),
> 		    'relationship' => 'none',
> 		  ),
> 		));
> 		$handler->override_option('access', array(
> 		  'type' => 'none',
> 		  'role' => array(),
> 		  'perm' => '',
> 		));
> 		$handler->override_option('title', 'Queue \'Multi Nodequeue queue\'');
> 		$handler->override_option('use_pager', '1');
> 		$handler->override_option('use_more', 1);
> 		$handler->override_option('row_plugin', 'node');
> 		$handler->override_option('row_options', array(
> 		  'teaser' => 1,
> 		  'links' => 1,
> 		));
> 		$handler = $multiview->new_display('page', 'Page', 'page');
> 		$handler->override_option('path', 'nodequeue/multiqueue');
> 		$handler->override_option('menu', array(
> 		  'type' => 'none',
> 		  'title' => '',
> 		  'weight' => 0,
> 		));
> 		$handler->override_option('tab_options', array(
> 		  'type' => 'none',
> 		  'title' => '',
> 		  'weight' => 0,
> 		));
> 		$handler = $multiview->new_display('block', 'Block', 'block');
> 		$handler->override_option('items_per_page', 5);
> 		$handler->override_option('use_pager', '1');
> 		$handler->override_option('style_plugin', 'list');
> 		$handler->override_option('style_options', array(
> 		  'type' => 'ul',
> 		));
> 		$handler->override_option('row_plugin', 'node');
> 		$handler->override_option('row_options', array(
> 		  'inline' => array(),
> 		  'separator' => '',
> 		));
> 		$handler->override_option('block_description', 'Queue \'Multi Nodequeue Queue\'');
> 		$views[$multiview->name] = $multiview;
> 		}
