- Patch #5789 by TDobes: made the avatars link to the user profile.

4.4.x
Dries Buytaert 2004-02-15 21:17:23 +00:00
parent 36721f4692
commit bf459265e6
1 changed files with 10 additions and 2 deletions

View File

@ -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");
}
}