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

Tooltip issue with Members Online modification

Discussion in 'XenForo Development Discussions' started by Trombones13, Jan 25, 2011.

  1. Trombones13

    Trombones13 Well-Known Member

    I modified the Members Online Now block to show avatars, just like the the Highest-Posting/Newest Members blocks are configured. However, I'm having an issue with the tooltip:

    XF Online Tooltip.png
    Obviously, I want the tooltip to pop out above the name, instead of getting in the way of the image when I'm hovering over it. This is the code I have in sidebar_online_users:
    <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
    					<xen:if is="{$i} <= {$onlineUsers.limit}">
    						<xen:if is="{$user.user_id}">
    							<xen:avatar user="$user" size="s" class="Tooltip" img="true" title="{$user.username}" />
    						<xen:else />
    							{xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
    Any suggestions on how to fix the tooltip? Thanks!
  2. Shadab

    Shadab Well-Known Member

    This should work:

    class="Tooltip" data-offsetX="p" data-offsetY="q"
    Adjust the offsets to correctly position your tooltip.
    Trombones13 likes this.
  3. Trombones13

    Trombones13 Well-Known Member

    It sure does; thanks! :D

Share This Page