I added the button to the showthread template. Then it is only shown once on each thread.