diff options
| author | ilotterytea <iltsu@alright.party> | 2025-05-15 01:44:01 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-05-15 01:44:01 +0500 |
| commit | 53a2e84af1ef1f35d835ef439260157038c70a46 (patch) | |
| tree | c1db7d2ec52960909b69a6eb4b56c2367a7f1106 /public/system/emotes | |
| parent | 29337b30b7071cff678a7be54161507f3eb278be (diff) | |
feat: tags
Diffstat (limited to 'public/system/emotes')
| -rw-r--r-- | public/system/emotes/index.php | 18 |
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 |
