ported old changes to b2share-next (formatting templates)