$link is a mysql link to photopost database. You can use $db_link to connect to the forum database this is if your tables are in different databases.
The query you dont want to query the photopost table you want to query the vb
users table so you want a query like this
Content visible to verified customers only.
See this might get you close if you put some query like this and the code I posted above in the showphoto.php file but again I am only guessing at the location of any fields your trying to show.