diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/common.php | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_compatibility.php | 41 |
2 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index f502d37c8f..5c0feb87db 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -73,6 +73,7 @@ require($phpbb_root_path . 'includes/class_loader.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_content.' . $phpEx); require($phpbb_root_path . 'includes/functions_container.' . $phpEx); +include($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php new file mode 100644 index 0000000000..68298449c1 --- /dev/null +++ b/phpBB/includes/functions_compatibility.php @@ -0,0 +1,41 @@ +<?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 +* +* @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) +{ + // map arguments to new function phpbb_get_avatar() + $row = array( + 'avatar' => $avatar, + 'avatar_type' => $avatar_type, + 'avatar_width' => $avatar_width, + 'avatar_height' => $avatar_height, + ); + + return phpbb_get_avatar($row, $alt, $ignore_config); +} |