Xenforo Wrap - Custom Script

I am looking to integrate Xenforos header and footer around my script found in its own directory. I have Xenforo installed on the base level and want to include the header and footer in my advertise directory. I attempted to use the Kotomi generic method but it didn't load anything. That method works fine if you are in the base directory (though it isn't needed). I know this can be done somehow. Photopost is integrated with Xenforo so there has to be a set of files I can't find that makes this possible.
This has to be possible. When using the Kotomi method I could get the code pulled but the CSS didn't work. I also found that all of the links from my Xenforo were actually linked to the advertise folder. (All of the links were "/advertise/index.php", etc.) Has anyone tried playing with this?
I am bumping this to try and get it some attention. This CAN be done. lol I am interested in HOW it can be done. lol This was super easy to do with vBulletin. I had all of my external scripts wrapped with vBulletins header and footer. Am I missing something?