PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 Add php include to overall_header Template 
Description: phpBB 2.0.x does not allow php in templates without modifications, so this little Tutorial which was copied out of a post by theFinn will show you how to use an include the right way.
Author: dhn
Date: Tue Jan 14, 2003 8:07 am
Type: HowTo
Keywords: php include template overall header variable
Category: Miscellanea
Originally posted by theFinn here:

Ok, what I would suggest is that whatever PHP file you include simply drops all its output into a variable, lets call it $include_output

Then add a template variable to page_header.php, at line 408 you'll find this:

Code:
   "NAV_LINKS" => $nav_links_html)


Change that to:

Code:
"NAV_LINKS" => $nav_links_html,
"INCLUDE_OUTPUT" => $include_output)


Now, edit overall_header.tpl and [...] use the template variable {INCLUDE_OUTPUT} to display the output from your included file.

got it? good Smile

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.