Xin file sidebar_online_users hiển thị người dùng online trong Xenforo

Thảo luận trong 'Mã nguồn mở Xenforo' bắt đầu bởi Trần Văn Cường, 10/5/16.

  1. Trần Văn Cường

    Trần Văn Cường I love CNTT Thành viên BQT Thành viên BQT

    Tham gia ngày:
    8/11/15
    Bài viết:
    3,693
    Đã được thích:
    43
    Điểm thành tích:
    48
    Giới tính:
    Nam
    Nghề nghiệp:
    Sinh Viên
    Nơi ở:
    Quảng Ninh thân yêu!
    Web:


    CODE:
    Select All
    <xen:if hascontent="true">
        <
    div class="section staffOnline avatarList">
            <
    div class="secondaryContent">
                <
    h3><a href="{xen:link members, '', 'type=staff'}">{xen:phrase staff_online_now}</a></h3>
                <
    ul>
                    <
    xen:contentcheck>
                        <
    xen:foreach loop="$onlineUsers.records" value="$user">
                            <
    xen:if is="{$user.is_staff}">
                                <
    li>
                                    <
    xen:avatar user="$usersize="s" img="true" />
                                    <
    xen:username user="$userrich="true" />
                                    <
    div class="userTitle">{xen:helper userTitle$user}</div>
                                </
    li>
                            </
    xen:if>
                        </
    xen:foreach>
                    </
    xen:contentcheck>
                </
    ul>
            </
    div>
        </
    div>
    </
    xen:if>
    <!-- 
    end blocksidebar_online_staff -->

    <!-- 
    blocksidebar_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 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="$usersize="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" style="padding:8px;">
                    <
    xen:foreach loop="$onlineUsers.records" value="$useri="$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">
            <
    div style="text-align: center;">
                     <!--
    thng ke-->
            </
    div><br/>
                {
    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 blocksidebar_online_users -->
     

    Bình Luận Bằng Facebook

    data-href="https://cnttqn.com/threads/xin-file-sidebar-online-users-hien-thi-nguoi-dung-online-trong-xenforo.1769.html"