As I posted in my other reply the subroutines that Ian posted won't work, because it has not been defined in the ubb_ubbtest_blank.cgi & ultimatebb.cgi files. The routine that I made does not need to be fixed at all...I just need to figure out why yours isn't working.
If worse comes to worse the last resort would be to manually include the Header and Footer codes in the ubb_ubbtest_blank.cgi file.