Please help with my ultra simple portal template

Started by Abe, December 24, 2006, 12:58:03 PM

Previous topic - Next topic

Abe

Alright, I've been getting ready to upload a new look for my website which will allow all of the site's content to be "skinned" according to the user's SMF theme, using this simple bit of code:

<?php $ssi_layers = array('main'); require_once('smf/SSI.php'); ?>
<?php if(!empty($HTTP_GET_VARS[page]) and file_exists("./$HTTP_GET_VARS[page].php")) { include("./$HTTP_GET_VARS[page].php"); } else { include("./news.php"); } ?>
<? ssi_shutdown(); ?>


Which I'm sure you'll agree should work as you'd expect, with whatever page was specified in "index.php?page=folder/whatever" (meaning "www.mysite.com/folder/whatever.php") being inserted into the desired template, or showing the news.php page if a no page or a non-existant page was requested.

It worked perfectly on my old Red Hat / Plesk 7 setup, but that had to go due to a plethora of reasons, so I formatted my server and installed the newest version of Plesk 8 and Fedora Core, and spent forever uploading everything exactly as it was before, and now this doesn't work, it just shows the news.php regardless of the "page=" entered.

Has something changed in PHP coding that would make that insert code not work?

The board iteself functions perfectly, as do SSI inserts on the aforementioned news page, so I really can't tell what the problem is.

I hope someone can see what I'm talking about here.  As you can probably tell by my babbling, my knowledge is limited.

Incidentally, if anyone can figure this out, could they also figure out how to give each page of my site a proper <title> tag too?  That's the only letdown of using this setup.

Thanks in advance, I've yet to be let down by the ol' SMF forum.

Advertisement: