summaryrefslogtreecommitdiff
path: root/public/system
diff options
context:
space:
mode:
Diffstat (limited to 'public/system')
-rw-r--r--public/system/emotes/index.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/public/system/emotes/index.php b/public/system/emotes/index.php
index 9e88d83..eaabf4d 100644
--- a/public/system/emotes/index.php
+++ b/public/system/emotes/index.php
@@ -147,6 +147,24 @@ if (isset($_GET["id"])) {
<!-- Emote information -->
<section class="box">
<table class="vertical">
+ <?php
+ $stmt = $db->prepare("SELECT t.code FROM tags t
+ INNER JOIN tag_assigns ta ON ta.emote_id = ?
+ WHERE t.id = ta.tag_id
+ ");
+ $stmt->execute([$emote["id"]]);
+
+ $tags = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ $tags = array_column($tags, "code");
+
+ if (!empty($tags)) {
+ echo '<tr><th>Tags</th><td>';
+ foreach ($tags as $tag) {
+ echo "<a href='/emotes/?q=$tag'>$tag</a> ";
+ }
+ echo '</td></tr>';
+ }
+ ?>
<tr>
<th>Uploader</th>
<td><?php