Bringing website header and footer into the phpbb forum

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
summitmn
Registered User
Posts: 45
Joined: Wed Sep 22, 2004 8:02 pm

Bringing website header and footer into the phpbb forum

Post by summitmn »

I noticed some others have asked this question but our site was built using smarty templates and css.

I would like to add our site header and footer to the phpbb forum.
http://www.summit.org
and
jat.summti.org

Any advice on how to go about doing this? Which tpl and php files do I need to change?
beatme101
Registered User
Posts: 2866
Joined: Sat Jan 01, 2005 6:20 am
Location: The country cold comes from; Canada.
Contact:

Re: Bringing website header and footer into the phpbb forum

Post by beatme101 »

summitmn wrote: I noticed some others have asked this question but our site was built using smarty templates and css.

I would like to add our site header and footer to the phpbb forum.
http://www.summit.org
and
jat.summti.org

Any advice on how to go about doing this? Which tpl and php files do I need to change?


overall_header.tpl and overall_footer.tpl.
summitmn
Registered User
Posts: 45
Joined: Wed Sep 22, 2004 8:02 pm

Post by summitmn »

thank you. i have added the php code and called the website header but nothing shows up. even the code is on the "view source" option!

http://jat.summit.org
Thomas_Williams
Registered User
Posts: 37
Joined: Thu Aug 17, 2006 8:03 pm

Post by Thomas_Williams »

PHP is processed on the server, so of course you wouldn't see it in the source, you will only see the outcome.

In most shared environments, PHP will only work in files that have a .php extension. It will not work with files that have a .tpl extension.
Thomas Williams
My Weblog
beatme101
Registered User
Posts: 2866
Joined: Sat Jan 01, 2005 6:20 am
Location: The country cold comes from; Canada.
Contact:

Post by beatme101 »

Thomas_Williams wrote: PHP is processed on the server, so of course you wouldn't see it in the source, you will only see the outcome.

In most shared environments, PHP will only work in files that have a .php extension. It will not work with files that have a .tpl extension.


No, he is saying he DOES see his php code in the source.

Since phpbb is handling tpl files a special way, the php code would not work in the template files even if they had .php extensions.


You cannot use php in template files without a special MOD for phpbb called Extreme Styles MOD.
summitmn
Registered User
Posts: 45
Joined: Wed Sep 22, 2004 8:02 pm

Post by summitmn »

I added the following calling to the overall_header.tpl

<!--{* Smarty *}-->

<!--{ include file="/global/header.tpl" }-->
<!--{ include file="/global/header_nav.tpl" }-->

This code shows up when I do a "reveal code" from the forum homepage. I only add that to say that the code has been added to the tpl file and uploaded. However, the header is not called, i.e. the forum doesnt look any different and no error messages show up either.
summitmn
Registered User
Posts: 45
Joined: Wed Sep 22, 2004 8:02 pm

Post by summitmn »

I also added the following code to the page_header.php file:

ini_set('include_path', get_include_path().':/home/www/summit/migration/summit.org/src/php/Smarty/:/home/www/summit/migration/summit.org/src/php/org/summit');

// The include_path is set in the file ".htaccess" found in the web root
require_once('includes/SummitSmarty.php');
require_once('includes/global.php');

$smarty = new SummitSmarty;

$smarty->assign('title','Summit Ministries: Home');

$smarty->assign('sectionCSS', 'communityScreen.css');

This likewise created no errors but neither do it change the look of the forum. I do understand that this text will not show up with the "reveal code" option. I really shouldnt have said anything about that before...worthless info on my part.

But that being said, what else do I need to do? I am not that advanced at programing, but I do know that whenever I created a new page for our website I have to add the above code to the appropiate php file and the previous posting's code to any tpl file. However, it did not work for the forum. Any ideas?
beatme101
Registered User
Posts: 2866
Joined: Sat Jan 01, 2005 6:20 am
Location: The country cold comes from; Canada.
Contact:

Post by beatme101 »

beatme101 wrote: You cannot use php in template files without a special MOD for phpbb called Extreme Styles MOD.
summitmn
Registered User
Posts: 45
Joined: Wed Sep 22, 2004 8:02 pm

Post by summitmn »

I may be completely misunderstanding you, but Im only trying to call a global tpl file in the overall_header.tpl file, not php.
summitmn
Registered User
Posts: 45
Joined: Wed Sep 22, 2004 8:02 pm

Post by summitmn »

Does anyone have any other suggestions?
tm6tech
Registered User
Posts: 166
Joined: Mon Apr 14, 2003 1:51 pm

Post by tm6tech »

just paste the html formatting from your sites design into the overall_header.tpl file.

Worked for me.
summitmn
Registered User
Posts: 45
Joined: Wed Sep 22, 2004 8:02 pm

Post by summitmn »

sadly with the style sheets and etc it is a bit more complicated. that is why it would be nice to be able to just call the site header.
Locked

Return to “2.0.x Support Forum”