• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • 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.

"X Online Now"

Status
Not open for further replies.

Andrej

Well-known member
#1
I am looking for a add-on that could put a box (almost identical to the "Staff Online Now" box) and it would only show users from usergroup ID (5 for example) , and the block placement would be right under the "Staff Online Now" block. It could be called "Sponsors Online Now" or anything else. :)

Optional:
- Option set in Admin Control Panel where one could specify the ID of the usergroup(s), or particular users to show, and placement options.

Contact me if you are interested (free/paid)
 

dutchbb

Well-known member
#4
I didn't try it, but if you remove the admin and mod part, add your own user group conditional, and use the html in a new block, it should show any user group you want, no?
 

dutchbb

Well-known member
#6
Maybe I'm not understanding you correctly, but it seems to work fine for me:

sponsors_block.png

I added this code below the staff block:

HTML:
<!-- block: sidebar_online_sponsors -->
<xen:if hascontent="true">
    <div class="section staffOnline avatarList">
        <div class="secondaryContent">
            <h3>Sponsors Online Now</h3>
            <ul>
                <xen:contentcheck>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{$user.user_group_id} == 6">
                            <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_sponsors -->
 

Andrej

Well-known member
#7
Did you assign the user as a moderator or anything? Doesn't work here...
Maybe I'm not understanding you correctly, but it seems to work fine for me:

View attachment 21600

I added this code below the staff block:

HTML:
<!-- block: sidebar_online_sponsors -->
<xen:if hascontent="true">
    <div class="section staffOnline avatarList">
        <div class="secondaryContent">
            <h3>Sponsors Online Now</h3>
            <ul>
                <xen:contentcheck>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{$user.user_group_id} == 6">
                            <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_sponsors -->
 

Andrej

Well-known member
#9
No. I created a new user group 'Sponsors' with the ID 6. Then I put the user 'XenForo' in that user group. Then added the HTML above.
I can't get it working no matter what. Are you doing this on the 1.1 RS release? I'l try to do this on localhost..
 

Andrej

Well-known member
#13
the posted code will only work for PRIMARY user group check


instead of
<xen:if is="{$user.user_group_id} == 6"> you'll need the group check template helper
At both users I have group id 5 as primary. It works on localhost, but not on my live site. I can't get what's wrong.

It's understandable that if it works on localhost, why it won't work at my live site? Maybe you could take a look please...
 

Andy.N

Well-known member
#14
the posted code will only work for PRIMARY user group check


instead of
<xen:if is="{$user.user_group_id} == 6"> you'll need the group check template helper
What is group check template helper? Can you post an example? I have some member who is in secondary group which I like to check.
 
Status
Not open for further replies.