diff -Naur down/views_attach.module www/views_attach.module
--- down/views_attach.module	2009-01-20 22:19:48.000000000 +0100
+++ www/views_attach.module	2009-01-23 16:02:45.000000000 +0100
@@ -73,8 +73,13 @@
     case 'view':
       // A side effect of defining it this way is that if we're called for an
       // embedded node, with no teaser or page, we use the full version's settings.
-      // That is by design.
-      $mode = $teaser ? 'teaser' : 'full';
+      // That is by design.
+
+      $mode = $node->build_mode;
+      if ($mode === NODE_BUILD_NORMAL) {
+        $mode = $teaser ? 'teaser' : 'full';
+      }
+
       $views = views_attach_get_node_views($node->type, $mode);
       foreach ($views as $info) {
         $view = views_get_view($info['name']);
@@ -166,14 +171,12 @@
       $views = views_get_applicable_views('uses hook nodeapi');
       foreach ($views as $data) {
         list($view, $display_id) = $data;
-        $full = $view->display_handler->get_option('full');
-        $teaser = $view->display_handler->get_option('teaser');
+        $modes = views_attach_build_modes();
         foreach ($view->display_handler->get_option('types') as $type_to_use) {
-          if ($full) {
-            $used_views[$type_to_use]['full'][] = array('name' => $view->name, 'display' => $display_id, 'title' => $view->get_title());
-          }
-          if ($teaser) {
-            $used_views[$type_to_use]['teaser'][] = array('name' => $view->name, 'display' => $display_id, 'title' => $view->get_title());
+          foreach ($modes as $mode => $value) {
+            if ($view->display_handler->get_option($mode)) {
+              $used_views[$type_to_use][$mode][] = array('name' => $view->name, 'display' => $display_id, 'title' => $view->get_title());
+            }
           }
         }
         $view->destroy();
@@ -182,10 +185,18 @@
     }
   }
 
-  if (empty($mode)) {
+  if (is_null($mode)) {
     return isset($used_views[$type]) ? $used_views[$type] : array();
   }
   else {
     return isset($used_views[$type][$mode]) ? $used_views[$type][$mode] : array();
   }
 }
+
+function views_attach_build_modes() {
+  $default_modes = array(
+    'full' => array('title' => 'Full'),
+    'teaser'  => array('title' => 'Teaser'),
+  );
+  return module_exists('content') ? content_build_modes() : $default_modes;
+}
\ В конце файла нет новой строки
diff -Naur down/views_attach_plugin_display_node_content.inc www/views_attach_plugin_display_node_content.inc
--- down/views_attach_plugin_display_node_content.inc	2009-01-20 22:44:38.000000000 +0100
+++ www/views_attach_plugin_display_node_content.inc	2009-01-23 16:02:45.000000000 +0100
@@ -6,11 +6,14 @@
  */
 class views_attach_plugin_display_node_content extends views_plugin_display {
   function option_definition () {
-    $options = parent::option_definition();
+    $options = parent::option_definition();
 
-    $options['types'] = array('default' => array());
-    $options['teaser'] = array('default' => FALSE);
-    $options['full'] = array('default' => TRUE);
+    $options['types'] = array('default' => array());
+
+    $modes = views_attach_build_modes();
+    foreach ($modes as $mode => $value) {
+      $options[$mode] = array('default' => $mode == 'full' ? TRUE : FALSE);
+    }
 
     return $options;
   }
@@ -38,29 +41,17 @@
       'title' => t('Node types'),
       'value' => implode(', ', $types),
     );
-
-    $teaser = $this->get_option('teaser');
-    if (empty($teaser)) {
-      $teaser = FALSE;
-    }
-
-    $options['teaser'] = array(
-      'category' => 'node_content',
-      'title' => t('Show on teaser'),
-      'value' => $teaser ? t('True') : t('False'),
-    );
-
-    $full = $this->get_option('full');
-    if (empty($full)) {
-      $full = FALSE;
+    foreach (views_attach_build_modes() as $mode => $value) {
+      $opt = $this->get_option($mode);
+      if (empty($opt)) {
+        $opt = FALSE;
+      }
+      $options[$mode] = array(
+        'category' => 'node_content',
+        'title' => t('Show on @mode', array('@mode' => $value['title'])),
+        'value' => $opt ? t('True') : t('False'),
+      );
     }
-
-    $options['full'] = array(
-      'category' => 'node_content',
-      'title' => t('Show on full view'),
-      'value' => $full ? t('True') : t('False'),
-    );
-
     $weight = $this->get_option('weight');
     if (empty($weight)) {
       $weight = 10;
@@ -73,8 +64,9 @@
   function options_form(&$form, &$form_state) {
     // It is very important to call the parent function here:
     parent::options_form($form, $form_state);
-
-    switch ($form_state['section']) {
+
+    $section = $form_state['section'];
+    switch ($section) {
       case 'types':
         $form['#title'] .= t('Node types');
         $form['types'] = array(
@@ -86,40 +78,31 @@
           '#default_value' => $this->get_option('types'),
         );
         break;
-
-      case 'teaser':
-        $form['#title'] .= t('Teaser view');
-        $form['teaser'] = array(
-          '#type' => 'checkbox',
-          '#title' => t("Show this view on the node's teaser"),
-          '#default_value' => $this->get_option('teaser'),
-        );
-        break;
-
-      case 'full':
-        $form['#title'] .= t('Full view');
-        $form['full'] = array(
-          '#type' => 'checkbox',
-          '#title' => t("Show this view on the node's full view"),
-          '#default_value' => $this->get_option('full'),
-        );
-        break;
-      }
+     }
+     $build_modes = views_attach_build_modes();
+     if (isset($build_modes[$section])) {
+       $form['#title'] .= t('@mode view', array('@mode' => $build_modes[$section]['title']));
+       $form[$section] = array(
+         '#type' => 'checkbox',
+         '#title' => t("Show this view on the node's %mode", array('%mode' => $build_modes[$section]['title'])),
+         '#default_value' => $this->get_option($section),
+       );
+     }
   }
 
   function options_submit($form, &$form_state) {
     // It is very important to call the parent function here:
-    parent::options_submit($form, $form_state);
-    switch ($form_state['section']) {
+    parent::options_submit($form, $form_state);
+
+    $section = $form_state['section'];
+    switch ($section) {
       case 'types':
         $this->set_option('types', $form_state['values']['types']);
         break;
-      case 'teaser':
-        $this->set_option('teaser', $form_state['values']['teaser']);
-        break;
-      case 'full':
-        $this->set_option('full', $form_state['values']['full']);
-        break;
+    }
+    $build_modes = views_attach_build_modes();
+    if (isset($build_modes[$section])) {
+      $this->set_option($section, $form_state['values'][$section]);
     }
   }
 
