XF 2 Tip Mod & Admin Verified Badge in Postbit tooltip

prvtzone

eleaks.to
Registered
Joined
Jul 29, 2019
Messages
122
Points
53

Reputation:

put it like this below. I updated my thread because i forgot to close this tag </xf:if> , now it should work for you .

Code:
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" />
              
    <xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
        <xf:elseif is="{{$user.isMemberOf(3)}}"/>
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
            <xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
        </xf:if>


                <div class="d-flex align-items-center justify-content-center flex-wrap post-stats">
                <div class="post-stat">
                    <span class="largetext">
                        <strong style="color:green; text-align: center;">{$user.af_as_award_total|number}</strong>
                    </span>
                    <br>
                    <span class="x-smalltext text-uppercase" style="font-weight:bold; ">Awards</span>
                </div>
                <div class="post-stat">
                    <span class="largetext"><strong style="color:green; text-align: center;">{$user.reaction_score|number}</strong></span>
                    <br> <span class="x-smalltext text-uppercase" style="font-weight:bold;">Likes</span>
                </div>
            </div>
            <p>
                <xf:if is="$user.user_id AND $xf.visitor.canStartConversationWith($user)">
                    <xf:if is="property('xtr_conversation_button')">
                        <a href="{{ link('conversations/add', '', {'to': $user.username}) }}" data-xf-click="{{'overlay'}}" class="xm-icon button--link"><i class="fas fa-envelope" aria-hidden="true" data-xf-init="tooltip" title="{{ phrase('start_conversation')}}"></i></a>
                    </xf:if>
                </xf:if>
            </h4>
 

jhoancito

Well-known member
Registered
Joined
Mar 23, 2021
Messages
64
Points
18

Reputation:

put it like this below. I updated my thread because i forgot to close this tag </xf:if> , now it should work for you .

Code:
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" />
              
    <xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
        <xf:elseif is="{{$user.isMemberOf(3)}}"/>
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
            <xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
        </xf:if>


                <div class="d-flex align-items-center justify-content-center flex-wrap post-stats">
                <div class="post-stat">
                    <span class="largetext">
                        <strong style="color:green; text-align: center;">{$user.af_as_award_total|number}</strong>
                    </span>
                    <br>
                    <span class="x-smalltext text-uppercase" style="font-weight:bold; ">Awards</span>
                </div>
                <div class="post-stat">
                    <span class="largetext"><strong style="color:green; text-align: center;">{$user.reaction_score|number}</strong></span>
                    <br> <span class="x-smalltext text-uppercase" style="font-weight:bold;">Likes</span>
                </div>
            </div>
            <p>
                <xf:if is="$user.user_id AND $xf.visitor.canStartConversationWith($user)">
                    <xf:if is="property('xtr_conversation_button')">
                        <a href="{{ link('conversations/add', '', {'to': $user.username}) }}" data-xf-click="{{'overlay'}}" class="xm-icon button--link"><i class="fas fa-envelope" aria-hidden="true" data-xf-init="tooltip" title="{{ phrase('start_conversation')}}"></i></a>
                    </xf:if>
                </xf:if>
            </h4>
prvtzoneHello friend, I put this code, did you update? I get an error in the image, you go to where I added the code and where it ends, there is an error through the image, can you help me please?


Captura.PNG


Captura1.PNG


error.PNG
 

jhoancito

Well-known member
Registered
Joined
Mar 23, 2021
Messages
64
Points
18

Reputation:

Hello friend, I put this code, did you update? I get an error in the image, you go to where I added the code and where it ends, there is an error through the image, can you help me please?


Captura.PNG

Captura1.PNG

error.PNG
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

View previous replies…

jhoancito

Well-known member
Registered
Joined
Mar 23, 2021
Messages
64
Points
18

Reputation:

You need to post everything into a post, with screenzshots only we cannot help sometimes
BattleKingI put this code to add


