diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-08-01 05:14:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-08-01 05:14:05 +0000 |
commit | 7625a4e91ab81b52f5cd74cabe5b0e0324ef8bb4 (patch) | |
tree | 255aa1aab3de018eeb60d5756522e7726c7dbe10 /themes/engines/phptemplate | |
parent | 22479d876173f5e1704cbafabba667450ecf2512 (diff) | |
download | brdo-7625a4e91ab81b52f5cd74cabe5b0e0324ef8bb4.tar.gz brdo-7625a4e91ab81b52f5cd74cabe5b0e0324ef8bb4.tar.bz2 |
- Patch #27737 by Gerhard: format_name($object) -> theme('username', $object).
Usernames can now be themed; eg. an icon/avatar could be added.
TODO: update contributed modules + update the migration docs.
Diffstat (limited to 'themes/engines/phptemplate')
-rw-r--r-- | themes/engines/phptemplate/phptemplate.engine | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/engines/phptemplate/phptemplate.engine b/themes/engines/phptemplate/phptemplate.engine index 22b1d9805..57c203a29 100644 --- a/themes/engines/phptemplate/phptemplate.engine +++ b/themes/engines/phptemplate/phptemplate.engine @@ -206,7 +206,7 @@ function phptemplate_node($node, $main = 0, $page = 0) { 'date' => format_date($node->created), 'links' => $node->links ? theme('links', $node->links) : '', 'main' => $main, - 'name' => format_name($node), + 'name' => theme('username', $node), 'node' => $node, // we pass the actual node to allow more customization 'node_url' => url('node/'. $node->nid), 'page' => $page, @@ -220,7 +220,7 @@ function phptemplate_node($node, $main = 0, $page = 0) { // Display info only on certain node types. if (theme_get_setting('toggle_node_info_' . $node->type)) { - $variables['submitted'] = t('Submitted by %a on %b.', array('%a' => format_name($node), '%b' => format_date($node->created))); + $variables['submitted'] = t('Submitted by %a on %b.', array('%a' => theme('username', $node), '%b' => format_date($node->created))); $variables['picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $node) : ''; } @@ -233,7 +233,7 @@ function phptemplate_node($node, $main = 0, $page = 0) { */ function phptemplate_comment($comment, $links = 0) { return _phptemplate_callback('comment', array( - 'author' => format_name($comment), + 'author' => theme('username', $comment), 'comment' => $comment, 'content' => $comment->comment, 'date' => format_date($comment->timestamp), @@ -241,7 +241,7 @@ function phptemplate_comment($comment, $links = 0) { 'new' => $comment->new ? t('new') : '', 'picture' => theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : '', 'submitted' => t('Submitted by %a on %b.', - array('%a' => format_name($comment), + array('%a' => theme('username', $comment), '%b' => format_date($comment->timestamp))), 'title' => l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") )); |