mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge pull request #3925 from Senky/ticket/14191
[ticket/14191] Add core.get_gravatar_url_after event * Senky/ticket/14191: [ticket/14191] Add core.get_gravatar_url_after event
This commit is contained in:
commit
65b13938db
1 changed files with 13 additions and 0 deletions
|
@ -172,6 +172,8 @@ class gravatar extends \phpbb\avatar\driver\driver
|
||||||
*/
|
*/
|
||||||
protected function get_gravatar_url($row)
|
protected function get_gravatar_url($row)
|
||||||
{
|
{
|
||||||
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
$url = self::GRAVATAR_URL;
|
$url = self::GRAVATAR_URL;
|
||||||
$url .= md5(strtolower(trim($row['avatar'])));
|
$url .= md5(strtolower(trim($row['avatar'])));
|
||||||
|
|
||||||
|
@ -180,6 +182,17 @@ class gravatar extends \phpbb\avatar\driver\driver
|
||||||
$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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue