In that case you could use a server side hook filter:topic.getPosts this hook receives the posts being loaded in the posts variable. In that hook you can check the username and add a new property to the post.user object like platformIcons. Here is some sample code for the server side hook
myPlugin.filterTopicGetPosts = (hookData) => { hookData.posts.forEach((post) => { if (post && post.user) { post.user.platformIcons = []; if (post.user.username.endsWith('_PSN')) { post.user.truncatedUsername = post.user.username.replace(/_PSN$/, ''); post.user.platformIcons.push({ url: '', image: ''}); } // check other platforms like above } }); return hookData; };Once you have the platformIcons populated you can just use it in your custom theme in the topic/post.tpl. You can use the truncatedUsername as well if you don't want to see _PSN in the username.