Hmm, that's a tough one. Is the UBBCode filled in below the post? If so, you can check to see if the original photo was deleted somehow by looking in the directory specified by one of the ubbcodes. I'd check all 3 directories (full,medium,thumbs) so if it was deleted you can see if it was deleted from just one of the dirs or all 3.