Okay, I've surfed about 30 plus hours and rewrote this script hundreds of times to get this to work, but I can't get it. I even posted on sitepoint.com but nobody there even bothered to answer.
Problem:
I have a template file as such: (very simplified) (named "template.php")
<html>
<head>
<META NAME="keywords" CONTENT="<? print ($keywords); ?>">
<META NAME="description" CONTENT="<? print ($description); ?>">
<title><? print ($pagetitle); ?></title>
</head>
<body bgcolor="#FFFFFF">
<script type='text/javascript' src='<?php print ($menuscript); ?>'></script>
<? include ('picture1.php'); ?>
<? include ('picture3.php'); ?></td>
<CENTER><H1><? print ($articletitle); ?></H1></CENTER>
<? print ($contents); ?>
<? print ($pagefooter); ?>
<? include ('picture2.php'); ?>
<? include ('picture2.php'); ?>
<?php include ("ad1.php"); ?>
<?php echo $phpAds_raw['html']; ?>
<?php $_GET['zfposition']="p1,p3"; include('newsfeeds/zfeeder.php'); ?>
<?php print ($pagefooter); ?>
</body>
</html>
This file will be called by all pages on my site. The thing is, I will have 2 separate themes, and want a different menu bar, pictures, footer, etc for the 2 themes (apples and tuna as an example).
So, page one of theme one (page one of apples) has these variables: (named "page1theme1.php")
<?php
$pagetitle = "Page 1 Apples";
$articletitle = "Page 1 Apples Title";
$keywords = "page 1 apples keywords";
$description = "Page 1 apples description";
$contents = "Page 1 Apples Contents";
include ("template.php");
include ("theme1.php");
?>
and page one of theme two (page one of tuna) has these variables: (named "page1theme2.php")
<?php
$pagetitle = "Page 1 Tuna";
$articletitle = "Page 1 Tuna Title";
$keywords = "page 1 tuna keywords";
$description = "Page 1 tuna description";
$contents = "Page 1 Tuna Contents";
include ("template.php");
include ("theme2.php");
?>
Then I have "theme1.php" with these variables:
<?php
$menuscript = "SinglePage1_var.js";
$pagefooter = "Menu stuff in HTML Theme 1";
?>
And I have "theme2.php" with these variables:
<?php
$menuscript = "SinglePage2_var.js";
$pagefooter = "Menu stuff in HTML Theme 2";
?>
I am getting errors. I think it's the way I'm calling 2 files to include into the template as one types in mysite.com/page1theme1.php.
This is part one of my error. But I think I can solve part 2 if the answer I get from this works. Part 2 has to do with the way files are called as well.