Commit faddd570 authored by Dries's avatar Dries
Browse files

- Patch #1189816 by Jacine, Jeff Burnz, stijnbe, scor, rasskull, jessebeach,...

- Patch #1189816 by Jacine, Jeff Burnz, stijnbe, scor, rasskull, jessebeach, ericduran, sun: Convert comment.tpl.php to HTML5.
parent 4db35f75
...@@ -2263,20 +2263,20 @@ function comment_form_submit($form, &$form_state) { ...@@ -2263,20 +2263,20 @@ function comment_form_submit($form, &$form_state) {
function template_preprocess_comment(&$variables) { function template_preprocess_comment(&$variables) {
$comment = $variables['elements']['#comment']; $comment = $variables['elements']['#comment'];
$node = $variables['elements']['#node']; $node = $variables['elements']['#node'];
$variables['comment'] = $comment; $variables['comment'] = $comment;
$variables['node'] = $node; $variables['node'] = $node;
$variables['author'] = theme('username', array('account' => $comment)); $variables['author'] = theme('username', array('account' => $comment));
$variables['created'] = format_date($comment->created); $variables['created'] = format_date($comment->created);
$variables['changed'] = format_date($comment->changed); $variables['changed'] = format_date($comment->changed);
$variables['new'] = !empty($comment->new) ? t('new') : ''; $variables['new'] = !empty($comment->new) ? t('new') : '';
$variables['picture'] = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', array('account' => $comment)) : ''; $variables['user_picture'] = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', array('account' => $comment)) : '';
$variables['signature'] = $comment->signature; $variables['signature'] = $comment->signature;
$uri = entity_uri('comment', $comment); $uri = entity_uri('comment', $comment);
$uri['options'] += array('attributes' => array('class' => 'permalink', 'rel' => 'bookmark')); $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['permalink'] = l(t('Permalink'), $uri['path'], $uri['options']);
$variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['author'], '!datetime' => $variables['created'])); $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['author'], '!datetime' => $variables['created']));
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* - $permalink: Comment permalink. * - $permalink: Comment permalink.
* - $submitted: Submission information created from $author and $created during * - $submitted: Submission information created from $author and $created during
* template_preprocess_comment(). * template_preprocess_comment().
* - $picture: Authors picture. * - $user_picture: The comment author's picture from user-picture.tpl.php.
* - $signature: Authors signature. * - $signature: Authors signature.
* - $status: Comment status. Possible values are: * - $status: Comment status. Possible values are:
* comment-unpublished, comment-published or comment-preview. * comment-unpublished, comment-published or comment-preview.
...@@ -57,34 +57,33 @@ ...@@ -57,34 +57,33 @@
* @see theme_comment() * @see theme_comment()
*/ */
?> ?>
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> <article class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<?php print $picture ?>
<?php print render($title_prefix); ?>
<?php if ($new): ?> <?php if ($new): ?>
<span class="new"><?php print $new ?></span> <mark class="new"><?php print $new; ?></mark>
<?php endif; ?> <?php endif; ?>
<h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
<?php print render($title_prefix); ?>
<h3<?php print $title_attributes; ?>><?php print $title ?></h3>
<?php print render($title_suffix); ?> <?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 $permalink; ?>
<?php print $submitted; ?> </footer>
</div>
<div class="content"<?php print $content_attributes; ?>> <div class="content"<?php print $content_attributes; ?>>
<?php <?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']); hide($content['links']);
print render($content); print render($content);
?> ?>
<?php if ($signature): ?> <?php if ($signature): ?>
<div class="user-signature clearfix"> <div class="user-signature">
<?php print $signature ?> <?php print $signature; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php print render($content['links']) ?> <?php print render($content['links']) ?>
</div> </article>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div class="attribution"> <div class="attribution">
<?php print $picture; ?> <?php print $user_picture; ?>
<div class="submitted"> <div class="submitted">
<p class="commenter-name"> <p class="commenter-name">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment