From 7cde919ef02418e424542c0e917bb49727c31972 Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Thu, 22 Feb 2001 07:53:34 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: file:///svn/phpbb/trunk@14 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/page_header.php | 21 ++++++++++++--------- phpBB/page_tail.php | 16 ++++++++++++++++ phpBB/templates/Default/overall_footer.tpl | 2 +- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/phpBB/page_header.php b/phpBB/page_header.php index a4c4b3d425..efd82721d8 100644 --- a/phpBB/page_header.php +++ b/phpBB/page_header.php @@ -22,26 +22,29 @@ * ***************************************************************************/ +// Parse and show the overall header. +$template->set_file(array("overall_header" => "overall_header.tpl", + "overall_footer" => "overall_footer.tpl")); +$template->set_var(array("SITENAME" => $sitename, + "PAGE_TITLE" => $page_title, + "META_INFO" => $meta_tags)); +$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': $page_title = "Forum Index"; - $template->set_file(array("overall_header" => "overall_header.tpl", - "header" => "index_header.tpl", + $template->set_file(array("header" => "index_header.tpl", "body" => "index_body.tpl", - "footer" => "index_footer.tpl", - "overall_footer" => "overall_footer.tpl")); - $template->set_var(array("SITENAME" => $sitename, - "PAGE_TITLE" => $page_title, - "META_INFO" => $meta_tags, - "TOTAL_POSTS" => $total_posts, + "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", "overall_header"); $template->pparse("output", "header"); break; diff --git a/phpBB/page_tail.php b/phpBB/page_tail.php index c5bbded564..6384f8fb76 100644 --- a/phpBB/page_tail.php +++ b/phpBB/page_tail.php @@ -22,6 +22,22 @@ * ***************************************************************************/ +// Load/parse the footer template we need based on pagetype. +switch($pagetype) +{ + case 'index': + $template->pparse("output", "footer"); + break; +} + +// Show the overall footer. +if($user_logged_in) +{ + $admin_link = "Administration Panel"; +} +$template->set_var(array("PHPBB_VERSION" => "2.0-alpha", + "ADMIN_LINK" => $admin_link)); +$template->pparse("output", "overall_footer"); ?> diff --git a/phpBB/templates/Default/overall_footer.tpl b/phpBB/templates/Default/overall_footer.tpl index d1795474a2..28ca10c34d 100644 --- a/phpBB/templates/Default/overall_footer.tpl +++ b/phpBB/templates/Default/overall_footer.tpl @@ -2,7 +2,7 @@
{ADMIN_LINK}
- Powered by: phpBB Version 1.9
+ Powered by: phpBB Version {PHPBB_VERSION}
Copyright © 2001 The phpBB Group