That file is not meant to be ran in that way
Here is a tutorial on how to run the block in your vbulletin and I would beleive your error has to do with either your photopost table prefix has not been entered under Admin => Edit Integration or the file directly itself inc_ads.php the $link and mysql_select_db lines.
http://www.photopost.com/forum/showp...32&postcount=1