XF 1.1 online user list NOT in the sidebar

Buck Russell

New member
i want to put the online user list (and online staff list) in a custom navigation drop down menu i've built. i can not, for the life of me, figure out how to do this.

it seems like the online user lists only want to work in the sidebar. well i don't WANT the sidebar on my site. so what is the method for getting these lists to work outside the side bar. i can handle all the styling myself i just need to know the xenforo code to get them to display.

i've tried this:
Code:
<div id="the-container-div">

<!-- 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_moderator} OR {$user.is_admin}">
                            <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 -->
</div>

but all i get is an empty div. i tried the same with the online-users section and it does show the headers and text but it doesn't list any users. it says 0 online when i know that's not true (and verified it by going to the page that lists online users).

i'm guessing i'm missing some kind of connection to the db or some such but i don't know.
 
You will need an add-on as the data won't be exposed for elsewhere.

forgive my ignorance here but ...

could you point me in the right direction on getting/creating this add-on? if it's security thing, i can work with that. does it just require some kind of token or something?

it seems silly to restrict that data ONLY to the sidebar when clearly not everyone WANTS to have a sidebar.
 
i don't think i need someone to make me an add-on. i am a php programmer i can figure this out i just need to know WHY the xenforo software denies the user list unless it's in the sidebar. that seems exceptionally silly and trivial.
 
i don't think i need someone to make me an add-on. i am a php programmer i can figure this out i just need to know WHY the xenforo software denies the user list unless it's in the sidebar. that seems exceptionally silly and trivial.
You asked for "getting" this add on and were pointed to where to go for that aspect.
You want specific help on developing an add-on then I suggest going to http://xenforo.com/community/forums/xenforo-development-discussions.34/, which is targeted towards that type of request. ;)
 
Top Bottom