summaryrefslogtreecommitdiff
path: root/public/system/emotes/index.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-05-11 16:52:46 +0500
committerilotterytea <iltsu@alright.party>2025-05-11 16:56:01 +0500
commitf2690a42235297c357bcd8abbf6e194db7b7bd57 (patch)
tree1b0a221cd89903ed901b1d28047a493fa4a1317c /public/system/emotes/index.php
parent7d0b7ed296d35025e04e19dc2604c8feca72383e (diff)
feat: store original uploads
Diffstat (limited to 'public/system/emotes/index.php')
-rw-r--r--public/system/emotes/index.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/public/system/emotes/index.php b/public/system/emotes/index.php
index 3fc0b14..79dfc28 100644
--- a/public/system/emotes/index.php
+++ b/public/system/emotes/index.php
@@ -101,7 +101,21 @@ if (isset($_GET["id"])) {
<section class="content">
<!-- Emote showcase -->
<section class="box">
- <div class="box navtab">Emote - <?php echo $emote["code"] ?></div>
+ <div class="box navtab row">
+ <?php
+ echo "Emote - " . $emote["code"];
+ echo '<div class="row small-gap" style="margin-left:auto">';
+
+ $original_path = "/static/userdata/emotes/" . $emote["id"];
+ $files = glob($_SERVER["DOCUMENT_ROOT"] . $original_path . "/original.*");
+
+ if (!empty($files)) {
+ $filename = basename($files[0]);
+ echo "<a href='$original_path/$filename' target='_BLANK'><img src='/static/img/icons/emotes/emote.png' alt='[Show original]' title='Show original' /></a>";
+ }
+ echo '</div>';
+ ?>
+ </div>
<div class="box content">
<div class="emote-showcase">
<img src="/static/userdata/emotes/<?php echo $emote["id"] ?>/1x.webp"