mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 06:20:46 +02:00
my take on getting the bugs down... thanks to those also providing (usable) solutions to the problem. ;) Of course also to those reporting generally...
git-svn-id: file:///svn/phpbb/trunk@7330 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -706,7 +706,7 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
|
||||
{
|
||||
$topic_type = $user->lang['VIEW_TOPIC_MOVED'];
|
||||
$folder_img = 'topic_moved';
|
||||
$folder_alt = 'VIEW_TOPIC_MOVED';
|
||||
$folder_alt = 'TOPIC_MOVED';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1096,4 +1096,41 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user avatar
|
||||
*
|
||||
* @param string $avatar Users assigned avatar name
|
||||
* @param int $avatar_type Type of avatar
|
||||
* @param string $avatar_width Width of users avatar
|
||||
* @param string $avatar_height Height of users avatar
|
||||
* @param string $alt Optional language string for alt tag within image, can be a language key or text
|
||||
*
|
||||
* @return string Avatar image
|
||||
*/
|
||||
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR')
|
||||
{
|
||||
global $user, $config, $phpbb_root_path;
|
||||
|
||||
if (empty($avatar) || !$avatar_type)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$avatar_img = '';
|
||||
|
||||
switch ($avatar_type)
|
||||
{
|
||||
case AVATAR_UPLOAD:
|
||||
$avatar_img = $phpbb_root_path . $config['avatar_path'] . '/';
|
||||
break;
|
||||
|
||||
case AVATAR_GALLERY:
|
||||
$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
|
||||
break;
|
||||
}
|
||||
|
||||
$avatar_img .= $avatar;
|
||||
return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user