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

Add usergroups to Staff online now

add usergroups to staff online now, without extra permissions

  1. Rost35

    Rost35 Member

    Rost35 submitted a new resource:

    Add usergroups to Staff online now (version 1.0) - add usergroups to staff online now, without extra permissions

    Read more about this resource...
     
  2. Robyn Unc Privette

    Robyn Unc Privette Active Member

    This is nice but doesn't seem to be showing the group I added.
     
  3. James

    James Well-Known Member

    Youll need to post code to get specific help.
     
    Rost35 likes this.
  4. giorgino

    giorgino Well-Known Member

    Code:
    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {$user.user_group_id} == 37">
    Don't work for me... :(
     
  5. Rost35

    Rost35 Member

    Only user groups does work with that code. If you want to put some Users, you have to you an other code.

    Can you send me an URL to your forum?

    To find the right user group ID:

    1. Go to the ACP
    2. -> Users (http://www.yourdomain.com/admin.php?users/)
    3. -> User groups (http://www.yourdomain.com/admin.php?user-groups/)
    4. hover your user group, than you can see an ID and fill in the code (e.g.):
    screen.png
     
  6. Rost35

    Rost35 Member

    I need your code and it would be nice to get an URL from your forum.
     
  7. giorgino

    giorgino Well-Known Member

    But this is a user group nor a single user...
    http://www.immobilio.it/admin.php?user-groups/membri-dello-staff.37/edit
     
  8. giorgino

    giorgino Well-Known Member

  9. Rost35

    Rost35 Member

    Thanks! :)

    The code has to work, it works on my board too (www.soccerlobby.de).

    edit the template: "sidebar_online_users" again please - maybe you did it in a wrong design?!
    Because I see you have three designs, so please have a look at it. You have to edit all of them!
     
  10. giorgino

    giorgino Well-Known Member

    This is the code...

    Code:
            <!-- block: forum_stats -->
            <div class="section membersOnline userList">
                <div class="secondaryContent statsList" id="boardStats">
                    <div id="totalforumstatscontainer">
                        <div class="totalforumstats">
                            <div style="float:left;padding-right: 10px;">
                                <div class="utenti48"></div>
                            </div>   
                            <div style="float:right;">
                                <p class="forumstatsnumber">{xen:number $boardTotals.users}</p>
                                <p class="forumstatsname">{xen:phrase members_count}</p>
                            </div>
                        </div>
                   
                        <div class="totalforumstats">
                            <div style="float:left;padding-right: 10px;">
                                <div class="forum48"></div>
                            </div>
                            <div style="float:right;">
                                <p class="forumstatsnumber">{xen:number $boardTotals.discussions}</p>
                                <p class="forumstatsname">{xen:phrase discussions}</p>
                            </div>
                        </div>
                       
                        <div class="totalforumstats">
                            <div style="float:left;padding-right: 10px;">
                                <div class="statistiche44"></div>
                            </div>   
                            <div style="float:right;">
                                <p class="forumstatsnumber">{xen:number $boardTotals.messages}</p>
                                <p class="forumstatsname">{xen:phrase messages}</p>
                            </div>
                        </div>
                    <div>
                </div>
            </div>
           
    <!-- Inserire qui gli utenti iscritti del giorno -->
     
    <!-- <xen:include template="borbole_today_registrations" /> -->
     
            <!-- <div style="text-align: center;">Diamo il Benvenuto a <i><xen:username user="$boardTotals.latestUser" /></i>, il nostro ultimo iscritto!</div> -->   
    <!-- Questi sono i due div del precedente template -->
        </div>
    </div>
    <!-- / -->
     
    <!-- end block: forum_stats -->
     
    <!-- block: sidebar_online_users -->
            <div class="section membersOnline userList">       
                <div class="secondaryContent">
                    <xen:if is="{$onlineUsers.records}">
                   
                        <xen:if is="{$visitor.user_id}">
                            <xen:if hascontent="true">
                                <p style="font-size:14px;padding-bottom:5px;"><a href="{xen:link account/following}">Utenti Online che stai seguendo:</a></p>
                                <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>
                            </xen:if>
                        </xen:if>
                       
    <!-- block: Staff online now -->                   
                        <xen:if hascontent="true">
                            <p style="font-size:14px;padding-bottom:5px;">{xen:phrase staff_online_now}:</p>
                            <ul class="staffonlinelist">
                                <xen:contentcheck>
                                    <xen:foreach loop="$onlineUsers.records" value="$user">
                                        <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {$user.user_group_id} == 37">
                                            <li title="{$user.username}" class="Tooltip">
                                            <xen:avatar user="$user" size="s" img="true" />
                                            </li>
                                            </xen:if>
                                    </xen:foreach>
                                    </xen:contentcheck>
                            </ul>
                            <div style="clear:both;"></div>
                        </xen:if>
    <!-- End block: Staff online now -->
                       
                        <h2 class="minorHeading" style="padding: 10px 0 10px 0;font-size:16px;"><a href="{xen:link online}">
                        {xen:phrase online_now_x_members_y_guests_z, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}'}</a></h2>   
                       
                        <xen:comment>           
                              <ol class="listInline" style="font-size:11px;">
                                <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'}">{xen:helper richUserName, $user}</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:comment>
                    </xen:if>
    <!-- end block: sidebar_online_users -->
     
    <!-- Inizio Who has visited -->
        </div>
    <xen:if is="{$XenTrCom_WhoHasVisited}">
     
        <xen:if hascontent="true">
            <div class="section WhoHasVisited userList">
                <div class="secondaryContent">
                    <xen:if is="{$xenOptions.xentrcom_whohasvisited_set} == 1">
                        <h2 class="minorHeading" style="padding: 10px 0 10px 0;font-size:16px;">Da ieri a quest'ora hanno visitato la Community {$XWhoHasVisited.count} Utenti Registrati </h2>
                    <xen:else />
                        <h2 class="minorHeading" style="padding: 10px 0 10px 0;font-size:16px;">{xen:phrase xen_tr_com_who_has_visited_today}: {$XWhoHasVisited.count}</h2>
                    </xen:if>
                  <!--
    <ol class="listInline" style="font-size:11px;">
                        <xen:contentcheck>
                            <xen:foreach loop="$XenTrCom_WhoHasVisited" value="$XWhoHasVisited" i="$limit">
                                <xen:if is="{$limit} <= {$xenOptions.xentrcom_whohasvisited_limit}">
                                    <li>
                                        <xen:username user="$XWhoHasVisited.user" rich="true" class="Tooltip" title="{xen:date {$XWhoHasVisited.user.last_activity}, 'H:i'}" /><xen:if is="{$limit} < {$xenOptions.xentrcom_whohasvisited_limit} AND {$limit} < {$XWhoHasVisited.count}">,</xen:if>
                                    </li>
                                </xen:if>
                            </xen:foreach>
                        </xen:contentcheck>
                        <xen:if is="{$limit} > {$xenOptions.xentrcom_whohasvisited_limit}">
                            <li class="moreLink">... <a href="{xen:link WhoHasVisited}" title="{xen:phrase xen_tr_com_who_has_visited_seeall}">{xen:phrase xen_tr_com_who_has_visited_morelink, 'number={xen:number $XWhoHasVisited.more}'}</a></li>
                        </xen:if>
                    </ol>
    -->
                </div>
            </div>
        </xen:if>
    </xen:if>
    </div>
    <!-- Fine Who has visited -->
    
     
  11. giorgino

    giorgino Well-Known Member

    Don't work in sidebar also... :(

    Schermata 2013-01-08 alle 17.02.21.png
     
  12. Rost35

    Rost35 Member

    Your code:
    Code:
    <xen:contentcheck>
                                    <xen:foreach loop="$onlineUsers.records" value="$user">
                                        <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {$user.user_group_id} == 37">
                                            <li title="{$user.username}" class="Tooltip">
                                            <xen:avatar user="$user" size="s" img="true" />
                                            </li>
                                            </xen:if>
                                    </xen:foreach>
                                    </xen:contentcheck>
    Try to use my code, please:
    Code:
    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {$user.user_group_id} == 37">
                                <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>

    _______
    And did you edited all of your designs (=template "sidebar_online_users")?
     
  13. giorgino

    giorgino Well-Known Member

    Don't work... :(
     
  14. Rost35

    Rost35 Member

    You know that they have to be online?

    Is it possible to get me an account - I will have a look in your template
     
  15. giorgino

    giorgino Well-Known Member

    yes...
     
  16. giorgino

    giorgino Well-Known Member

    The group nr. 37 is a secondary group... Is it a problem?
     
  17. Rost35

    Rost35 Member

    I looked it up right now and it is really a problem.

    Thus you have to use only primary usergroups, but I will check if it is possible to use secondary.
     
  18. luutruong

    luutruong Active Member

    try it
    Code:
    <xen:if is="{$user.secondary_group_ids} ==id group">
    html here
    </xen:if>
    
     
    4pLay and Rost35 like this.
  19. Rost35

    Rost35 Member

    Yeah I searched that "phrase", thank you.

    I will put it in the 'tutorial' (you will be named!)
     
    giorgino and luutruong like this.
  20. Rost35

    Rost35 Member

    giorgino likes this.

Share This Page