From 6c1db78204c33abb1dc2b047f270814955ee5dcd Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 11 Aug 2024 14:47:49 +0700 Subject: [PATCH] =?UTF-8?q?Added=20robots=20meta-tag=20support=20?= =?UTF-8?q?=F0=9F=A4=96=20(#1587)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added robots meta-tag support 🤖 * Update CHANGELOG.md * Update page_header.php --- CHANGELOG.md | 1 + library/includes/page_header.php | 1 + styles/templates/default/page_header.tpl | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 209267f27..fc9b14fb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Release 2.4.5 🦕 ([belomaxorka](https://github.com/belomaxorka)) - [CLI] TorrentPier installer ☕️ [\#1576](https://github.com/torrentpier/torrentpier/pull/1576), [\#1582](https://github.com/torrentpier/torrentpier/pull/1582), [\#1585](https://github.com/torrentpier/torrentpier/pull/1585) ([belomaxorka](https://github.com/belomaxorka)) - Added some new HTML meta-tags [\#1562](https://github.com/torrentpier/torrentpier/pull/1562) ([belomaxorka](https://github.com/belomaxorka)) +- Added robots meta-tag support 🤖 [\#1587](https://github.com/torrentpier/torrentpier/pull/1587) ([belomaxorka](https://github.com/belomaxorka)) - Added showing releaser stats in profile [\#1568](https://github.com/torrentpier/torrentpier/pull/1568) ([belomaxorka](https://github.com/belomaxorka)) - Improved `filelist.php` [\#1586](https://github.com/torrentpier/torrentpier/pull/1586) ([belomaxorka](https://github.com/belomaxorka)) - Demo mode: Save user language in cookies [\#1584](https://github.com/torrentpier/torrentpier/pull/1584) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/library/includes/page_header.php b/library/includes/page_header.php index 0429f9389..d65d5c97e 100644 --- a/library/includes/page_header.php +++ b/library/includes/page_header.php @@ -122,6 +122,7 @@ $template->assign_vars([ 'USER_OPTIONS_JS' => IS_GUEST ? '{}' : json_encode($user->opt_js, JSON_THROW_ON_ERROR), 'USE_TABLESORTER' => !empty($page_cfg['use_tablesorter']), + 'ALLOW_ROBOTS' => !$bb_cfg['board_disable'] && (!isset($page_cfg['allow_robots']) || $page_cfg['allow_robots'] === true), 'SITENAME' => $bb_cfg['sitename'], 'U_INDEX' => BB_ROOT . 'index.php', diff --git a/styles/templates/default/page_header.tpl b/styles/templates/default/page_header.tpl index f96d8a5e4..6cd69b151 100644 --- a/styles/templates/default/page_header.tpl +++ b/styles/templates/default/page_header.tpl @@ -14,6 +14,11 @@ + + + + +