Ok everyone. Here is what's going on. I really hope someone can figure this out and help me.
I am working with the CMS phpwebsite. It's template system has a way to add php into a template, but it doesn't really work for what I want to do. The entire end layout of the content is under the control of 2 files, theme.tpl and style.css. There is a 3rd file that factors into this and that's where I have the problem. There is a file called theme.php that can be used to put php code into theme.tpl. This works off of a simple variable:
$THEME["EXAMPLE"] = "This is a sample of including php code into your theme.";
You can have as many $THEME variables as needed that simply output its contents whereever the string (in this case {EXAMPLE} is placed in theme.tpl. Simple no? What it will NOT do is include another file. This variable can not call another file. It will only output the content that is written inside it.
What I want to do is create stand alone header.tpl and footer.tpl files to make editing easier. I have tried to take a round about way to make the script include a file but it doesn't work. It will include the file, but always as the first line, not where the string is placed in theme.tpl. If it helps the site I am working on is http://www.anime-fiction.net/phpwebsite You can see what I mean there. What I've tried to do is keep the $THEME variable is simple as I can, and put everything that I need to do in a function, but it's still no good. Is there a way to include an external file in a fuction? Here is the code I have right now.
$footer = include ("http://www.anime-fiction.net/phpwebsite/themes/Default/footer.tpl");
function FOOTER($footer)
{
return $footer;
}
$THEME["FOOTER"] = FOOTER($footer);
I should be able to add {FOOTER} to theme.tpl and have footer.tpl show up, but I'm missing something big here. Any ideas?