Thanks for the code.
But what I don't really quite get is where to insert the code and how it works with links.