Commit faddd570 authored by Dries's avatar Dries

- 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) {
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']));
......
......@@ -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>
......@@ -61,7 +61,7 @@
<div class="attribution">
<?php print $picture; ?>
<?php print $user_picture; ?>
<div class="submitted">
<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