Merge the staff block with the members block [Deleted]

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

View attachment 54958

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
Did your CSS snippit I provided get removed? That provides a small size adjustment and a float.
 
I really would love to use this but I'm having some difficulty due to the custom work on my theme.

My theme is supposed to look like this:

Untitled.webp

When I use your code I get this instead:

Untitled2.webp

My sidebar_online_users code:

Code:
<xen:edithint template="sidebar.css" />

<style>
  .sidebar .secondaryContent {background:url(styles/custom/sidebars_bgs.png) bottom center no-repeat;}
  .sidebar .secondaryContent {border:none !important;}
  .customsnfight {right:300px !important;}
</style>

<!-- block: sidebar_online_staff -->
<xen:if hascontent="true">
    <div class="section staffOnline avatarList">
        <div class="secondaryContent">
            <h3>{xen:phrase staff_online_now}</h3>
            <ul>
                <xen:contentcheck>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{$user.is_staff}">
                            <li>
                                <xen:avatar user="$user" size="s" img="true" />
                                <xen:username user="$user" rich="true" />
                                <div class="userTitle">{xen:helper userTitle, $user}</div>
                            </li>
                        </xen:if>
                    </xen:foreach>
                </xen:contentcheck>
            </ul>
        </div>
    </div>
</xen:if>
<!-- end block: sidebar_online_staff -->

<!-- block: sidebar_online_users -->
<div class="section membersOnline userList">       
    <div class="secondaryContent">
        <h3>{xen:phrase members_online_now}</h3>
       
        <xen:if is="{$onlineUsers.records}">
       
            <xen:if is="{$visitor.user_id}">
                <xen:if hascontent="true">
                <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
                <ul class="followedOnline">
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.followed}">
                                <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
                <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
                </xen:if>
            </xen:if>
           
            <ol class="listInline">
                <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                    <xen:if is="{$i} <= {$onlineUsers.limit}">
                        <li>
                        <xen:if is="{$user.user_id}">
                            <a href="{xen:link members, $user}"
                                class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                        <xen:else />
                            {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                        </xen:if>
                        </li>
                    </xen:if>
                </xen:foreach>
                <xen:if is="{$onlineUsers.recordsUnseen}">
                    <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
                </xen:if>
            </ol>
        </xen:if>
       
        <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>
    </div>
</div>
<!-- end block: sidebar_online_users -->

<style> html, body {background:#090909 url(styles/custom/body_bg_1.jpg) top center repeat-y;}
.topbg {background: url(styles/custom/top_bg_one.jpg) top center no-repeat;}
.bottombg {background: url(styles/custom/footer_bg_1.jpg) bottom center no-repeat;}

.mainContent {
    margin-right: 290px;
}

.navTabs .navTab.selected .tabLinks {margin-top:12px;}

.breadBoxBottom {margin-right:300px;}

.navTabs .navTab.selected .tabLinks {margin-left:8px;
    width: 690px;    }

</style>

Is there any safe way to merge your code into this?
 
hey rus can u update the code for 1.3? trying to uise the usergroup llegend in it and its not working in 1.3 hellp me please.
 
Actually... thinking about it you don't need to make any adjustments really for the online list.

You can do the edit(s) above then add a new widget:

Template(without wrapper)

Template:

sidebar_online_users

Set the position
Screenshot_4.webp



Then just disable the Staff online and members online. Only downside to it is you're not able to use the rich usernames option which the framework gives the option for.
 
Actually... thinking about it you don't need to make any adjustments really for the online list.

You can do the edit(s) above then add a new widget:

Template(without wrapper)

Template:

sidebar_online_users

Set the position
View attachment 91136



Then just disable the Staff online and members online. Only downside to it is you're not able to use the rich usernames option which the framework gives the option for.

That works for the forum home page but I also use Borgan's featured threads add-on, the template edit doesnt get applied on the featured threads page.
 
Are you using widget framework on the FT page? No reason it shouldn't work if you are otherwise you'll need to add it that way or do the edit for the default template as I think @Brogan's FT's page uses that.
 
Last edited:
Using WF on the featured threads page and made the template edits to the sidebar_online_users.

This is the featured threads page
cta.webp
and this is the forum page
forum.webp
All settings for the featured threads sidebar are switched off, not tried editing the master style yet, will do later.
 
Something does not seem right judging by your screenshots. Were you logged in when you took that screenshot of the FT's page?
 
Something does not seem right judging by your screenshots. Were you logged in when you took that screenshot of the FT's page?

Yes, logged in.

Got it sorted now though. There's an option called Sidebar Online Users in the featured threads options, turning that on and all works.
 
Back
Top Bottom