OK... sooooo close now....
That new code you posted did the trick for correcting the one big continuous link and the "User attached this image" text is no longer links either.
The only remaining issue now that I can tell is that any pictures after the first one, still link back to the first picture.
Velocd... Sorry, I dont understand what you mean with the 2 code posts.