From 737b7b992bd53bb6a76d294ad3c642b97a8f3d29 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 28 May 2023 15:21:17 +0700 Subject: [PATCH] Use define instead of tpl variable (#726) * COOKIE_MARK * Use U_INDEX * Removed BB_ROOT * ONLY_NEW_TOPICS, ONLY_NEW_POSTS --- library/includes/functions.php | 3 +-- library/includes/page_header.php | 4 ---- styles/templates/default/index.tpl | 4 ++-- styles/templates/default/page_header.tpl | 4 ++-- styles/templates/default/search_results.tpl | 2 +- styles/templates/default/usercp_topic_watch.tpl | 2 +- 6 files changed, 7 insertions(+), 12 deletions(-) diff --git a/library/includes/functions.php b/library/includes/functions.php index faebf0415..326dc7d7a 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1118,7 +1118,6 @@ function setup_style() $css_dir = 'styles/' . basename(TEMPLATES_DIR) . '/' . $tpl_dir_name . '/css/'; $template->assign_vars(array( - 'BB_ROOT' => BB_ROOT, 'SPACER' => make_url('styles/images/spacer.gif'), 'STYLESHEET' => make_url($css_dir . $stylesheet), 'EXT_LINK_NEW_WIN' => $bb_cfg['ext_link_new_win'], @@ -1126,7 +1125,7 @@ function setup_style() 'SITE_URL' => make_url('/'), )); - require TEMPLATES_DIR . '/' . $tpl_dir_name . '/tpl_config.php'; + require_once TEMPLATES_DIR . '/' . $tpl_dir_name . '/tpl_config.php'; return array('template_name' => $tpl_dir_name); } diff --git a/library/includes/page_header.php b/library/includes/page_header.php index d1f753462..af65da172 100644 --- a/library/includes/page_header.php +++ b/library/includes/page_header.php @@ -193,12 +193,8 @@ $template->assign_vars(array( 'AJAX_HTML_DIR' => AJAX_HTML_DIR, - 'ONLY_NEW_POSTS' => ONLY_NEW_POSTS, - 'ONLY_NEW_TOPICS' => ONLY_NEW_TOPICS, - // Misc 'BOT_UID' => BOT_UID, - 'COOKIE_MARK' => COOKIE_MARK, 'SID' => $userdata['session_id'], 'SID_HIDDEN' => '', diff --git a/styles/templates/default/index.tpl b/styles/templates/default/index.tpl index 9d6617e38..5eeeb465d 100644 --- a/styles/templates/default/index.tpl +++ b/styles/templates/default/index.tpl @@ -48,7 +48,7 @@
-
{L_HIDE_CAT_MESS} · {L_SHOW_ALL}
+
{L_HIDE_CAT_MESS} · {L_SHOW_ALL}
@@ -155,7 +155,7 @@ diff --git a/styles/templates/default/page_header.tpl b/styles/templates/default/page_header.tpl index d9829ad33..d472f58c9 100644 --- a/styles/templates/default/page_header.tpl +++ b/styles/templates/default/page_header.tpl @@ -390,14 +390,14 @@ $(document).ready(function() { diff --git a/styles/templates/default/search_results.tpl b/styles/templates/default/search_results.tpl index 95a9dbca0..5f09466f4 100644 --- a/styles/templates/default/search_results.tpl +++ b/styles/templates/default/search_results.tpl @@ -10,7 +10,7 @@  ·  - {L_MARK_ALL_FORUMS_READ} + {L_MARK_ALL_FORUMS_READ}
diff --git a/styles/templates/default/usercp_topic_watch.tpl b/styles/templates/default/usercp_topic_watch.tpl index 59ab0fc82..9a1f3dcc5 100644 --- a/styles/templates/default/usercp_topic_watch.tpl +++ b/styles/templates/default/usercp_topic_watch.tpl @@ -80,7 +80,7 @@ td.topic_id { cursor: pointer; } {T_INDEX} · {L_EDIT_MY_MESSAGE_LIST} · - {L_MARK_ALL_FORUMS_READ} + {L_MARK_ALL_FORUMS_READ} {PAGINATION}