Index: fivestarextra.module
===================================================================
--- fivestarextra.module	(Revision 4)
+++ fivestarextra.module	(Revision 5)
@@ -38,7 +38,17 @@
   return $items;
 }
 
+/**
+ * Implementation of hook_perm().
+ *
+ * Exposes permissions for rating content, viewing aggregate ratings, and using PHP
+ * snippets when configuring fivestar CCK fields.
+ */
+function fivestarextra_perm() {
+  return array('rate comment');
+}
 
+
 /**
  * Implementation of hook_theme().
  */
@@ -60,6 +70,7 @@
  */
 function fivestarextra_comment(&$comment, $op) {
   
+  global $user;
   $path = arg();
   //If we are on the comment reply page, adding a dynamic rating form causes problems, so exit
   if ( $path[0] == 'comment' && $path[1] == 'reply' ) {
@@ -82,10 +93,21 @@
       $position = variable_get('fivestarextra_position_comment', 'below');
       switch ($position) {
         case 'above':
-          $comment->comment = drupal_get_form('fivestarextra_form_comment_'. $comment->cid, 'comment', $comment->cid) . $comment->comment;
-          break;
+          if (user_access('rate comment') && $comment->uid != $user->uid) {
+            $comment->comment = "<div style='float: left;'>".drupal_get_form('fivestarextra_form_comment_'. $comment->cid, 'comment', $comment->cid) . $comment->comment."</div>";
+            break;
+          }
+          $position = 'static';
+          
         case 'below':
-          $comment->comment .= drupal_get_form('fivestarextra_form_comment_'. $comment->cid, 'comment', $comment->cid);
+          if (user_access('rate comment') && $comment->uid != $user->uid) {
+            $comment->comment .= "<div style='float: left;'>".drupal_get_form('fivestarextra_form_comment_'. $comment->cid, 'comment', $comment->cid)."</div>";
+            break;
+          }
+          $position = 'static';
+          
+        case 'static':
+          $comment->comment .= "<div style='float: left;'>".fivestar_static('comment', $comment->cid, NULL, 'discussion')."</div>";
           break;
         default:
           // We'll do nothing.

