XF 1.2 How to add these tooltips

Matthew Hawley

Well-known member
oLWlWlu.png


How do I add a "Discussions" tooltip to the 11 and a "Messages" tooltip to the 12?
 
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>
 
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>

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>
 
Thanks Chris, it worked!
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.
 
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.

The following templates contained errors and were not saved: node_forum_level_2: 1) Line 20: Template syntax error.
 
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.
 
Back
Top Bottom