summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-08-01 05:14:05 +0000
committerDries Buytaert <dries@buytaert.net>2005-08-01 05:14:05 +0000
commit7625a4e91ab81b52f5cd74cabe5b0e0324ef8bb4 (patch)
tree255aa1aab3de018eeb60d5756522e7726c7dbe10 /themes
parent22479d876173f5e1704cbafabba667450ecf2512 (diff)
downloadbrdo-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')
-rw-r--r--themes/chameleon/chameleon.theme4
-rw-r--r--themes/engines/phptemplate/phptemplate.engine8
2 files changed, 6 insertions, 6 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme
index 869618fe0..26b380ca4 100644
--- a/themes/chameleon/chameleon.theme
+++ b/themes/chameleon/chameleon.theme
@@ -126,7 +126,7 @@ function chameleon_node($node, $main = 0, $page = 0) {
$output .= " </div>\n";
- $submitted = theme_get_setting("toggle_node_info_$node->type") ? array(t("By %author at %date", array('%author' => format_name($node), '%date' => format_date($node->created, 'small')))) : array();
+ $submitted = theme_get_setting("toggle_node_info_$node->type") ? array(t("By %author at %date", array('%author' => theme('username', $node), '%date' => format_date($node->created, 'small')))) : array();
$terms = array();
if (module_exist('taxonomy')) {
@@ -147,7 +147,7 @@ function chameleon_node($node, $main = 0, $page = 0) {
}
function chameleon_comment($comment, $link = "") {
- $submitted = array(t('By %author at %date', array('%author' => format_name($comment), '%date' => format_date($comment->timestamp. 'small'))));
+ $submitted = array(t('By %author at %date', array('%author' => theme('username', $comment), '%date' => format_date($comment->timestamp. 'small'))));
$links = array($link);
$output = "<div class=\"comment\">\n";
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")
));