How to move the "Online/Offline" icons to the right?

Started by Jay0027, October 02, 2015, 05:12:29 PM

Previous topic - Next topic

Jay0027

Hey  :)

I'm new here, I hope I am in the right section. Forgive me if I am not
and please just redirect me!

So I've been looking about all day trying to figure out how to do this. I've been through
pretty much every topic regarding it that I've found on google but had no luck. They were either
for older versions or non SMF.

I'm using SMF 2.0.11.
Now I have no experience at all in any of this so I would really appreciate it if you would do it for
me if you tell me which file to attach but if that isn't possible I will have ago myself - It seems rather simple.

How would I go about moving the Online/Offline icon that is behind the
user name in posts to the right side or under the avator with a text

Thanks in advance!

Gluz

With a long Usernames that probably look out of place.

But if you want to change it, you need to edit the file /Themes/yourtheme/Display.template.php in order to change that.

Looking though the default theme file I see that this part it's a little messy but if you want to do it yourself this is what you need to edit if you are using the default theme (or if your theme have this part the same way as the default theme):
Code (Search) Select
// Show information about the poster of this message.
echo '
<div class="poster">
<h4>';

// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
echo '
', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['text'], '" />', $context['can_send_pm'] ? '</a>' : '';

// Show a link to the member's profile.
echo '
', $message['member']['link'], '
</h4>
<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';


Code (Replace) Select
// Show information about the poster of this message.
echo '
<div class="poster">
<h4>';

// Show a link to the member's profile.
echo '
', $message['member']['link'];

// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
echo '
', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['text'], '" />', $context['can_send_pm'] ? '</a>' : '';

echo '
</h4>
<ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';


If it's different and you don't know how to edit it, then attach that file for me.

Jay0027

Fantastic, works just fine and was really easy to do!

Thank you very much  :)

Advertisement: