Index: views_attach_plugin_display_node_content.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/views_attach/views_attach_plugin_display_node_content.inc,v
retrieving revision 1.1
diff -u -r1.1 views_attach_plugin_display_node_content.inc
--- views_attach_plugin_display_node_content.inc	13 Jan 2009 08:07:10 -0000	1.1
+++ views_attach_plugin_display_node_content.inc	9 Feb 2010 22:31:01 -0000
@@ -82,7 +82,7 @@
           '#multiple' => TRUE,
           '#required' => TRUE,
           '#title' => t("Embed this display in the following node types"),
-          '#options' => node_get_types('names'),
+          '#options' => node_type_get_names(),
           '#default_value' => $this->get_option('types'),
         );
         break;
Index: views_attach.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/views_attach/views_attach.module,v
retrieving revision 1.1
diff -u -r1.1 views_attach.module
--- views_attach.module	13 Jan 2009 08:07:10 -0000	1.1
+++ views_attach.module	9 Feb 2010 22:31:00 -0000
@@ -6,7 +6,7 @@
  */
 function views_attach_views_api() {
   return array(
-    'api' => 2.0,
+    'api' => 3.0,
   );
 }
 
@@ -40,7 +40,7 @@
 }
 
 /**
- * Implementation of hook_block
+ * Implementation of hook_user
  */
 function views_attach_user($op, &$edit, &$account, $category = NULL) {
   switch ($op) {
@@ -58,8 +58,7 @@
               '#title' => $view->get_title(),
             );
             $account->content[$view->name . '_' . $display_id]['content'] = array(
-              '#type' => 'markup',
-              '#value' => $result,
+              '#markup' => $result,
             );
           }
         }
@@ -69,29 +68,26 @@
 }
 
 /**
- * Implementation of hook_block
+ * Implementation of hook_node_view
  */
-function views_attach_nodeapi(&$node, $op, $teaser, $page) {
-  switch ($op) {
-    case 'view':
-      $items = array();
-      $views = views_get_applicable_views('uses hook nodeapi');
-      foreach ($views as $data) {
-        list($view, $display_id) = $data;
-        $valid_node = in_array($node->type, $view->display_handler->get_option('types'));
-        $valid_mode = ($teaser == $view->display_handler->get_option('teaser') || $full == $view->display_handler->get_option('full'));
-        if ($valid_node && $valid_mode) {
-          $result = $view->execute_display($display_id);
-          if (!empty($result)) {
-            $node->content[$view->name . '_' . $display_id] = array(
-              '#title' => $view->get_title(),
-              '#type' => 'markup',
-              '#weight' => module_exists('cck') ? content_extra_field_weight($node->type, $view->name . '_' . $display_id) : 10,
-              '#value' => $result,
-            );
-          }
-        }
-        $view->destroy();
+function views_attach_node_view(&$node, $view_mode) {
+  $items = array();
+  $views = views_get_applicable_views('uses hook nodeapi');
+  foreach ($views as $data) {
+    list($view, $display_id) = $data;
+    $valid_node = in_array($node->type, $view->display_handler->get_option('types'));
+    $valid_mode = $view->display_handler->get_option($view_mode);
+    if ($valid_node && $valid_mode) {
+      $result = $view->execute_display($display_id);
+      if (!empty($result)) {
+        $node->content[$view->name . '_' . $display_id] = array(
+          '#title' => $view->get_title(),
+          '#markup' => $result,
+          '#weight' =>  10,
+        );
       }
+    }
+    $view->destroy();
   }
 }
+//#weight content_extra_field_weight($node->type, $view->name . '_' . $display_id) :
\ No newline at end of file
Index: views_attach.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/views_attach/views_attach.info,v
retrieving revision 1.1
diff -u -r1.1 views_attach.info
--- views_attach.info	13 Jan 2009 08:07:10 -0000	1.1
+++ views_attach.info	9 Feb 2010 22:31:00 -0000
@@ -1,6 +1,10 @@
 ; $Id: views_attach.info,v 1.1 2009/01/13 08:07:10 crell Exp $
 name = Views attach
 description = Provides new Views display types that can be attached to nodes or users. 
-core = 6.x
+core = 7.x
 dependencies[] = views
-package = Views
\ No newline at end of file
+package = Views
+files[]=views_attach_plugin_display_node_content.inc
+files[]=views_attach_plugin_display_profile.inc
+files[]=views_attach.views.inc
+files[]=views_attach.module
\ No newline at end of file
