summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries2011-12-05 12:06:35 (GMT)
committerDries2011-12-05 12:06:35 (GMT)
commitfaddd57042400e22bf1a254ce4716dcabb9facc9 (patch)
tree23f1ded4de1b512eac2d91290c0f3cca8edd3632
parent4db35f7574045ff21fb4b02c9b0025ca7d52951f (diff)
- Patch #1189816 by Jacine, Jeff Burnz, stijnbe, scor, rasskull, jessebeach, ericduran, sun: Convert comment.tpl.php to HTML5.
-rw-r--r--core/modules/comment/comment.module18
-rw-r--r--core/modules/comment/comment.tpl.php27
-rw-r--r--core/themes/bartik/templates/comment.tpl.php2
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">