Thanks for the great mod, but I have an improvement to offer. All the changes made to the index.php should also be made to SSI.php. I use SSI to make some of my non-forum pages look just like my forum. I pick up the header area, and it originally broke when I installed the mod.
All that is needed is to make the following changes to the SSI.php, the same way they were made to index.php:
Add require_once($sourcedir . '/LoadAds.php');
right below require_once($sourcedir . '/Security.php');
Add
// Load all the ads up
loadAds();
right after
loadPermissions();
That fixed up the problems I was seeing.
Thanks for sharing