From 64f0533dc1779e7cca5f2678f7ae560df8d922bb Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 3 May 2025 01:39:13 +0500 Subject: feat: config sample and more config options --- public/emotes/index.php | 62 +++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 30 deletions(-) (limited to 'public/emotes/index.php') diff --git a/public/emotes/index.php b/public/emotes/index.php index 2102aba..3c165be 100644 --- a/public/emotes/index.php +++ b/public/emotes/index.php @@ -154,8 +154,8 @@ if (CLIENT_REQUIRES_JSON) { <?php - echo empty($emotes) ? "Emote " . $emote->get_code() : "Emotes" - ?> - alright.party + echo (empty($emotes) ? "Emote " . $emote->get_code() : "Emotes") . ' - ' . INSTANCE_NAME + ?> @@ -309,33 +309,34 @@ if (CLIENT_REQUIRES_JSON) { echo ' UTC">about ' . format_timestamp(time() - $emote->get_created_at()) . " ago"; ?> - - Rating - get_rating()["total"] < 10) { - echo 'Not rated (' . $emote->get_rating()["total"] . ')'; - } else { + + + Rating + get_rating()["total"] < 10) { + echo 'Not rated (' . $emote->get_rating()["total"] . ')'; + } else { - $rating = $emote->get_rating()["average"]; + $rating = $emote->get_rating()["average"]; - // TODO: make it customizable - list($rating_classname, $rating_name) = match (true) { - in_range($rating, 0.75, 1.0) => [ - "gemerald", - " + // TODO: make it customizable + list($rating_classname, $rating_name) = match (true) { + in_range($rating, 0.75, 1.0) => [ + "gemerald", + " Shiny Gemerald! " - ], - in_range($rating, 0.25, 0.75) => ["gem", " Gem "], - in_range($rating, -0.25, 0.25) => ["iron", "Iron"], - in_range($rating, -0.75, -0.25) => ["coal", " Coal "], - in_range($rating, -1.0, -0.75) => [ - "brimstone", - " + ], + in_range($rating, 0.25, 0.75) => ["gem", " Gem "], + in_range($rating, -0.25, 0.25) => ["iron", "Iron"], + in_range($rating, -0.75, -0.25) => ["coal", " Coal "], + in_range($rating, -1.0, -0.75) => [ + "brimstone", + " @@ -344,16 +345,17 @@ if (CLIENT_REQUIRES_JSON) { " - ] - }; + ] + }; - echo ''; - echo "$rating_name"; - echo ' (' . $emote->get_rating()["total"] . ')'; - echo ''; - } - ?> - + echo ''; + echo "$rating_name"; + echo ' (' . $emote->get_rating()["total"] . ')'; + echo ''; + } + ?> + + Visibility