[ticket/12535] Improve postprofile avatar block

A reworked version of https://github.com/phpbb/phpbb/pull/2451

PHPBB3-12535