MyBB Community Forums

Full Version: Show "last visit" only if user is offline
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I am redesigning my user profile and I've encountered something.

[Image: pmhio.png][Image: yALmj.png]

Basically, the "last visit" information is only useful if the user is offline. If the user is online, obviously their last visit is whatever page they are currently on. I want to do two things:

1. Show the "last visit" information only if the user is currently offline.
2. Show it next to "X is offline."

Can anyone provide guidance on how to accomplish this?
Have you got Yumi's template conditionals plugin installed or not? I'll quickly look into how you could go about doing it.
Ok, try something like this:

<if !$session then>
<tr>
<td class="trow2"><strong>{$lang->lastvisit}</strong></td>
<td class="trow2">{$memlastvisitdate} {$memlastvisittime}</td>
</tr>
</if>

I think it should work.
Yeah I do, will try this out. Thanks.

Works perfectly, thanks. <3 Yumi.