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

XF 1.2 How to add these tooltips

Discussion in 'Styling and Customization Questions' started by Matthew Hawley, Jul 18, 2013.

  1. Matthew Hawley

    Matthew Hawley Well-Known Member

    [​IMG]

    How do I add a "Discussions" tooltip to the 11 and a "Messages" tooltip to the 12?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Your posts always lack the necessary information we need to help you... The HTML of the 11/12 would be helpful. In absence of that, I'll guess:

    If the HTML currently looks like:

    Code:
    <div class="counts">11/12</div>
    You'd need to change it to something like:

    Code:
    <div class="counts">
         <span class="Tooltip" title="{xen:phrase discussions}">11</span>/<span class="Tooltip" title="{xen:phrase messages}">12</span>
    </div>
     
    Tracy Perry likes this.
  3. Matthew Hawley

    Matthew Hawley Well-Known Member

    Code:
    <dl><dt><i class="icon-comment"></i></dt> <dd>{xen:if $forum.privateInfo, '&ndash;', {xen:number $forum.discussion_count}}/{xen:if $forum.privateInfo, '&ndash;', {xen:number $forum.message_count}}</dd></dl>
                    
     
  4. Matthew Hawley

    Matthew Hawley Well-Known Member

    Thanks Chris, it worked!
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    Code:
    <dl><dt><i class="icon-comment"></i></dt> <dd>{xen:if $forum.privateInfo, '&ndash;', '<span class="Tooltip" title="{xen:phrase discussions}">'}/{xen:if $forum.privateInfo, '&ndash;', <span class="Tooltip" title="{xen:phrase messages}">{xen:number $forum.message_count}</span>}</dd></dl>
    Good. I made my code above more specific to your example just for clarity.
     
  6. Matthew Hawley

    Matthew Hawley Well-Known Member

    The following templates contained errors and were not saved: node_forum_level_2: 1) Line 20: Template syntax error.
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    Code:
    <dl><dt><i class="icon-comment"></i></dt> <dd>{xen:if $forum.privateInfo, '&ndash;', '<span class="Tooltip" title="{xen:phrase discussions}">'}/{xen:if $forum.privateInfo, '&ndash;', '<span class="Tooltip" title="{xen:phrase messages}">{xen:number $forum.message_count}</span>'}</dd></dl>
    Sorry missed the ' ' around the second span.
     
    Matthew Hawley likes this.

Share This Page