mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +00:00
Add support for 36-char UUIDs in avatar fetch
This commit is contained in:
parent
85b1d375a2
commit
9de638a920
@ -245,8 +245,9 @@ class Page {
|
|||||||
$avatar_source = $this->settings->avatar_source_offline_mode;
|
$avatar_source = $this->settings->avatar_source_offline_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$uuidDashed = $uuid;
|
||||||
$uuid = $this->uuid_undashify($uuid);
|
$uuid = $this->uuid_undashify($uuid);
|
||||||
$src = str_replace(array('{uuid}', '{name}'), array($uuid, $name), $avatar_source);
|
$src = str_replace(array('{uuid}','{uuidDashed}', '{name}'), array($uuid, $uuidDashed, $name), $avatar_source);
|
||||||
if (in_array($name, $this->settings->console_aliases) || $name === $this->settings->console_name) {
|
if (in_array($name, $this->settings->console_aliases) || $name === $this->settings->console_name) {
|
||||||
$src = $this->resource($this->settings->console_image);
|
$src = $this->resource($this->settings->console_image);
|
||||||
$name = $this->settings->console_name;
|
$name = $this->settings->console_name;
|
||||||
|
@ -66,6 +66,10 @@ class Settings {
|
|||||||
$this->console_image = "inc/img/console.png";
|
$this->console_image = "inc/img/console.png";
|
||||||
|
|
||||||
// Avatar images for all players will be fetched from this URL.
|
// Avatar images for all players will be fetched from this URL.
|
||||||
|
// Supported variables:
|
||||||
|
// {uuid} - player's 32 character UUID. Example: "dc1be393064047b49bad5b11482e44e6"
|
||||||
|
// {uuidDashed} - player's 36 character UUID. Example: "dc1be393-0640-47b4-9bad-5b11482e44e6"
|
||||||
|
// {name} - player name.
|
||||||
// Examples:
|
// Examples:
|
||||||
// 'https://cravatar.eu/avatar/{uuid}/25'
|
// 'https://cravatar.eu/avatar/{uuid}/25'
|
||||||
// 'https://crafatar.com/avatars/{uuid}?size=25'
|
// 'https://crafatar.com/avatars/{uuid}?size=25'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user