From 9825d8611fa58adcd09ccbb677a09f6bb203a26f Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Tue, 16 Jul 2013 02:48:20 -0400 Subject: [PATCH] Outputting thread subject in header/title (issue #122) --- inc/config.php | 3 +++ inc/functions.php | 5 +++-- templates/index.html | 2 +- templates/thread.html | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/inc/config.php b/inc/config.php index 83b98c2b..ed4a31f1 100644 --- a/inc/config.php +++ b/inc/config.php @@ -527,6 +527,9 @@ // Number of characters in the poster ID (maximum is 40) $config['poster_id_length'] = 5; + // Show thread subject in page title? + $config['thread_subject_in_title'] = false; + // Page footer $config['footer'][] = 'All trademarks, copyrights, comments, and images on this page are owned by and are the responsibility of their respective parties.'; diff --git a/inc/functions.php b/inc/functions.php index 67019e0a..4b0e56d8 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1537,8 +1537,9 @@ function buildThread($id, $return=false, $mod=false) { error($config['error']['nonexistant']); $body = Element('thread.html', array( - 'board'=>$board, - 'body'=>$thread->build(), + 'board' => $board, + 'thread' => $thread, + 'body' => $thread->build(), 'config' => $config, 'id' => $id, 'mod' => $mod, diff --git a/templates/index.html b/templates/index.html index 112756d1..9b25e1be 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,7 @@ {% if config.url_favicon %}{% endif %} - {{ board.url }} - {{ board.name }} + {{ board.url }} - {{ board.title|e }} {% if config.meta_keywords %}{% endif %} {% if config.default_stylesheet.1 != '' %}{% endif %} diff --git a/templates/thread.html b/templates/thread.html index 5442166f..aea8abb5 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -4,7 +4,7 @@ {% if config.url_favicon %}{% endif %} - {{ board.url }} - {{ board.name }} + {{ board.url }} - {% if config.thread_subject_in_title and thread.subject %}{{ thread.subject }}{% else %}{{ board.title|e }}{% endif %} {% if config.meta_keywords %}{% endif %} {% if config.default_stylesheet.1 != '' %}{% endif %}