aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_compatibility.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-01-22 17:21:49 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-01-22 17:21:49 +0100
commit79356f54415f901a8ff743817121216cbefb16ee (patch)
tree6ae089f1d5570ad46f123ab74f2e044e898edbd2 /phpBB/includes/functions_compatibility.php
parent84272b1028eb0a30abffa898005c99c4f271888b (diff)
downloadforums-79356f54415f901a8ff743817121216cbefb16ee.tar
forums-79356f54415f901a8ff743817121216cbefb16ee.tar.gz
forums-79356f54415f901a8ff743817121216cbefb16ee.tar.bz2
forums-79356f54415f901a8ff743817121216cbefb16ee.tar.xz
forums-79356f54415f901a8ff743817121216cbefb16ee.zip
[feature/avatars] Add compatibility function for get_user_avatar()
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/functions_compatibility.php')
-rw-r--r--phpBB/includes/functions_compatibility.php41
1 files changed, 41 insertions, 0 deletions
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);
+}