Yes, it can be done... and its not really that hard to do. My suggestion would be to download a bunch of hacks and really look over the code, especially the hacks that have stand alone pages. Do a search (here or over at vbulletin.com) for how to include templates.
Always begin with:
PHP Code:
<?php
require("./global.php");
Then you can do things like:
PHP Code:
eval("\$header = \"".gettemplate("header",1,0)."\";");
eval("\$footer = \"".gettemplate("footer",1,0)."\";");
This means that where ever $footer or $header appear in a given template, they will be ... executed for lack of a better word.
Then end with something like:
PHP Code:
eval("dooutput(\"".gettemplate("template_hame_here")."\");");
?>
That template will be 'executed' every time the page loads and should include $header and $ footer somewhere.
Obviously that isn't much to go on, but it should get you started.
-JRW