Putting Online/Offline in same line with User Name

Started by Anoni1337, January 16, 2022, 05:52:38 PM

Previous topic - Next topic

Anoni1337

Well I wanted to put online offline sign in same line with name (online/offline sign to be on the left side before the name itself) but I can't figure it out how to do that if someone could help please.

Here is a code from Display.template.php

       
// Show information about the poster of this message.
        echo '
                        <div class="poster">';

                // 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 class="online_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'
                                <h4>', $message['member']['link'],
                               
                                '</h4>';
                            echo'
                                <ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';   

Currently it looks like this

Topic title edited to remove confusion - Iris.

Kindred

All of these questions really need to be bundled up and either asked in the support thread for the theme or asked in the help wanted free/paid section...

Because you have asked for three things that I have read so far -- Two of which are going to conflict/overlap
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

live627

This is a matter of CSS. You have only provided HTML.

Diego Andrés

I think if you just put it inside the h4 should work

       
// Show information about the poster of this message.
        echo '
                        <div class="poster">';

                // 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 class="online_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'
                                <h4>', $message['member']['link'],
                               
                                '</h4>';

       
// 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 class="online_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>';

SMF Tricks - Free & Premium Responsive Themes for SMF.

Anoni1337

Thank you that helped sort of there is a still some things that got messed up but still this helped a lot  ;D

Advertisement: