• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Online Status Indicator within Threads

Arik

Well-known member
#1
This addon is an extension of a thread within the Template Modification forum. This thread will work to support the core addon, while that one can continue with modifications to the templates.

This will only work with Beta 4 and up (due to the template hooks).

Usage
This add-on adds a tag within the user information indicating that the user is online. The location is controlled by an option located within your Admin CP: Options -> Threads, Discussions and Conversations -> Online Display Location. By default, the following options are available:
  • Above Avatar
  • Below Avatar
  • Above Username
  • Below User Title
  • Above User Extra Info
  • Below User Extra Info
You can also customize the display of the online tag by modifying the message_user_online template. CSS customizations can be added to the EXTRA.css template. As-is, the template this mod comes with is bare. There is a thread that outlines some alternate template options. You can find that here: http://xenforo.com/community/threads/show-user-is-online.8236/

V1.1 Updates
  • Displays Online/Offline depending on user's status
  • Invisible users will display Online (Invisible) to admin and themselves, offline to the rest
  • Invisible admins will display Online (Invisible) to moderators
  • Separate classes for online/online (invisible)/offline, so you can control how each is displayed to users
  • 3 phrases added: online, online_invisible, offline
Installation
  1. Upload the contents of the library directory to your website.
  2. Install the addon_OnlineStatus.xml file through your Admin CP.
Uninstallation
  1. Uninstall the modification through your Admin CP
  2. Delete all files under the Asp/OnlineStatus directory
 

Attachments

CyberAP

Well-known member
#6
To make nice css customizations we need to choose which html to insert.
For example simple version doesn't need any changes, bet version 2 and 3 (classic and long ribbon) need an html code to look like this:
HTML:
<span class="userOnline"><span></span>Online</span>
And for covering ribbon:
HTML:
<span class="userOnline"><span class="firstSpan"></span><span class="secondSpan"></span>Online</span>
Maybe it's really better to give us a string where we can put our html code and instead of typing Online use $1 as a phrase.
 

Brogan

XenForo moderator
Staff member
#7
To get the green dot I posted above, just empty the span like so: <span class="userOnline"></span>

And then add your custom css to EXTRA.css like this:
HTML:
.userOnline {
position:absolute;
right:3px;
top:3px;
height:6px;
width:6px;
border-radius:3px;
background-color: #009900;
}
 

CyberAP

Well-known member
#8
To get the green dot I posted above, just empty the span like so: <span class="userOnline"></span>

And then add your custom css to EXTRA.css like this:
HTML:
.userOnline {
position:absolute;
right:3px;
top:3px;
height:6px;
width:6px;
border-radius:3px;
background-color: #009900;
}
Or you can use an image which indicates unread thread:
 

Brogan

XenForo moderator
Staff member
#9
CSS is better than images as it can be adapted quickly and easily per style instead of making custom images in the correct colour.

Plus it's less to load per page.
 

CyberAP

Well-known member
#10
CSS is better than images as it can be adapted quickly and easily per style instead of making custom images in the correct colour.

Plus it's less to load per page.
Of course! But the image looks better than just a simple dot. You can leave bg-color and use also bg-image so even if user have switched images off he will see this dot.
 

Brogan

XenForo moderator
Staff member
#14
That approach makes it difficult to see who is online and who is offline.
Everyone has an indicator so you have to read each one, especially as the text is so similar.

I feel the existing approach is the best; an indicator if you are online, nothing if you are offline.
 

Allan

Well-known member
#15
That approach makes it difficult to see who is online and who is offline.
Everyone has an indicator so you have to read each one, especially as the text is so similar.

I feel the existing approach is the best; an indicator if you are online, nothing if you are offline.
Each his own indeed, personnaly, i preferred show indicator to users offline also.

Edit: and more, add option for show users Invisible

invisible.png
 

Arik

Well-known member
#16
Arik, it's possible to add option/modification for shown the users offline ?

Example: http://xenforo.com/community/threads/show-user-is-online.8236/page-3#post-115355
Sure, it's possible. My initial take on it is that it's no one's business (except maybe the administrators/moderators) if I've chosen to set myself invisible. I think there's the possibility of some violation of privacy there.

However, if it's really a feature you're looking for, I should be able to update it.
 

Brogan

XenForo moderator
Staff member
#17
If you go that approach Arik, can you make it a separate add-on so those of us who only want the online indicator to show can continue using this one?
 

Brogan

XenForo moderator
Staff member
#20
Although there is one update which would be appreciated and that is for the online indicator to show up for hidden members but only to those who have the ability to see them, i.e. Admins.

After all, hidden members are visible in the Members Online area.

And of course hidden members should show online to themselves, as it also currently does in the Members Online area.