diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-31 20:29:45 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-31 20:29:45 +0200 |
commit | ba84268d4ed2d6498f87b5a466f2bd6465e48f42 (patch) | |
tree | 2f55bd871af3f7f447fe321912b0a631b2c719ad /phpBB/includes/functions_display.php | |
parent | a618710a69cf797d2b64a3567b2d2da327cddc25 (diff) | |
parent | fa6c1044b8b11baf1d100f695e8b17457d26fd4a (diff) | |
download | forums-ba84268d4ed2d6498f87b5a466f2bd6465e48f42.tar forums-ba84268d4ed2d6498f87b5a466f2bd6465e48f42.tar.gz forums-ba84268d4ed2d6498f87b5a466f2bd6465e48f42.tar.bz2 forums-ba84268d4ed2d6498f87b5a466f2bd6465e48f42.tar.xz forums-ba84268d4ed2d6498f87b5a466f2bd6465e48f42.zip |
Merge remote-tracking branch 'crizz0/ticket/9758' into develop-ascraeus
* crizz0/ticket/9758:
[ticket/9758] Clickable avatar in header and renamed class for avatar-img
[ticket/9758] Remove unnessary if-question for include functions_display
[ticket/9758] Slims the line 4775 in includes/functions.php
[ticket/9758] Adds id and changes filter to fix travis CI test
[ticket/9758] Removed the needless space after first ENDIF
[ticket/9758] Adding impr. for overall_header display of avatar and username
[ticket/9758] Fixed bug in mcp_warn.php
[ticket/9758] Optimises the html code of avatar image in header
[ticket/9758] Error because of missing functions_display.php fixed
[ticket/9758] Removed useless if-conditions to include functions.php
[ticket/9758] Changes class name of new "span" in overall_header.html
[ticket/9758] Adds global template variable CURRENT_USER_AVATAR
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r-- | phpBB/includes/functions_display.php | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index cd2c9e5ae6..2b11d00f1e 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1377,92 +1377,6 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank } /** -* Get user avatar -* -* @param array $user_row Row from the users table -* @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 html -*/ -function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false) -{ - $row = \phpbb\avatar\manager::clean_row($user_row, 'user'); - return phpbb_get_avatar($row, $alt, $ignore_config); -} - -/** -* Get group avatar -* -* @param array $group_row Row from the groups table -* @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 html -*/ -function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false) -{ - $row = \phpbb\avatar\manager::clean_row($user_row, 'group'); - return phpbb_get_avatar($row, $alt, $ignore_config); -} - -/** -* Get avatar -* -* @param array $row Row cleaned by \phpbb\avatar\driver\driver::clean_row -* @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 html -*/ -function phpbb_get_avatar($row, $alt, $ignore_config = false) -{ - global $user, $config, $cache, $phpbb_root_path, $phpEx; - global $request; - global $phpbb_container; - - if (!$config['allow_avatar'] && !$ignore_config) - { - return ''; - } - - $avatar_data = array( - 'src' => $row['avatar'], - 'width' => $row['avatar_width'], - 'height' => $row['avatar_height'], - ); - - $phpbb_avatar_manager = $phpbb_container->get('avatar.manager'); - $driver = $phpbb_avatar_manager->get_driver($row['avatar_type'], $ignore_config); - $html = ''; - - if ($driver) - { - $html = $driver->get_custom_html($user, $row, $alt); - if (!empty($html)) - { - return $html; - } - - $avatar_data = $driver->get_data($row, $ignore_config); - } - else - { - $avatar_data['src'] = ''; - } - - if (!empty($avatar_data['src'])) - { - $html = '<img src="' . $avatar_data['src'] . '" ' . - ($avatar_data['width'] ? ('width="' . $avatar_data['width'] . '" ') : '') . - ($avatar_data['height'] ? ('height="' . $avatar_data['height'] . '" ') : '') . - 'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />'; - } - - return $html; -} - -/** * Generate a list of archive types available for compressing attachments * * @param string $param_key Either topic_id or post_id |