The variables need to be available in other areas in order to show them. You can't show them on, say, the showthread page because there is no such variable called $totalthreads on that page unless you code there to be that variable. You will need to make a plugin that determines these variable values in order to use them on other pages.