From b8c047616f597f3282dad0fd7d94a9a35886b467 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 31 May 2025 09:39:31 +0300 Subject: [PATCH] Updated --- index.php | 3 +++ library/includes/page_header.php | 2 +- viewtopic.php | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index bc96573ee..2c752341c 100644 --- a/index.php +++ b/index.php @@ -45,6 +45,9 @@ if ($bb_cfg['show_network_news']) { // Init userdata $user->session_start(); +// Set meta description +$page_cfg['meta_description'] = $bb_cfg['site_desc']; + // Init main vars $viewcat = isset($_GET[POST_CAT_URL]) ? (int)$_GET[POST_CAT_URL] : 0; $lastvisit = IS_GUEST ? TIMENOW : $userdata['user_lastvisit']; diff --git a/library/includes/page_header.php b/library/includes/page_header.php index a008c2ac2..f2f22581b 100644 --- a/library/includes/page_header.php +++ b/library/includes/page_header.php @@ -123,7 +123,7 @@ $template->assign_vars([ 'USE_TABLESORTER' => !empty($page_cfg['use_tablesorter']), 'ALLOW_ROBOTS' => !$bb_cfg['board_disable'] && (!isset($page_cfg['allow_robots']) || $page_cfg['allow_robots'] === true), - 'META_DESCRIPTION' => $page_cfg['meta_description'] ?? $bb_cfg['site_desc'], + 'META_DESCRIPTION' => $page_cfg['meta_description'] ?? '', 'SITENAME' => $bb_cfg['sitename'], 'U_INDEX' => BB_ROOT . 'index.php', diff --git a/viewtopic.php b/viewtopic.php index 01e2de2e5..90a2a13f6 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -116,6 +116,9 @@ $topic_attachment = isset($t_data['topic_attachment']) ? (int)$t_data['topic_att // Allow robots indexing $page_cfg['allow_robots'] = (bool)$t_data['topic_allow_robots']; +// Set meta description +$page_cfg['meta_description'] = ''; + if ($t_data['allow_porno_topic'] && bf($userdata['user_opt'], 'user_opt', 'user_porn_forums')) { bb_die($lang['ERROR_PORNO_FORUM']); }