From a47ac64e5f5ad1c01e6ecbb64a5e1c80ab2c90b2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 16 Mar 2012 10:30:28 +0100 Subject: [PATCH] [feature/events] Adding ledge viewtopic_page_header Used by phpBB Gallery PHPBB3-9550 --- phpBB/viewtopic.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 4f95d40e73..148446490e 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1734,8 +1734,15 @@ if (!request_var('t', 0) && !empty($topic_id)) $request->overwrite('t', $topic_id); } +$page_title = $topic_data['topic_title'] . ($start ? ' - ' . sprintf($user->lang['PAGE_TITLE_NUMBER'], floor($start / $config['posts_per_page']) + 1) : ''); + +$vars = array('page_title', 'topic_data', 'forum_id', 'start'); +$event = new phpbb_event_data(compact($vars)); +$phpbb_dispatcher->dispatch('core.viewtopic_page_header', $event); +extract($event->get_data_filtered($vars)); + // Output the page -page_header($topic_data['topic_title'] . ($start ? ' - ' . sprintf($user->lang['PAGE_TITLE_NUMBER'], floor($start / $config['posts_per_page']) + 1) : ''), true, $forum_id); +page_header($page_title, true, $forum_id); $template->set_filenames(array( 'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')