Line 52 | Line 52 |
---|
public function prepare_form($request, $template, $user, $row, &$error) { $template->assign_vars(array(
|
public function prepare_form($request, $template, $user, $row, &$error) { $template->assign_vars(array(
|
'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', 0), 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', 0),
| 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', ''), 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', ''),
|
'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '', ));
| 'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '', ));
|
Line 172 | Line 172 |
---|
*/ protected function get_gravatar_url($row) {
|
*/ protected function get_gravatar_url($row) {
|
| global $phpbb_dispatcher;
|
$url = self::GRAVATAR_URL; $url .= md5(strtolower(trim($row['avatar'])));
| $url = self::GRAVATAR_URL; $url .= md5(strtolower(trim($row['avatar'])));
|
Line 179 | Line 181 |
---|
{ $url .= '?s=' . max($row['avatar_width'], $row['avatar_height']); }
|
{ $url .= '?s=' . max($row['avatar_width'], $row['avatar_height']); }
|
| /** * Modify gravatar url * * @event core.get_gravatar_url_after * @var string row User data or group data * @var string url Gravatar URL * @since 3.1.7-RC1 */ $vars = array('row', 'url'); extract($phpbb_dispatcher->trigger_event('core.get_gravatar_url_after', compact($vars)));
|
return $url; }
| return $url; }
|