Arik
Well-known member
Here's how I got this working:
First, upload the contents of the library file and install the addon (both attached).
This adds a method to determine the posting user's online/offlline status based on their last activity. In order to see it, you need to make a code edit to add the method call within the relevant thread controller actions. For example, in XenForo_ControllerPublic_Thread::actionIndex() I found this code starting at line 100:
And added this directly below it:
And then wrap the html in the message_user_info template with a <xen:if></xen:if>.
This uses your last activity in the session_activity table, so logging out won't necessarily clear the activity. Rule of thumb...if you show as online on the main page, you'll show online within the thread.
First, upload the contents of the library file and install the addon (both attached).
This adds a method to determine the posting user's online/offlline status based on their last activity. In order to see it, you need to make a code edit to add the method call within the relevant thread controller actions. For example, in XenForo_ControllerPublic_Thread::actionIndex() I found this code starting at line 100:
PHP:
if (!$firstUnreadPostId && $post['isNew'])
{
$firstUnreadPostId = $post['post_id'];
}
PHP:
$this->_getUserOnlineInfo($post);
And then wrap the html in the message_user_info template with a <xen:if></xen:if>.
HTML:
<xen:if is="{$message.online}"><span class="userOnline"><span></span>Online</span></xen:if>
This uses your last activity in the session_activity table, so logging out won't necessarily clear the activity. Rule of thumb...if you show as online on the main page, you'll show online within the thread.