? nodecomment-472916.patch
Index: nodecomment.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodecomment/nodecomment.module,v
retrieving revision 1.3.2.15.2.17.2.30
diff -u -p -r1.3.2.15.2.17.2.30 nodecomment.module
--- nodecomment.module	15 Jun 2009 23:35:33 -0000	1.3.2.15.2.17.2.30
+++ nodecomment.module	17 Jun 2009 18:09:43 -0000
@@ -285,6 +285,29 @@ function nodecomment_form_alter(&$form, 
           $parent_nid = is_numeric(arg(4)) ? arg(4) : arg(3);
           $target = node_load($parent_nid);
           $form['#prefix'] .= node_view($target);
+          
+          // Prepend the Topic Review
+          $view_name = variable_get('node_comment_view_'. $parent->type, 'nodecomments');
+		  if ($view_name) {
+		    $review_output .= views_embed_view($view_name, 'nodecomment_comments_2', $parent->nid);
+		  }
+		    
+		  // add original post at end of list of replies 
+		  $forum_nid = arg(3);
+		  $target = node_load($forum_nid);
+		  $review_output .= node_view($target);
+		  
+		  // wrap in a div to set height @todo move to theme function
+		  $review_output = '<div id="topic_review">' . $review_output . '</div>';
+		  
+		  // add title and anchor link @todo move to theme function
+		  $review_output = '<a name="topic-review"></a>' . '<h3>' . t('Topic Review: @topic', array('@topic' => $parent->title)) . '</h3>' . $review_output;
+		  
+		  $form['topic_review'] = array(
+		    '#value' => '<a href="#topic-review">' . t('Topic Review') . '</a>',
+		  );
+		  $form['#suffix'] .= $review_output;
+          
         }
       }
 
Index: views/nodecomment.views_default.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodecomment/views/Attic/nodecomment.views_default.inc,v
retrieving revision 1.1.2.2.2.3
diff -u -p -r1.1.2.2.2.3 nodecomment.views_default.inc
--- views/nodecomment.views_default.inc	9 Jun 2009 23:38:09 -0000	1.1.2.2.2.3
+++ views/nodecomment.views_default.inc	17 Jun 2009 18:09:43 -0000
@@ -57,6 +57,13 @@ function nodecomment_views_default_views
       'relationship' => 'none',
     ),
   ));
+  $handler->override_option('sorts', array(
+    'created' => array(
+      'id' => 'created',
+      'table' => 'node',
+      'field' => 'created',
+    ),
+  ));
   $handler->override_option('arguments', array(
     'nid' => array(
       'default_action' => 'not found',
@@ -126,6 +133,26 @@ function nodecomment_views_default_views
     'links' => 1,
   ));
   $handler = $view->new_display('nodecomment_comments', 'Nodecomments', 'nodecomment_comments_1');
+  $handler = $view->new_display('nodecomment_comments', 'Nodecomments Topic Review', 'nodecomment_comments_2');
+  $handler->override_option('sorts', array(
+    'created' => array(
+      'order' => 'DESC',
+      'granularity' => 'second',
+      'id' => 'created',
+      'table' => 'node',
+      'field' => 'created',
+      'override' => array(
+        'button' => 'Use default',
+      ),
+      'relationship' => 'none',
+    ),
+  ));
+  $handler->override_option('row_options', array(
+    'relationship' => 'none',
+    'build_mode' => 'full',
+    'links' => 0,
+    'comments' => 0,
+  ));
   $views[$view->name] = $view;
 
   return $views;
