Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Add online & offline text

Aloittaja hcfwesker, marraskuu 25, 2011, 06:20:10 IP

« edellinen - seuraava »

hcfwesker

SMF 2.0.1

The green icon in front of online members names.  I'm moving it to above the avatar, and have been trying to get the text next to the image, for online/offline to show next to the image.

// 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>' : '';


I know it's got something to do with putting the follwoing line in the right place, but I can't figure it out. :(

', $message['member']['online']['text'], '


Can someone please tell me how to do this.

hcfwesker

I thimnk I figured it out, but want to make sure this won't mess anything up.  This is what I added at the end, and sems to do what I want it to do.

echo' ', $message['member']['online']['text'], '';

This is what the finished code looks like. 

// 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' ', $message['member']['online']['text'], '';


Just want to make sure thats ok to leave it like that?

Thanx.  I'll mark as solved once i know.


Advertisement: