Description:
Displays a user's avatar
Box Code:
##### START show_avatar ######
# show_avatar scoop box by Jason Eaton
# http://www.on2raj.org
# This box takes a single-quote enclosed user nick
# as an argument, and displays an IMG tag with the
# value of the user's avatar embedded within it.
# Depends on "choose_avatar" and "set_avatar" to
# work correctly, but is easily changeable.
# Guidance on proper use of the avatar can be
# placed in the block "avatar_information" to
# assist users with finding, hosting, and setting
# their avatar, but this is not required
my ($rv, $sth) = $S->db_select({
WHAT => 'avatar',
FROM => 'avatar',
WHERE => "user = $ARGS[0]",
});
my $avatar = $sth->fetchrow_hashref();
my $content ;
my $content .= qq{
<!--this is the avatar box's returned value -->
<img src="$avatar->{avatar}" height="80" width="80" >
<!-- this is after the avatar img tag -->
};
return $content;
## END show_avatar
|