diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-01 00:18:15 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-01 00:18:15 +0000 |
commit | 9ada5dec79b8f42e47a7245a91b669e240c6f6c9 (patch) | |
tree | 4c442b288dcedfef32ee31e6e85004db5d37c19c /themes/garland | |
parent | 66ffb5f7e8562a2f880be3b58dcf1e602cd95d4f (diff) | |
download | brdo-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 'themes/garland')
-rw-r--r-- | themes/garland/comment.tpl.php | 2 | ||||
-rw-r--r-- | themes/garland/node.tpl.php | 2 | ||||
-rw-r--r-- | themes/garland/template.php | 14 |
3 files changed, 16 insertions, 2 deletions
diff --git a/themes/garland/comment.tpl.php b/themes/garland/comment.tpl.php index b46c1edfc..a11f4fce5 100644 --- a/themes/garland/comment.tpl.php +++ b/themes/garland/comment.tpl.php @@ -5,7 +5,7 @@ <div class="clearfix"> - <span class="submitted"><?php print $created; ?> — <?php print $author; ?></span> + <span class="submitted"><?php print $submitted ?></span> <?php if ($new) : ?> <span class="new"><?php print drupal_ucfirst($new) ?></span> diff --git a/themes/garland/node.tpl.php b/themes/garland/node.tpl.php index 6a7ae448d..0d15d8c58 100644 --- a/themes/garland/node.tpl.php +++ b/themes/garland/node.tpl.php @@ -12,7 +12,7 @@ <?php print render($title_suffix); ?> <?php if ($display_submitted): ?> - <span class="submitted"><?php print $date; ?> — <?php print $name; ?></span> + <span class="submitted"><?php print $submitted ?></span> <?php endif; ?> <div class="content clearfix"<?php print $content_attributes; ?>> diff --git a/themes/garland/template.php b/themes/garland/template.php index 8021d7cdd..b9234c972 100644 --- a/themes/garland/template.php +++ b/themes/garland/template.php @@ -120,6 +120,20 @@ function garland_preprocess_page(&$vars) { } /** + * Override or insert variables into the node template. + */ +function garland_preprocess_node(&$vars) { + $vars['submitted'] = $vars['date'] . ' — ' . $vars['name']; +} + +/** + * Override or insert variables into the comment template. + */ +function garland_preprocess_comment(&$vars) { + $vars['submitted'] = $vars['created'] . ' — ' . $vars['author']; +} + +/** * Override or insert variables into the block template. */ function garland_preprocess_block(&$vars) { |