From 8e541f9125212203a1ca3f875ffda60469aa2b83 Mon Sep 17 00:00:00 2001
From: Jesse Beach <splendidnoise@gmail.com>
Date: Tue, 29 Nov 2011 11:24:15 -0500
Subject: [PATCH] Issue #1189816 by stijnbe, scor, ericduran, Jeff Burnz, sun, Jacine, jessebeach : HTML5ified the comment module.

Signed-off-by: Jesse Beach <splendidnoise@gmail.com>
---
 core/modules/comment/comment.module          |   18 ++++++++--------
 core/modules/comment/comment.tpl.php         |   27 ++++++++++++-------------
 core/themes/bartik/templates/comment.tpl.php |    2 +-
 3 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index cf49923..6cdc5cc 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -2263,20 +2263,20 @@ function comment_form_submit($form, &$form_state) {
 function template_preprocess_comment(&$variables) {
   $comment = $variables['elements']['#comment'];
   $node = $variables['elements']['#node'];
-  $variables['comment']   = $comment;
-  $variables['node']      = $node;
-  $variables['author']    = theme('username', array('account' => $comment));
-  $variables['created']   = format_date($comment->created);
-  $variables['changed']   = format_date($comment->changed);
-
-  $variables['new']       = !empty($comment->new) ? t('new') : '';
-  $variables['picture']   = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', array('account' => $comment)) : '';
+  $variables['comment'] = $comment;
+  $variables['node'] = $node;
+  $variables['author'] = theme('username', array('account' => $comment));
+  $variables['created'] = format_date($comment->created);
+  $variables['changed'] = format_date($comment->changed);
+
+  $variables['new'] = !empty($comment->new) ? t('new') : '';
+  $variables['user_picture'] = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', array('account' => $comment)) : '';
   $variables['signature'] = $comment->signature;
 
   $uri = entity_uri('comment', $comment);
   $uri['options'] += array('attributes' => array('class' => 'permalink', 'rel' => 'bookmark'));
 
-  $variables['title']     = l($comment->subject, $uri['path'], $uri['options']);
+  $variables['title'] = l($comment->subject, $uri['path'], $uri['options']);
   $variables['permalink'] = l(t('Permalink'), $uri['path'], $uri['options']);
   $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['author'], '!datetime' => $variables['created']));
 
diff --git a/core/modules/comment/comment.tpl.php b/core/modules/comment/comment.tpl.php
index a483813..8ba46d8 100644
--- a/core/modules/comment/comment.tpl.php
+++ b/core/modules/comment/comment.tpl.php
@@ -20,7 +20,7 @@
  * - $permalink: Comment permalink.
  * - $submitted: Submission information created from $author and $created during
  *   template_preprocess_comment().
- * - $picture: Authors picture.
+ * - $user_picture: The comment author's picture from user-picture.tpl.php.
  * - $signature: Authors signature.
  * - $status: Comment status. Possible values are:
  *   comment-unpublished, comment-published or comment-preview.
@@ -57,34 +57,33 @@
  * @see theme_comment()
  */
 ?>
-<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
-  <?php print $picture ?>
+<article class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
 
+  <?php print render($title_prefix); ?>
   <?php if ($new): ?>
-    <span class="new"><?php print $new ?></span>
+    <mark class="new"><?php print $new; ?></mark>
   <?php endif; ?>
-
-  <?php print render($title_prefix); ?>
-  <h3<?php print $title_attributes; ?>><?php print $title ?></h3>
+  <h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
   <?php print render($title_suffix); ?>
 
-  <div class="submitted">
+  <footer>
+    <?php print $user_picture; ?>
+    <p class="submitted"><?php print $submitted; ?></p>
     <?php print $permalink; ?>
-    <?php print $submitted; ?>
-  </div>
+  </footer>
 
   <div class="content"<?php print $content_attributes; ?>>
     <?php
-      // We hide the comments and links now so that we can render them later.
+      // We hide the links now so that we can render them later.
       hide($content['links']);
       print render($content);
     ?>
     <?php if ($signature): ?>
-    <div class="user-signature clearfix">
-      <?php print $signature ?>
+    <div class="user-signature">
+      <?php print $signature; ?>
     </div>
     <?php endif; ?>
   </div>
 
   <?php print render($content['links']) ?>
-</div>
+</article>
diff --git a/core/themes/bartik/templates/comment.tpl.php b/core/themes/bartik/templates/comment.tpl.php
index d64487d..553fb53 100644
--- a/core/themes/bartik/templates/comment.tpl.php
+++ b/core/themes/bartik/templates/comment.tpl.php
@@ -61,7 +61,7 @@
 
   <div class="attribution">
 
-    <?php print $picture; ?>
+    <?php print $user_picture; ?>
 
     <div class="submitted">
       <p class="commenter-name">
-- 
1.7.3.4

