• 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

The template changed so that it could display the user's online status. Before it was only called when the user was online, hence the static text. When I updated it to change based on the user's online status, I modified the template to use the variables.

Revert/reapply the extra span tags, or apply the template I gave you above. That should sort it out for you.
 
Nope it did not break anything. And it's probably not an issue with your mod here at all.
What I did was install your add-on, then used Paul's code (here) to display an indicator rather than the text, as I really don't like the text.
The text displayed perfectly, but the indicator won't display. :(

I'm using the Flexile style, available on this site.

Flexile isn't including the EXTRA.css template within the public.css template, hence the styling that's been added isn't showing up on your forum. I got it to work by adding the following line to the bottom of public.css:

Code:
<xen:include template="EXTRA.css" />
 
  • In EXTRA.css template, i add this:
Code:
.userOnline
    {
        font-weight: bold;
        font-size: 10px;
        color: @contentBackground;
        background: @primaryLight url('@imagePath/xenforo/gradients/category-23px-light.png') repeat-x top;
        padding: 1px 5px;
        margin: -5px -5px 5px 5px;
        border: 1px solid @primaryLight;
        border-radius: 3px;
        border-top-right-radius: 0px;
        display: block;
        float: right;
        position: relative;
        box-shadow: 1px 1px 3px rgba(0,0,0, 0.25);
        margin-left: -{xen:calc '@content.padding-right + 5'}px;
    }
        .userOnline span
        {
            background-color: @primaryLight;
            border-top-right-radius: 3px;
            position: absolute;
            top: -4px;
            right: -1px;
            width: 5px;
            height: 4px;
        }
  • And message_user_online template, add this:
Code:
<span class="userOnline"><span class="firstSpan"></span><span class="secondSpan"></span>{$userStatus.text}</span>

But there are a little problem:

problem.webp
 
Flexile isn't including the EXTRA.css template within the public.css template, hence the styling that's been added isn't showing up on your forum. I got it to work by adding the following line to the bottom of public.css:

Code:
<xen:include template="EXTRA.css" />
oooooohhhh ok I will reinstall this then and see if it works. Thanks!
 
ROFL!!! I have no idea what I did - oh wait, yes I do - I forgot to take the text "Online" out of the message_user_online template.
And got this. Ha! Remove the green dot and put the text in all capitals and it ain't half bad. heheh

online.webp
 
Nice work Arik, I look forward to trying out the new functionality.

The only discrepancy I can see is if an Administrator sets themselves to hidden then Moderators see them as offline.

This is in contradiction to the normal forum view where Administrators show as online to Moderators.

I've hard coded the rules into the code. As I was doing that, however, I ran across a permission setting to allow moderators to see whose online (haven't played much with moderator rules). Future versions of the hack will follow this setting to provide consistency with the rest of the software, in lieu of static rules.

To update, all you need to do is replace Asp_OnlineStatus_Plugin_Plugin. None of the XML files (or version numbers) were altered.
 
hmmmmm, a visitor to my site said that the indicator was showing me online, even tho I hadn't been there for 3 hours.
Is there a fix for this??
 
Top Bottom