All pastes #366638 Raw Edit

Unnamed

public text v1 · immutable
#366638 ·published 2007-02-21 20:24 UTC
rendered paste body
Only in nodecomment2: .svn
Only in nodecomment/: CVS
Only in nodecomment/: node-comment.tpl.php
diff -u nodecomment2/nodecomment.module nodecomment/nodecomment.module
--- nodecomment2/nodecomment.module	2007-02-20 12:45:56.000000000 -0500
+++ nodecomment/nodecomment.module	2007-01-11 18:03:36.000000000 -0500
@@ -1,5 +1,5 @@
 <?php
-// $Id: comment.module,v 1.504 2006/11/27 02:14:33 drumm Exp $
+// $Id: nodecomment.module,v 1.2 2007/01/11 23:03:36 vauxia Exp $
 
 /**
  * @file
@@ -681,16 +681,6 @@
   return theme('box', $title, nodecomment_form($node));
 }
 
-function theme_nodecomment($comment, $links = array()) {
-  $output  = '<div class="comment'. ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') .'">';
-  $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ' ' . theme('mark', $comment->new) ."</div>\n";
-  $output .= '<div class="credit">'. t('by %a on %b', array('%a' => theme('username', $comment), '%b' => format_date($comment->timestamp))) ."</div>\n";
-  $output .= '<div class="body">'. $comment->comment .'</div>';
-  $output .= '<div class="links">'. theme('links', $links) .'</div>';
-  $output .= '</div>';
-  return $output;
-}
-
 function theme_nodecomment_post_forbidden($nid) {
   global $user;
   if ($user->uid) {
@@ -807,12 +797,18 @@
   }
 }
 
-function theme_comment($comment, $links = array()) {
-  $output  = '<div class="comment'. ($comment->status == 0 ? ' comment-unpublished' : '') .'">';
-  $output .= '<div class="subject">'. l($comment->title, $_GET['q'], NULL, NULL, "comment-$comment->nid") . ' ' . theme('mark', $comment->new) ."</div>\n";
-  $output .= '<div class="credit">'. t('by %a on %b', array('%a' => theme('username', $comment), '%b' => format_date(max($comment->created, $comment->changed)))) ."</div>\n";
-  $output .= '<div class="body">'. $comment->body .'</div>';
+if (!function_exists('theme_comment')) {
+  function theme_comment($comment, $links=array()) {
+    return theme('nodecomment', $comment, $links);
+  }
+}
+
+function theme_nodecomment($comment, $links = array()) {
+  $output  = '<div class="comment'. ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') .'">';
+  $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") . ' ' . theme('mark', $comment->new) ."</div>\n";
+  $output .= '<div class="credit">'. t('by %a on %b', array('%a' => theme('username', $comment), '%b' => format_date($comment->timestamp))) ."</div>\n";
+  $output .= '<div class="body">'. $comment->comment .'</div>';
   $output .= '<div class="links">'. theme('links', $links) .'</div>';
   $output .= '</div>';
   return $output;
-}
\ No newline at end of file
+}
diff -u nodecomment2/nodecomment_views.inc nodecomment/nodecomment_views.inc
--- nodecomment2/nodecomment_views.inc	2007-02-20 12:45:56.000000000 -0500
+++ nodecomment/nodecomment_views.inc	2007-01-11 18:03:36.000000000 -0500
@@ -1,5 +1,5 @@
 <?php
-// $Id$
+// $Id: nodecomment_views.inc,v 1.2 2007/01/11 23:03:36 vauxia Exp $
 
 /**
  * This include file implements views functionality on behalf of relationship.module
@@ -171,6 +171,7 @@
   );
   $view->exposed_filter = array();
   $view->requires = array('node');
+  $view->page_type = 'teaser';
   $views[$view->name] = $view;
   return $views;
 }
@@ -263,4 +264,4 @@
     $link = l($value, "node/$data->nid", NULL, NULL, "comment-$data->comments_cid");
   }
   return $link .' '. theme('mark', node_mark($data->nid, $data->comments_timestamp));
-}
\ No newline at end of file
+}