From 20416f4f4d4b2262672b2ff7fe65d52cd7f46417 Mon Sep 17 00:00:00 2001 From: ruan Date: Thu, 17 Sep 2015 13:54:03 +0200 Subject: [PATCH] Add configurable option to change avatar position --- includes/page.php | 3 +++ includes/settings.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/includes/page.php b/includes/page.php index 76e347c..68aca0c 100644 --- a/includes/page.php +++ b/includes/page.php @@ -120,6 +120,9 @@ class Page { * @return string */ function get_avatar($name, $uuid, $name_under = true, $name_repl = null) { + if ($name_under) { + $name_under = $this->settings->avatar_names_below; + } if (strlen($uuid) === 36 && $uuid[14] === '3') { // Avatars cannot be associated with offline mode UUIDs (version 3) $uuid = $name; diff --git a/includes/settings.php b/includes/settings.php index 7e206cf..03f3a60 100644 --- a/includes/settings.php +++ b/includes/settings.php @@ -54,6 +54,9 @@ final class Settings { */ $this->avatar_source = 'https://cravatar.eu/avatar/$UUID/25'; + // If enabled, names will be shown below avatars instead of being shown next to them. + $this->avatar_names_below = true; + // The date format can be changed here. // https://secure.php.net/manual/en/function.date.php // Example of default: July 2, 2015, 9:19 PM