Firefox PHP

Can I put an include reference in header/footer templates?

Posted by blind_curve 
Can I put an include reference in header/footer templates?
December 29, 2010 04:27PM
Hello,
I'm trying to have the phorum fit into our website like our existing discussion board does. I would like to use includes in the header and footer, so that the look and feel of our website stays uniform. This is what I'd like to throw in there:

<!--#include file="build_top.shtml"-->

Assuming my path is correct, can I put the include in the header/footer? So far it's not working...

Thanks.
Re: Can I put an include reference in header/footer templates?
December 29, 2010 04:42PM
Well, you are using server side includes (SSI) there. The Phorum templates are PHP code. Unless you do some special filtering setup in an Apache2 server (so I'm talking about the hosting platform here, not Phorum), it is not possible to use SSI.

Since the templates are essentially PHP-code, you could make use of PHP constructions to include the build_top.shtml code from the template. However, that will not result in a functioning Phorum. The problem is that there are various pieces of code that *must* be available in the header for Phorum to function. Things like stylesheet references, javascript sources, the {HEAD_TAGS} and the meta refresh code are required to make things work.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Can I put an include reference in header/footer templates?
December 29, 2010 05:29PM
Thanks for the AHA moment. I could easily re-do the shtml files as php files. I only have to go through about 50 pages or so. I can see it coming together now.

Thanks!
Sorry, only registered users may post in this forum.

Click here to login