Added pagination for thread and post views