• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Merge the staff block with the members block

Merge the staff block with the members block

Russ

Well-known member
#1
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...
 

Shelley

Well-known member
#2
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.
 

Alien

Well-known member
#3
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>
 

QenTox

Well-known member
#4
Hi @Russ solved this problem thanks to @Alien :)

Members_Online_Now.png

But here is another one:

Members_Online_Now.png
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.
 

QenTox

Well-known member
#5
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: :)
 

Steve F

Well-known member
#6
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

;)
 

Steve F

Well-known member
#7
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.
 

QenTox

Well-known member
#8
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:

QenTox

Well-known member
#10
@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 :)
 

QenTox

Well-known member
#12
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.png
 

Steve F

Well-known member
#13
[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 :(
 

QenTox

Well-known member
#14
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.
 

QenTox

Well-known member
#16
@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.
 

QenTox

Well-known member
#19
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.png
 

QenTox

Well-known member
#20
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.png

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: