| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * Member Avatar & Status [MAS]. An extension for the phpBB Forum Software package. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * @copyright (c) 2018-2020, Dark❶ [dark1] | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * @license GNU General Public License, version 2 (GPL-2.0-only) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | namespace dark1\memberavatarstatus\core; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  * @ignore | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  | use phpbb\config\config; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  | use phpbb\language\language; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  * Member Avatar & Status Core Avatar Class. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  | class avatar | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  | 	/** @var int No Avatar Size */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  | 	const NO_AVATAR_SIZE = 1000; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  | 	/** @var int Avatar Minimum Size */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  | 	const AV_MIN_SZ = 9; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  | 	/** @var int Avatar Default Size Small */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  | 	const AV_DEF_SZ_SML = 20; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  | 	/** @var int Avatar Default Size Big */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  | 	const AV_DEF_SZ_BIG = 50; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  | 	/** @var int Avatar Maximum Size Small */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  | 	const AV_MAX_SZ_SML = 99; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  | 	/** @var int Avatar Maximum Size Big */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  | 	const AV_MAX_SZ_BIG = 999; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  | 	/** @var \phpbb\config\config */ | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  | 	protected $config; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  | 	/** @var \phpbb\language\language */ | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  | 	protected $language; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  | 	/** @var string phpBB root path */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  | 	protected $phpbb_root_path; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  | 	 * Constructor for Member Avatar & Status Core Avatar Class. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  | 	 * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  | 	 * @param \phpbb\config\config			$config				phpBB config | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  | 	 * @param \phpbb\language\language		$language			phpBB language | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  | 	 * @param string						$phpbb_root_path	phpBB root path | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  | 	 * @access public | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  | 	 */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  | 	public function __construct(config $config, language $language, $phpbb_root_path) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  | 		$this->config			= $config; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  | 		$this->language			= $language; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  | 		$this->phpbb_root_path	= $phpbb_root_path; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  | 	 * MAS Get No Avatar IMG | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  | 	 * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 |  |  | 	 * @param void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 |  |  | 	 * @return string String with No Avatar IMG | 
            
                                                                                                            
                            
            
                                    
            
            
                | 73 |  |  | 	 * @access public | 
            
                                                                                                            
                            
            
                                    
            
            
                | 74 |  |  | 	 */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 75 |  |  | 	public function mas_get_no_avatar_img() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 76 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 77 |  |  | 		$avatar_row = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 78 |  |  | 				'avatar'		=> append_sid($this->phpbb_root_path . 'ext/dark1/memberavatarstatus/image/avatar.png'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 79 |  |  | 				'avatar_type'	=> AVATAR_REMOTE, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 80 |  |  | 				'avatar_width'	=> self::NO_AVATAR_SIZE, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 81 |  |  | 				'avatar_height'	=> self::NO_AVATAR_SIZE, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 82 |  |  | 			); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 83 |  |  | 		return str_replace( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 84 |  |  | 			'" />', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 85 |  |  | 			'" title="' . $this->language->lang('MAS_NO_AVATAR_TEXT') . '" />', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 86 |  |  | 			phpbb_get_user_avatar($avatar_row, $this->language->lang('MAS_NO_AVATAR_TEXT'), true) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 87 |  |  | 		); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 88 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 89 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 90 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 91 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 92 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 93 |  |  | 	 * MAS Get Config Avatar | 
            
                                                                                                            
                            
            
                                    
            
            
                | 94 |  |  | 	 * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 95 |  |  | 	 * @param string $config_key takes Config Key String | 
            
                                                                                                            
                            
            
                                    
            
            
                | 96 |  |  | 	 * @return bool Bool with Avatar Enable | 
            
                                                                                                            
                            
            
                                    
            
            
                | 97 |  |  | 	 * @access public | 
            
                                                                                                            
                            
            
                                    
            
            
                | 98 |  |  | 	 */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 99 |  |  | 	public function mas_get_config_avatar($config_key) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 100 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 101 |  |  | 		// Check if Avatar is Enabled. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 102 |  |  | 		return (bool) ($this->config['allow_avatar'] && $this->config['dark1_mas_avatar'] && $this->config[$config_key]); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 103 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 104 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 105 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 106 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 107 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 108 |  |  | 	 * MAS Get Avatar SQL Query | 
            
                                                                                                            
                            
            
                                    
            
            
                | 109 |  |  | 	 * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 110 |  |  | 	 * @param array $sql_ary takes SQL Array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 111 |  |  | 	 * @param string $config_key takes Config Key String | 
            
                                                                                                            
                            
            
                                    
            
            
                | 112 |  |  | 	 * @param string $sql_uid Specifies User ID to be Matched with. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 113 |  |  | 	 * @param string $sql_obj Specifies SQL Object | 
            
                                                                                                            
                            
            
                                    
            
            
                | 114 |  |  | 	 * @param string $prefix Specifies the prefix to be Set in SQL Select | 
            
                                                                                                            
                            
            
                                    
            
            
                | 115 |  |  | 	 * @param string $lj_on_ex Specifies the Left Join On Extra SQL Query | 
            
                                                                                                            
                            
            
                                    
            
            
                | 116 |  |  | 	 * @return array Array of data | 
            
                                                                                                            
                            
            
                                    
            
            
                | 117 |  |  | 	 * @access public | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 118 |  |  | 	 */ | 
            
                                                                        
                            
            
                                    
            
            
                | 119 |  |  | 	public function mas_avatar_sql_query($sql_ary, $config_key, $sql_uid, $sql_obj, $prefix, $lj_on_ex) | 
            
                                                                        
                            
            
                                    
            
            
                | 120 |  |  | 	{ | 
            
                                                                        
                            
            
                                    
            
            
                | 121 |  |  | 		$config_key .= '_av'; | 
            
                                                                        
                            
            
                                    
            
            
                | 122 |  |  | 		$prefix .= ($prefix != '') ? '_' : ''; | 
            
                                                                        
                            
            
                                    
            
            
                | 123 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 124 |  |  | 		if ($this->mas_get_config_avatar($config_key)) | 
            
                                                                        
                            
            
                                    
            
            
                | 125 |  |  | 		{ | 
            
                                                                        
                            
            
                                    
            
            
                | 126 |  |  | 			$sql_ary['SELECT'] .= ', ' . $sql_obj . '.user_avatar as ' . $prefix . 'avatar, ' . $sql_obj . '.user_avatar_type as ' . $prefix . 'avatar_type, ' . $sql_obj . '.user_avatar_width as ' . $prefix . 'avatar_width, ' . $sql_obj . '.user_avatar_height as ' . $prefix . 'avatar_height'; | 
            
                                                                        
                            
            
                                    
            
            
                | 127 |  |  | 			$sql_ary['LEFT_JOIN'][] = array( | 
            
                                                                        
                            
            
                                    
            
            
                | 128 |  |  | 					'FROM'	=> array(USERS_TABLE => $sql_obj), | 
            
                                                                        
                            
            
                                    
            
            
                | 129 |  |  | 					'ON'	=> $sql_uid . ' = ' . $sql_obj . '.user_id' . $lj_on_ex, | 
            
                                                                        
                            
            
                                    
            
            
                | 130 |  |  | 				); | 
            
                                                                        
                            
            
                                    
            
            
                | 131 |  |  | 		} | 
            
                                                                        
                            
            
                                    
            
            
                | 132 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 133 |  |  | 		return $sql_ary; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 134 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 135 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 136 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 137 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 138 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 139 |  |  | 	 * MAS Get Avatar Size | 
            
                                                                                                            
                            
            
                                    
            
            
                | 140 |  |  | 	 * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 141 |  |  | 	 * @param int $av_sz takes Avatar Size | 
            
                                                                                                            
                            
            
                                    
            
            
                | 142 |  |  | 	 * @param int $av_default_sz Specifies Default Size in px | 
            
                                                                                                            
                            
            
                                    
            
            
                | 143 |  |  | 	 * @param int $av_max_sz Specifies Avatar MAX Size in px | 
            
                                                                                                            
                            
            
                                    
            
            
                | 144 |  |  | 	 * @return int Integer with Avatar Size in px | 
            
                                                                                                            
                            
            
                                    
            
            
                | 145 |  |  | 	 * @access public | 
            
                                                                                                            
                            
            
                                    
            
            
                | 146 |  |  | 	 */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 147 |  |  | 	public function mas_get_avatar_size($av_sz, $av_default_sz = self::AV_DEF_SZ_SML, $av_max_sz = self::AV_MAX_SZ_SML) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 148 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 149 |  |  | 		// $av_sz , Need to set this between self::AV_MIN_SZ to $av_max_sz Only , Default is $av_default_sz. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 150 |  |  | 		if ($av_sz < self::AV_MIN_SZ || $av_sz > $av_max_sz) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 151 |  |  | 		{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 152 |  |  | 			$av_sz = $av_default_sz; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 153 |  |  | 		} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 154 |  |  | 		return (int) $av_sz; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 155 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 156 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 157 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 158 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 159 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 160 |  |  | 	 * MAS Get Config Avatar Size | 
            
                                                                                                            
                            
            
                                    
            
            
                | 161 |  |  | 	 * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 162 |  |  | 	 * @param string $config_key takes Config Key String | 
            
                                                                                                            
                            
            
                                    
            
            
                | 163 |  |  | 	 * @param int $av_default_sz Specifies Default Size in px | 
            
                                                                                                            
                            
            
                                    
            
            
                | 164 |  |  | 	 * @param int $av_max_sz Specifies Avatar MAX Size in px | 
            
                                                                                                            
                            
            
                                    
            
            
                | 165 |  |  | 	 * @return int Integer with Avatar Size in px | 
            
                                                                                                            
                            
            
                                    
            
            
                | 166 |  |  | 	 * @access public | 
            
                                                                                                            
                            
            
                                    
            
            
                | 167 |  |  | 	 */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 168 |  |  | 	public function mas_get_config_avatar_size($config_key, $av_default_sz = self::AV_DEF_SZ_SML, $av_max_sz = self::AV_MAX_SZ_SML) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 169 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 170 |  |  | 		// config -> dark1_mas_XX_sz , Need to get this between self::AV_MIN_SZ to $av_max_sz Only , Default is $av_default_sz. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 171 |  |  | 		$av_sz = $this->mas_get_avatar_size((int) $this->config[$config_key], $av_default_sz, $av_max_sz); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 172 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 173 |  |  | 		// Check if correction is required then set it. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 174 |  |  | 		if ($av_sz != $this->config[$config_key]) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 175 |  |  | 		{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 176 |  |  | 			$this->config->set($config_key, $av_sz); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 177 |  |  | 		} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 178 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 179 |  |  | 		return (int) $this->config[$config_key]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 180 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 181 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 182 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 183 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 184 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 185 |  |  | 	 * MAS Get Avatar | 
            
                                                                                                            
                            
            
                                    
            
            
                | 186 |  |  | 	 * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 187 |  |  | 	 * @param string $config_key takes Config Key String | 
            
                                                                                                            
                            
            
                                    
            
            
                | 188 |  |  | 	 * @param string $prefix Specifies the prefix to be Searched in the $row | 
            
                                                                                                            
                            
            
                                    
            
            
                | 189 |  |  | 	 * @param array $row is array of data | 
            
                                                                                                            
                            
            
                                    
            
            
                | 190 |  |  | 	 * @return string String with Avatar Data | 
            
                                                                                                            
                            
            
                                    
            
            
                | 191 |  |  | 	 * @access public | 
            
                                                                                                            
                            
            
                                    
            
            
                | 192 |  |  | 	 */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 193 |  |  | 	public function mas_get_avatar($config_key, $prefix, $row) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 194 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 195 |  |  | 		$avatar = ''; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 196 |  |  | 		$config_key .= '_av'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 197 |  |  | 		$prefix .= ($prefix != '') ? '_' : ''; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 198 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 199 |  |  | 		if ($this->mas_get_config_avatar($config_key)) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 200 |  |  | 		{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 201 |  |  | 			// $avatar_row | 
            
                                                                                                            
                            
            
                                    
            
            
                | 202 |  |  | 			$avatar_row = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 203 |  |  | 					'avatar'		=> $row[$prefix . 'avatar'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 204 |  |  | 					'avatar_type'	=> $row[$prefix . 'avatar_type'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 205 |  |  | 					'avatar_width'	=> $row[$prefix . 'avatar_width'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 206 |  |  | 					'avatar_height'	=> $row[$prefix . 'avatar_height'], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 207 |  |  | 				); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 208 |  |  | 			$avatar = phpbb_get_user_avatar($avatar_row); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 209 |  |  | 		} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 210 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 211 |  |  | 		return $avatar; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 212 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 213 |  |  |  | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 214 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 215 |  |  |  |