diff --git a/inc/page.php b/inc/page.php index 0f0a1db..99ba862 100644 --- a/inc/page.php +++ b/inc/page.php @@ -245,8 +245,9 @@ class Page { $avatar_source = $this->settings->avatar_source_offline_mode; } + $uuidDashed = $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) { $src = $this->resource($this->settings->console_image); $name = $this->settings->console_name; diff --git a/inc/settings.php b/inc/settings.php index fdf9995..e90860b 100644 --- a/inc/settings.php +++ b/inc/settings.php @@ -66,6 +66,10 @@ class Settings { $this->console_image = "inc/img/console.png"; // 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: // 'https://cravatar.eu/avatar/{uuid}/25' // 'https://crafatar.com/avatars/{uuid}?size=25'