Index: views.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/views.module,v
retrieving revision 1.166.2.41
diff -u -p -r1.166.2.41 views.module
--- views.module	8 Jun 2007 03:58:00 -0000	1.166.2.41
+++ views.module	8 Jun 2007 22:29:21 -0000
@@ -1,6 +1,9 @@
 <?php
 // $Id: views.module,v 1.166.2.41 2007/06/08 03:58:00 weitzman Exp $
 
+// Definitions
+define(VIEWS_FORM_DEFAULT_VIEW, 'frontpage');
+
 // ---------------------------------------------------------------------------
 // Drupal Hooks
 
@@ -592,6 +595,15 @@ function views_build_view($type, &$view,
     return $info;
   }
 
+  // modify the view if it is a form -- remove exposed filters and add in
+  // any items that have been selected by the user
+  if($view->page_type == 'form') {
+    if ($view->missing) {
+      $items = array_merge($view->missing, $items);
+    }
+    $view->exposed_filter = array();
+  }
+
   // Call a hook that'll let modules modify the view just before it is displayed.
   foreach (module_implements('views_pre_view') as $module) {
     $function = $module .'_views_pre_view';
@@ -1538,6 +1550,7 @@ function theme_views_view($view, $type, 
 
   $plugins = _views_get_style_plugins();
   $view_type = ($type == 'block') ? $view->block_type : $view->page_type;
+
   if ($num_nodes || $plugins[$view_type]['even_empty']) {
     if ($level !== NULL) {
       $output .= "<div class='view-summary ". views_css_safe('view-summary-'. $view->name) ."'>". views_theme($plugins[$view_type]['summary_theme'], $view, $type, $level, $nodes, $args) . '</div>';
@@ -1854,6 +1867,14 @@ function views_views_style_plugins() {
       'theme' => 'views_view_nodes',
       'weight' => -7,
     ),
+    'form' => array(
+      'name' => t('View Form'),
+      'theme' => 'views_view_form',
+      'needs_fields' => true,
+      'needs_table_header' => true,
+      'weight' => -9,
+      'hide' => true,
+    ),
   );
 }
 
@@ -2122,3 +2143,42 @@ function views_form_alter($form_id, &$fo
     views_invalidate_cache();
   }
 }
+
+/*
+ * Form element functions
+ */
+ 
+/**
+* Implementation of hook_elements();
+*
+* Here we define a views_node_selector form element that can be used to 
+* get back 1 or more nids using a view. We use the front page view as a 
+* default, as this ships with every views install. Of course, you'll want to
+* override this default in your use of the element.
+*
+* We also provide a #multiple field to indicate if this field is a single
+* select or multi-select. 
+*/
+function views_elements() {
+
+  $type['views_node_selector'] = array(
+    '#input' => TRUE,
+    '#process' => array('views_form_process_element' => array()), 
+    '#view' => VIEWS_FORM_DEFAULT_VIEW,
+    '#multiple' => false,
+    '#page' => 0,
+    '#collapsed' => false,
+    '#collapsible' => false,
+    '#arguments' => array(),
+    );
+  
+  return $type;
+}
+
+/**
+ * A place holder for the element processing function, located in views_form.inc
+ */
+function views_form_process_element($element) {
+  include_once drupal_get_path('module', 'views') . '/views_form.inc';
+  return _views_form_process_element($element);
+}
Index: views_ui.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/views_ui.module,v
retrieving revision 1.44.2.23
diff -u -p -r1.44.2.23 views_ui.module
--- views_ui.module	8 Jun 2007 03:37:54 -0000	1.44.2.23
+++ views_ui.module	8 Jun 2007 22:29:22 -0000
@@ -716,7 +716,7 @@ function _views_check_ops(&$view, $op, $
 /**
  * Custom form element to do our nice images.
  */
-function views_elements() {
+function views_ui_elements() {
   $type['views_imagebutton'] = array('#input' => TRUE, '#button_type' => 'submit',);
   return $type;
 }
@@ -849,7 +849,7 @@ function views_edit_view($view, $op = ''
     '#type' => 'select',
     '#title' => t('View Type'),
     '#default_value' => $view->page_type,
-    '#options' => _views_get_style_plugins(true),
+    '#options' => _views_get_style_plugins(true, true),
     '#description' => t('How the nodes should be displayed to the user.'),
   );
 
@@ -1038,7 +1038,7 @@ function views_edit_view($view, $op = ''
     '#type' => 'select',
     '#title' => t('View Type'),
     '#default_value' => $view->block_type,
-    '#options' => _views_get_style_plugins(true),
+    '#options' => _views_get_style_plugins(true, true),
     '#description' => t('How the nodes should be displayed to the user.'),
   );
 
Index: views_cache.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/views_cache.inc,v
retrieving revision 1.2.2.15
diff -u -p -r1.2.2.15 views_cache.inc
--- views_cache.inc	5 May 2007 02:40:18 -0000	1.2.2.15
+++ views_cache.inc	8 Jun 2007 22:29:22 -0000
@@ -304,7 +304,7 @@ function _views_get_query(&$view, $args,
  * array is cached in a static variable so that arguments
  * are only constructed once per run.
  */
-function _views_get_style_plugins($titles = false) {
+function _views_get_style_plugins($titles = false, $display_only = false) {
   static $views_style_plugins;
   global $locale;
 
@@ -328,7 +328,18 @@ function _views_get_style_plugins($title
       cache_set("views_style_plugins:$locale", 'cache_views', serialize($cache));
     }
   }
-  return ($titles ? $views_style_plugins['title'] : $views_style_plugins['base']);
+  $return = $views_style_plugins;
+  // remove any plugins that are not listed in drop down menu if $display_only is true
+  if ($display_only) {
+    foreach($views_style_plugins['base'] as $plugin => $def) {
+      if ($def['hide'] == true) {
+        unset($return['base'][$plugin]);
+        unset($return['titles'][$plugin]);
+      }
+    }
+  }
+
+  return ($titles ? $return['title'] : $return['base']);
 }
 
 // An implementation of hook_devel_caches() from devel.module
Index: modules/views_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/views_node.inc,v
retrieving revision 1.30.2.17
diff -u -p -r1.30.2.17 views_node.inc
--- modules/views_node.inc	5 May 2007 00:54:53 -0000	1.30.2.17
+++ modules/views_node.inc	8 Jun 2007 22:29:23 -0000
@@ -241,6 +241,14 @@ function node_views_tables() {
         'handler' => 'views_handler_filter_body',
         'help' => t('This filter allows nodes to be filtered by their body.'),
       ),
+      'include_exclude' => array(
+        'name' => t('Node: Include/Exclude Nodes'),
+        'field' => 'nid',
+        'operator' => 'views_handler_operator_or',
+        'value' => views_handler_filter_nid_value_form(VIEWS_FORM_DEFAULT_VIEW),
+        'value-type' => 'array',
+        'help' => t('This filter allows you to limit your view to only apply to some specific nodes. You can limit your view to a specific list of nodes, or you can exclude specific nodes from every being returned.'),
+      ),
     ),
   );
 
@@ -909,3 +917,17 @@ function views_handler_node_delete_desti
 function views_handler_node_nid($fieldinfo, $fielddata, $value, $data) {
   return $data->nid;
 }
+
+/**
+ * Proivde a configuration form for the include/exclude filter
+ */
+function views_handler_filter_nid_value_form($view) {
+
+  $form['vns'] = array (
+    '#type' => 'views_node_selector',
+    '#view' => $view,
+    '#multiple' => true,
+  );
+
+  return $form;
+}
