ok, I had to take out the 'require photopost.inc.php' line because it was printing the contents of that file at the bottom of ubbthreads.php and not the pictures

I just added the info right into the ubb threads template, which isn't good from a security standpoint.
Besides that, there's some table issues, for some reason it's not printing the tbclose after the first set of member's categories. That a photopost bug?