Add pagination links to the bottom of threads