OK the problem with not connecting to the database had to do with the fact that there is no reference to username or password in the photopost.inc.php file, so I added it as I described above, and it then was able to connect.
(Just so you know, your sample reviewpost.inc.php is nothing like the one included in the ZIP file for this mod.)
The errors I mentioned were a result of not being able to find the categories and Boards in the database. To find the Categories and Boards I had to add {$Globals['pp_db_prefix']} in a few other places in the ubbt_photopost.tmpl. I suppose this problem would have been nonexistent if I hadn't set my photopost installation up with a table prefix.