summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-01 00:18:15 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-01 00:18:15 +0000
commit9ada5dec79b8f42e47a7245a91b669e240c6f6c9 (patch)
tree4c442b288dcedfef32ee31e6e85004db5d37c19c /modules/comment
parent66ffb5f7e8562a2f880be3b58dcf1e602cd95d4f (diff)
downloadbrdo-9ada5dec79b8f42e47a7245a91b669e240c6f6c9.tar.gz
brdo-9ada5dec79b8f42e47a7245a91b669e240c6f6c9.tar.bz2
#364470 follow-up by Dave Reid, JohnAlbin, et al: Move submitted by back into a variable. The string approach was too limited.
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment.module1
-rw-r--r--modules/comment/comment.tpl.php7
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index b279ef324..2a83aced0 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2258,6 +2258,7 @@ function template_preprocess_comment(&$variables) {
$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']));
// Preprocess fields.
field_attach_preprocess('comment', $comment, $variables['elements'], $variables);
diff --git a/modules/comment/comment.tpl.php b/modules/comment/comment.tpl.php
index 314da57ca..adf93b31c 100644
--- a/modules/comment/comment.tpl.php
+++ b/modules/comment/comment.tpl.php
@@ -19,6 +19,8 @@
* desired parameters on the $comment->changed variable.
* - $new: New comment marker.
* - $permalink: Comment permalink.
+ * - $submitted: Submission information created from $author and $created during
+ * template_preprocess_comment().
* - $picture: Authors picture.
* - $signature: Authors signature.
* - $status: Comment status. Possible values are:
@@ -69,10 +71,7 @@
<div class="submitted">
<?php print $permalink; ?>
- <?php
- print t('Submitted by !username on !datetime.',
- array('!username' => $author, '!datetime' => $created));
- ?>
+ <?php print $submitted; ?>
</div>
<div class="content"<?php print $content_attributes; ?>>