backport display.template.php changes to pm template

Signed-off-by: Illori <illori@simplemachines.org>