CSS:
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" />
              
    <xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
        <xf:elseif is="{{$user.isMemberOf(3)}}"/>
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
            <xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
        </xf:if>


                <div class="d-flex align-items-center justify-content-center flex-wrap post-stats">
                <div class="post-stat">
                    <span class="largetext">
                        <strong style="color:green; text-align: center;">{$user.af_as_award_total|number}</strong>
                    </span>
                    <br>
                    <span class="x-smalltext text-uppercase" style="font-weight:bold; ">Awards</span>
                </div>
                <div class="post-stat">
                    <span class="largetext"><strong style="color:green; text-align: center;">{$user.reaction_score|number}</strong></span>
                    <br> <span class="x-smalltext text-uppercase" style="font-weight:bold;">Likes</span>
                </div>
            </div>
            <p>
                <xf:if is="$user.user_id AND $xf.visitor.canStartConversationWith($user)">
                    <xf:if is="property('xtr_conversation_button')">
                        <a href="{{ link('conversations/add', '', {'to': $user.username}) }}" data-xf-click="{{'overlay'}}" class="xm-icon button--link"><i class="fas fa-envelope" aria-hidden="true" data-xf-init="tooltip" title="{{ phrase('start_conversation')}}"></i></a>
                    </xf:if>
                </xf:if>
            </h4>
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

I put this code to add


CSS:
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" />
            
    <xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
        <xf:elseif is="{{$user.isMemberOf(3)}}"/>
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
            <xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
        </xf:if>


                <div class="d-flex align-items-center justify-content-center flex-wrap post-stats">
                <div class="post-stat">
                    <span class="largetext">
                        <strong style="color:green; text-align: center;">{$user.af_as_award_total|number}</strong>
                    </span>
                    <br>
                    <span class="x-smalltext text-uppercase" style="font-weight:bold; ">Awards</span>
                </div>
                <div class="post-stat">
                    <span class="largetext"><strong style="color:green; text-align: center;">{$user.reaction_score|number}</strong></span>
                    <br> <span class="x-smalltext text-uppercase" style="font-weight:bold;">Likes</span>
                </div>
            </div>
            <p>
                <xf:if is="$user.user_id AND $xf.visitor.canStartConversationWith($user)">
                    <xf:if is="property('xtr_conversation_button')">
                        <a href="{{ link('conversations/add', '', {'to': $user.username}) }}" data-xf-click="{{'overlay'}}" class="xm-icon button--link"><i class="fas fa-envelope" aria-hidden="true" data-xf-init="tooltip" title="{{ phrase('start_conversation')}}"></i></a>
                    </xf:if>
                </xf:if>
            </h4>
jhoancitodo not change the template themself.
Ist is all you have inserted into the template, normally only these lines need to be added:

PHP:
<xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
<xf:elseif is="{{$user.isMemberOf(3)}}"/>
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
<xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
</xf:if>

But in there it is stupid, because line 1 and 2 is the same in 3 and 4, possibly he wanted to add some more badges to different groups.

So the best to apply this change would be a template modification like this:

1701358692593.jpg


Find:
PHP:
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" /></h4>

Replace:
Code:
$0
<xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
<xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
</xf:if>

PLease do not forget to add the extra.less code from the first page into the extra.less template
 

jhoancito

Well-known member
Registered
Joined
Mar 23, 2021
Messages
64
Points
18

Reputation:

do not change the template themself.
Ist is all you have inserted into the template, normally only these lines need to be added:

PHP:
<xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
<xf:elseif is="{{$user.isMemberOf(3)}}"/>
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
<xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
</xf:if>

But in there it is stupid, because line 1 and 2 is the same in 3 and 4, possibly he wanted to add some more badges to different groups.

So the best to apply this change would be a template modification like this:

View attachment 38198

Find:
PHP:
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" /></h4>

Replace:
Code:
$0
<xf:if is="{{$user.isMemberOf(3)}}">
    <div class="verified_badge verified_admin tooltip2 tooltipstered" data-xf-init="tooltip" title="Administration Team"><i class="fa fa-check"></i></div>
<xf:elseif is="{{$user.isMemberOf(4)}}"/>
    <div class="verified_badge verified_staff tooltip2 tooltipstered" data-xf-init="tooltip" title="Verified Staff Members"><i class="fa fa-check"></i></div>
</xf:if>

PLease do not forget to add the extra.less code from the first page into the extra.less template
BattleKingThat's the problem, it doesn't let me modify anything where you entered, I don't know why.
 
Top