Merge the staff block with the members block [Deleted]

Russ

Well-known member
Russ submitted a new resource:

Merge the staff block with the members block (version 1.0) - Save some space on the sidebar

Final Result:

View attachment 41555



Open sidebar_online_users:

Replace entire code with:

Code:
<xen:edithint template="sidebar.css" />
 
<!-- block: sidebar_online_staff -->
<!-- block: sidebar_online_users -->
<div class="section membersOnline userList">
    <div class="secondaryContent">
        <h3><a href="{xen:link online}" title="{xen:phrase see_all_online_users}">{xen:phrase members_online_now}</a></h3>
 
<xen:if hascontent="true">
                <h4...

Read more about this resource...
 
I did this about a year or so ago and it's truly a space saver. Another excellent and useful resource. Excellent work yet again. :)

Edit: Thinking back it might not have been staff I think i merged the who visited in the last 24 hours into the members online block.
 
Just one small update to this for 1.2, which I'm sure Russ will compare/fix...

There is a changed phrase, so be sure it looks like this in the proper place:

HTML:
        <div class="footnote">
{xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}
        </div>
 
Hi @Russ solved this problem thanks to @Alien :)

Members_Online_Now.webp

But here is another one:

Members_Online_Now.webp
Robots are not defined in your code. Where can I change it, so they will not display at all in the Members Online Now? So I will only have there members and guests.
 
Also is there a tweak, which will display in Members: instead of their usernames their avatars, as it is for Staff Online Now and People You Follow?

I guess it would make more sense to rename Staff Online Now to only Staff: :)
 
You need to make sure there is not a syntax error or outdated phrase, seems to work fine for me with @Alien's fix.

As for avatars for members online, look in: Style Properties -> [XB] Sidebar -> Enable Avatars in Sidebar Online List

;)
 
Just a note, if you replaced the entire template as this guide suggest, the above option will not work.

We can add this to the framework for one of the upcoming releases though.
 
Yeah, I applied @Alien 's fix as it can be seen on second picture :) Now I am upgrading from 1.2. RC 2 to 1.2. Will try it again, hopefully I won't have robots there anymore.

Ah, it is a shame, that can not display avatars with this modification, anyway Core for 1.2 with bug fixes should be released soon, so hopefully there will be an option then to turn avatars for members on :)
 
Last edited:
@Russ if you will have time, don't forget to update this resources description. For XenForo 1.2 you need to use the update from @Alien and it is still not changed in your Overview description :)

We will definitely add the option for avatars, just not positive it will be in the next update for the framework.
Is it a lot of work to display avatars for members too? I mean if I could do that with Core myself or should I just rather wait for that framework update?

Also, how can I disable (turn off) robots? I don't see any point showing this info for users :)
 
Yes, I want to have all members (admin, Tomas) with avatars instead of usernames (they will display on hover) and I don't want to have there robots: 0.

Members-Online-Now.webp
 
[XB] - Sidebar -> Enable Avatars in Sidebar Online List

I think I misunderstood your original request, this has been in the framework for a while, sorry :(
 
That is not working for me. You mentioned in this thread it will not work after this change, that you will need to add this to the framework.

Just a note, if you replaced the entire template as this guide suggest, the above option will not work.

We can add this to the framework for one of the upcoming releases though.
 
Ah! That is why - We need to add this template mod to the framework. Will put it to the top of the list of things to add.
 
@Qwk86gn ok, thanks, I will wait for that :)

Do you know how to disable robots from members online? I don't want to show this info to my members, I find it really useless for them.
 
Anyone knows if anything changed with XenForo 1.2.1?

I upgraded both the XenForo and Core to the newest versions, but staff avatars are twice as big as people you follow. I really prefered the same small size for both groups. I didn't do any additional changes as far as I know.

Members-Online-Now.webp
 
Hm, I really don't know what happened, just double checked the code, copied, pasted again, and this is how it looks now:

Members-Online-Now.webp

I have XenForo 1.2.1 and before the upgrade everything was fine. Can someone please help me, how to achieve the result as it was before? Smaller avatars and they are next to each other and one below other as it is now. This is how I had it before:

members-online-now-png.54488
 
Back
Top Bottom