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

Staff Online Avatars Columns (With Overlay)

Changes the default staff online block to use just avatars with tooltip username and usertitle.

  1. Forsaken

    Forsaken Well-Known Member

    Forsaken submitted a new resource:

    Staff Online Avatars Columns (With Overlay) (version 1.1) - Changes the default staff online block to use just avatars with tooltip username and usertitle.

    Read more about this resource...
     
  2. How do i allow the HTML in the rank name to be shown? Right now its jsut UserName, <b>Admin</b> Looks ugly...
     
  3. Forsaken

    Forsaken Well-Known Member

    For the title of the avatar, just use {$user.username}.
     
  4. What do you mean ?
     
  5. Forsaken

    Forsaken Well-Known Member

    Use this for the last step.
    Code:
     
    <xen:if hascontent="true">
    <!-- block: sidebar_online_staff -->
    <div class="section staffOnline avatarListInline">
    <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" text="{$user.username}" class="Tooltip" title="{$user.username}" />
    </li>
    </xen:if>
    </xen:foreach>
    </xen:contentcheck>
    </ul>
    <div style="clear:both;"></div>
    </div>
    </div>
    <!-- end block: sidebar_online_staff -->
    </xen:if>
    
     
    Xyphien and DigitalForgeOnline like this.
  6. Brad P

    Brad P Active Member

    great little template edit but how would i add a slight css to the avatar in the staff online now sidebar to show the color of there usergroup pic below to show what i mean.

    If someone can do this I'll pay for there services

    admin-red
    moderator-blue so on
     

    Attached Files:

    Last edited: Nov 26, 2014
  7. Brad P

    Brad P Active Member

    @Brogan please can you move my post to custom add-on requests ?
     
  8. Xyphien

    Xyphien Active Member

    upload_2015-8-1_14-3-15.png

    This is what I get when I try doing it.
     
  9. Xyphien

    Xyphien Active Member

    This code worked, nevermind.
     
  10. Axis

    Axis Member

    Is there anyway of doing this also by using [bd] Widget Framework?
     
  11. Axis

    Axis Member

    Alright, so I was able to figure it out...

    If you have [bd] Widget Framework installed on your XenForo, remove this.

    Code:
        <ul>
            <xen:contentcheck>
                <xen:foreach loop="$onlineUsers.records" value="$user">
                    <xen:if is="(isset({$user.is_staff}) AND {$user.is_staff}) OR (!isset({$user.is_staff}) AND ({$user.is_moderator} OR {$user.is_admin}))">
                        <li class="user-{$user.user_id}">
                            <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>
    and add this into the template wf_widget_online_staff

    Code:
    <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" text="{$user.username} ({xen:helper userTitle, $user})" class="Tooltip" title="{$user.username}, {xen:helper userTitle, $user}" />
    </li>
    </xen:if>
    </xen:foreach>
    </xen:contentcheck>
    </ul>
    <div style="clear:both;"></div>
    Should work, I have been testing different ways of making this work.
     
  12. NUT65

    NUT65 New Member

    Thanks Axis, this indeed works with the [bd] Widget Framework.
     
    Axis likes this.

Share This Page