backport display.template.php changes to pm template

Signed-off-by: Illori <illori@simplemachines.org>
Merge branch 'release-2.1' of https://github.com/SimpleMachines/SMF2.1 into release-2.1