1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?php
/**
*
* @package phpBB3
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Get user avatar
* Compatibility function added: phpBB 3.1.0-A1
*
* @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
* @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
*
* @return string Avatar image
*/
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
{
global $phpbb_root_path, $phpEx;
// map arguments to new function phpbb_get_avatar()
$row = array(
'avatar' => $avatar,
'avatar_type' => $avatar_type,
'avatar_width' => $avatar_width,
'avatar_height' => $avatar_height,
);
if (!function_exists('phpbb_get_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
return phpbb_get_avatar($row, $alt, $ignore_config);
}
|