diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-01 23:15:41 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-01 23:15:41 +0000 |
commit | 3409019929da282bca397ccfa64985c5d74394f9 (patch) | |
tree | 992bfbd986c169ba995aaf21e690b8eae2811170 /themes | |
parent | 9e1c8ededcea32fa55854fa08eef227ffcf8a593 (diff) | |
download | brdo-3409019929da282bca397ccfa64985c5d74394f9.tar.gz brdo-3409019929da282bca397ccfa64985c5d74394f9.tar.bz2 |
#146386 by kbahey: refactor 'submitted by user - date' themeing and make it more verbose to translate
Diffstat (limited to 'themes')
-rw-r--r-- | themes/garland/comment.tpl.php | 2 | ||||
-rw-r--r-- | themes/garland/node.tpl.php | 4 | ||||
-rw-r--r-- | themes/garland/template.php | 16 |
3 files changed, 19 insertions, 3 deletions
diff --git a/themes/garland/comment.tpl.php b/themes/garland/comment.tpl.php index a28a1c551..b6c1af73d 100644 --- a/themes/garland/comment.tpl.php +++ b/themes/garland/comment.tpl.php @@ -2,7 +2,7 @@ <div class="clear-block"> <?php if ($submitted): ?> - <span class="submitted"><?php print t('!date — !username', array('!username' => theme('username', $comment), '!date' => format_date($comment->timestamp))); ?></span> + <span class="submitted"><?php print $submitted; ?></span> <?php endif; ?> <?php if ($comment->new) : ?> diff --git a/themes/garland/node.tpl.php b/themes/garland/node.tpl.php index 56af23654..f0e24936c 100644 --- a/themes/garland/node.tpl.php +++ b/themes/garland/node.tpl.php @@ -9,7 +9,7 @@ <?php endif; ?> <?php if ($submitted): ?> - <span class="submitted"><?php print t('!date — !username', array('!username' => theme('username', $node), '!date' => format_date($node->created))); ?></span> + <span class="submitted"><?php print $submitted; ?></span> <?php endif; ?> <div class="content"> @@ -28,4 +28,4 @@ <?php endif; ?> </div> -</div>
\ No newline at end of file +</div> diff --git a/themes/garland/template.php b/themes/garland/template.php index 3efbff7b9..cf605f5b4 100644 --- a/themes/garland/template.php +++ b/themes/garland/template.php @@ -83,3 +83,19 @@ function phptemplate_menu_local_tasks() { return $output; } + +function phptemplate_comment_submitted($comment) { + return t('!datetime — !username', + array( + '!username' => theme('username', $comment), + '!datetime' => format_date($comment->timestamp) + )); +} + +function phptemplate_node_submitted($node) { + return t('!datetime — !username', + array( + '!username' => theme('username', $node), + '!datetime' => format_date($node->created), + )); +} |