• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Variable for registered group

najaru

Active member
#1
i have see in sidebar_online_users that i can select staff only with:
<xen:if is="{$user.is_moderator} OR {$user.is_admin}">

how can i select only registred user and not staff and not guest?

thanks

 

borbole

Well-known member
#2
i have see in sidebar_online_users that i can select staff only with:
<xen:if is="{$user.is_moderator} OR {$user.is_admin}">

how can i select only registred user and not staff and not guest?

thanks

Try this

Code:
<xen:if is="{$visitor.user_id}">
<!-- Your code for the logged in user -->
</xen:if>
 

borbole

Well-known member
#6
yes, i want to modify the sidebar_user_online, and display only NON staff user. and not admin and mod
In that case remove or comment the following code:

Code:
<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" />
                                <a href="{xen:link members, $user}" class="username">{xen:helper richUserName, $user}</a>
                                <div class="muted">{xen:helper userTitle, $user}</div>
                            </li>
                        </xen:if>
                    </xen:foreach>
                </xen:contentcheck>
            </ul>
        </div>
    </div>
</xen:if>
 

najaru

Active member
#7
no :)
i want to leave this block of staff with avatar, but i dont want that the staff is visible in lower list.....
 

borbole

Well-known member
#8
no :)
i want to leave this block of staff with avatar, but i dont want that the staff is visible in lower list.....
Change this code:

Code:
<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>
to this:


Code:
<xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                    <xen:if is="{$i} <= {$onlineUsers.limit}">
                        <li>
<xen:if is="!{$user.is_moderator} OR !{$user.is_admin}">
                        <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>
                      </xen:if>
                        </li>
                    </xen:if>
                                     
                </xen:foreach>