[Tip] Avatar under username

Started by Costa, February 17, 2013, 07:46:39 PM

Previous topic - Next topic

Costa

It's quite simple. Never liked the way that poster info is displayed by default. So I move the avatr under the username, and membergroup under the avatar.

You just need to modify one file. ./Themes/default/Display.template.php
We need to search for poster info in topics. This start in this line.
// Show information about the poster of this message.

Now we scroll down a little bit, and we find the username.
// Show a link to the member's profile.
echo '
', $message['member']['link'], '
</h4>
<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';


Then, we scroll down a little bit more, and we found the avatar.
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';


Just move this part under the username code. Like this.
// Show a link to the member's profile.
echo '
', $message['member']['link'], '
</h4>
<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';


Save the file and see the result in topics. Example is attached.
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Shambles

Each to his own I guess.

I prefer your "before" look if I'm being honest.

Advertisement: