diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-02-15 21:17:23 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-02-15 21:17:23 +0000 |
commit | bf459265e607e4c5a5082ef0276a88dd90dd727f (patch) | |
tree | e8333bc6fa6f79ca47eeb7f0851de885ad20052f /themes | |
parent | 36721f4692d2a9fc59e9019316d700974d693c79 (diff) | |
download | brdo-bf459265e607e4c5a5082ef0276a88dd90dd727f.tar.gz brdo-bf459265e607e4c5a5082ef0276a88dd90dd727f.tar.bz2 |
- Patch #5789 by TDobes: made the avatars link to the user profile.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/xtemplate/xtemplate.theme | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme index acb93d1d6..9da5e5a03 100644 --- a/themes/xtemplate/xtemplate.theme +++ b/themes/xtemplate/xtemplate.theme @@ -78,7 +78,11 @@ function xtemplate_node($node, $main = 0, $page = 0) { $avatar = file_create_url($avatar); } if ($avatar) { - $xtemplate->template->assign("avatar", "<img src=\"$avatar\" alt=\"" . t("%user's avatar", array("%user" => $comment->name ? $comment->name : t(variable_get("anonymous", "Anonymous")))) . "\" />"); + $avatar = "<img src=\"$avatar\" alt=\"" . t("%user's avatar", array("%user" => $comment->name ? $comment->name : t(variable_get("anonymous", "Anonymous")))) . "\" />"; + if ($node->uid) { + $avatar = l($avatar, "user/view/$node->uid", array("title" => t("View user profile."))); + } + $xtemplate->template->assign("avatar", $avatar); $xtemplate->template->parse("node.avatar"); } } @@ -126,7 +130,11 @@ function xtemplate_comment($comment, $links = 0) { $avatar = file_create_url($avatar); } if ($avatar) { - $xtemplate->template->assign("avatar", "<img src=\"$avatar\" alt=\"" . t("%user's avatar", array("%user" => $comment->name ? $comment->name : t(variable_get("anonymous", "Anonymous")))) . "\" />"); + $avatar = "<img src=\"$avatar\" alt=\"" . t("%user's avatar", array("%user" => $comment->name ? $comment->name : t(variable_get("anonymous", "Anonymous")))) . "\" />"; + if ($comment->uid) { + $avatar = l($avatar, "user/view/$comment->uid", array("title" => t("View user profile."))); + } + $xtemplate->template->assign("avatar", $avatar); $xtemplate->template->parse("comment.avatar"); } } |