diff --git a/phpBB/page_header.php b/phpBB/page_header.php index e1b0dc19a0..8cb4282362 100644 --- a/phpBB/page_header.php +++ b/phpBB/page_header.php @@ -34,6 +34,7 @@ else { $logged_in_status = "You are not logged in."; } + $template->set_var(array("SITENAME" => $sitename, "PHPEX" => $phpEx, "PAGE_TITLE" => $page_title, @@ -44,29 +45,38 @@ $template->pparse("output", "overall_header"); // Do a switch on page type, this way we only load the templates that we need at the time switch($pagetype) { - case 'index': - $template->set_file(array("header" => "index_header.tpl", - "body" => "index_body.tpl", - "footer" => "index_footer.tpl")); - - $template->set_var(array("TOTAL_POSTS" => $total_posts, - "TOTAL_USERS" => $total_users, - "NEWEST_USER" => $newest_user, - "NEWEST_UID" => $newest_uid, - "USERS_BROWSING" => $users_browsing)); - - $template->pparse("output", "header"); - - break; - case 'viewforum': - $template->set_file(array("header" => "viewforum_header.tpl", - "body" => "viewforum_body.tpl", - "footer" => "viewforum_footer.tpl")); - $template->set_var(array("FORUM_ID" => $forum_id, - "FORUM_NAME" => $forum_name, - "MODERATORS" => $forum_moderators)); - $template->pparse("output", "header"); - break; + case 'index': + $template->set_file(array("header" => "index_header.tpl", + "body" => "index_body.tpl", + "footer" => "index_footer.tpl")); + + $template->set_var(array("TOTAL_POSTS" => $total_posts, + "TOTAL_USERS" => $total_users, + "NEWEST_USER" => $newest_user, + "NEWEST_UID" => $newest_uid, + "USERS_BROWSING" => $users_browsing)); + + $template->pparse("output", "header"); + break; + + case 'viewforum': + $template->set_file(array("header" => "viewforum_header.tpl", + "body" => "viewforum_body.tpl", + "jumpbox" => "jumpbox.tpl", + "footer" => "viewforum_footer.tpl")); + + $jumpbox = make_jumpbox($db); + $template->set_var(array("JUMPBOX_LIST" => $jumpbox, + "JUMPBOX_ACTION" => "viewforum.".$phpEx, + "SELECT_NAME" => "forum_id")); + $template->parse("JUMPBOX","jumpbox"); + + $template->set_var(array("FORUM_ID" => $forum_id, + "FORUM_NAME" => $forum_name, + "MODERATORS" => $forum_moderators)); + + $template->pparse("output", "header"); + break; } ?> diff --git a/phpBB/page_tail.php b/phpBB/page_tail.php index fbe7c558ac..2fa923a97e 100644 --- a/phpBB/page_tail.php +++ b/phpBB/page_tail.php @@ -25,18 +25,16 @@ // Load/parse the footer template we need based on pagetype. switch($pagetype) { - case 'index': - $template->pparse("output", "footer"); - break; - case 'viewforum': - $jumpbox = make_jumpbox($db); - $template->set_var(array("PHPEX" => $phpEx, - "FORUM_ID" => $forum_id, - "SELECT_NAME" => "forum_id", - "JUMPBOX_ACTION" => "viewforum.".$phpEx, - "JUMPBOX_LIST" => $jumpbox)); - $template->pparse("output", "footer"); - break; + case 'index': + $template->pparse("output", "footer"); + break; + + case 'viewforum': + + $template->set_var(array("PHPEX" => $phpEx, + "FORUM_ID" => $forum_id)); + $template->pparse("output", "footer"); + break; } // Show the overall footer. diff --git a/phpBB/templates/Default/jumpbox.tpl b/phpBB/templates/Default/jumpbox.tpl new file mode 100644 index 0000000000..8141ca78dd --- /dev/null +++ b/phpBB/templates/Default/jumpbox.tpl @@ -0,0 +1,5 @@ +
{JUMPBOX} |