Msg#: 4198391 posted 8:53 am on Sep 8, 2010 (gmt 0)
I have a site made in php with a header and footer file to template it and I have a require at the beginning of each of the site files for header.php and one at the end for footer.php.
This works really well for static pages and is something I have used on many occasions.
The challenge I am having is integrating any kind of third party application and getting it to work with the existing template.
For example I have a forum, FAQ and news script installed in sub directories of the web root on the site and using the above method I get lots of "Warning: Cannot modify header information - headers already sent type" errors.
I then decided to take the HTML from my template header and footer and paste these directly into the actual forum, FAQ and news template files which works well on the surface, but my site is quite dynamic and in my usual footer.php, for example, there is a call to the news script which displays the 3 most recent news topics and this then does not work (i.e it only ever shows the static HTML pasted).
Additionally, if I change the overall site template then I need to remember to change it in the forums as well which is a bit of a pain!
Is there an easy way of using an existing ../header.php and ../footer.php file so when I change the one header.php file it changes for all pages and also so the dynamic content in the those files is shown on the third party pages as well?
For the record I am a newbie and very wet behind the ears on PHP and am very slowly teaching myself as I chug along!