From 866a6930e141ae2c56acb0aade801440f19180c5 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 6 Oct 2025 14:12:12 +0500 Subject: feat: description tag + robots tag --- public/catalogue.php | 2 ++ public/index.php | 19 ++++++++++++++++--- public/mod.php | 2 ++ public/report.php | 2 ++ public/stats.php | 2 ++ public/uploaders.php | 2 ++ 6 files changed, 26 insertions(+), 3 deletions(-) (limited to 'public') diff --git a/public/catalogue.php b/public/catalogue.php index a580996..407eedb 100644 --- a/public/catalogue.php +++ b/public/catalogue.php @@ -63,10 +63,12 @@ unset($f); File Catalogue (Page <?= $page + 1 ?>/<?= $max_pages ?>) - <?= INSTANCE_NAME ?> + + diff --git a/public/index.php b/public/index.php index 7aeff6e..dd92e66 100644 --- a/public/index.php +++ b/public/index.php @@ -159,6 +159,17 @@ if (FILE_CATALOG_FANCY_VIEW && $file_id) { } $file['resolution'] = implode(' ', $file['resolution']) ?: null; + + $file['html_description'] = $file['mime'] . ' - ' . $file['extension']; + if (isset($file['views'])) { + $file['html_description'] .= " - {$file['views']} views"; + } + if (isset($file['uploaded_at'])) { + $file['html_description'] .= ' - Uploaded ' . format_timestamp(strtotime($file['uploaded_at'])) . ' ago'; + } + if (isset($file['resolution'])) { + $file['html_description'] .= " - {$file['resolution']}"; + } } $tos_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/TOS.txt'); @@ -170,17 +181,19 @@ $privacy_exists = is_file($_SERVER['DOCUMENT_ROOT'] . '/static/PRIVACY.txt'); <?= $file['name'] ?> - <?= INSTANCE_NAME ?> - + " /> + <?= INSTANCE_NAME ?> + + diff --git a/public/mod.php b/public/mod.php index a1d91b8..25d4754 100644 --- a/public/mod.php +++ b/public/mod.php @@ -45,11 +45,13 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { Moderation - <?= INSTANCE_NAME ?> + + diff --git a/public/report.php b/public/report.php index 9ede7b4..c25c0b7 100644 --- a/public/report.php +++ b/public/report.php @@ -116,11 +116,13 @@ if (!is_file(FILE_UPLOAD_DIRECTORY . "/{$file_id}")) { Report - <?= INSTANCE_NAME ?> + + diff --git a/public/stats.php b/public/stats.php index 56a2acd..cd1b571 100644 --- a/public/stats.php +++ b/public/stats.php @@ -86,11 +86,13 @@ $file_stats['approx_filesize'] = format_filesize($file_stats['approx_filesize']) Statistics - <?= INSTANCE_NAME ?> + + diff --git a/public/uploaders.php b/public/uploaders.php index e60195b..95652a4 100644 --- a/public/uploaders.php +++ b/public/uploaders.php @@ -21,11 +21,13 @@ foreach (FILE_ACCEPTED_MIME_TYPES as $k => $v) { Uploaders - <?= INSTANCE_NAME ?> + + -- cgit v1.2.3