Resource icon

xF2 Add-on [OzzModz] Badges 2.3.5 Patch Level 2

No permission to download

Samuel

Well-known member
Registered
Joined
May 13, 2021
Messages
84
Points
28

Reputation:

Hi, this code don't work to me, can someone tell me why???

HTML:
<xf:if is="$user.badge_id == '10'">

This user have a golden badge.

</xf:if>

I have an badge with ID=10 and I want it when the user receives this medal This text will be shown in his profile.
 

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:

Hi, this code don't work to me, can someone tell me why???

HTML:
<xf:if is="$user.badge_id == '10'">

This user have a golden badge.

</xf:if>

I have an badge with ID=10 and I want it when the user receives this medal This text will be shown in his profile.
SamuelIs the variable name correct?
so far as I know it is called $userBadge.badge_id
 
View previous replies…

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 want to show up on members profile.
in member_view template

I inserted these variables in whatever way you think, but none of them worked. It seems that the creator of this add-one does not allow this at all.
I'd appreciate if you found a way to do this command. 🙏🏻❤️
SamuelHere the code to add

HTML:
<xf:if contentcheck="true">
    <span class="featuredBadges featuredBadges--account">
        <xf:contentcheck>
            <xf:if is="$xf.visitor.user_id">
                <xf:if is="$xf.visitor.cached_featured_badges">
                    <xf:foreach loop="$user.cached_featured_badges" value="$userBadge" if="$userBadge.Badge is not empty">
                        <xf:if is="$userBadge.badge_id == 1">
                            This user have a golden badge.
                        </xf:if>
                    </xf:foreach>
                <xf:else />
                    <xf:foreach loop="$xf.visitor.cached_badges" value="$userBadge" if="$userBadge.Badge is not empty">
                        <xf:if is="$userBadge.badge_id == 1">
                            This user have a golden badge.
                        </xf:if>
                    </xf:foreach>
                </xf:if>
            </xf:if>
        </xf:contentcheck>
    </span>
</xf:if>
 

Samuel

Well-known member
Registered
Joined
May 13, 2021
Messages
84
Points
28

Reputation:

Here the code to add

HTML:
<xf:if contentcheck="true">
    <span class="featuredBadges featuredBadges--account">
        <xf:contentcheck>
            <xf:if is="$xf.visitor.user_id">
                <xf:if is="$xf.visitor.cached_featured_badges">
                    <xf:foreach loop="$user.cached_featured_badges" value="$userBadge" if="$userBadge.Badge is not empty">
                        <xf:if is="$userBadge.badge_id == 1">
                            This user have a golden badge.
                        </xf:if>
                    </xf:foreach>
                <xf:else />
                    <xf:foreach loop="$xf.visitor.cached_badges" value="$userBadge" if="$userBadge.Badge is not empty">
                        <xf:if is="$userBadge.badge_id == 1">
                            This user have a golden badge.
                        </xf:if>
                    </xf:foreach>
                </xf:if>
            </xf:if>
        </xf:contentcheck>
    </span>
</xf:if>
BattleKingThanks for answering and spending your time to find it :love:, but !! do you test it in "member_view" ??? do it work to you ??

HTML:
<xf:if contentcheck="true">
    <span class="featuredBadges featuredBadges--account">
        <xf:contentcheck>
            <xf:if is="$xf.visitor.user_id">
                <xf:if is="$xf.visitor.cached_featured_badges">
                    <xf:foreach loop="$user.cached_featured_badges" value="$userBadge" if="$userBadge.Badge is not empty">
                        <xf:if is="$userBadge.badge_id == 10"> my badge id is 10
                            This user have a golden badge.
                        </xf:if>
                    </xf:foreach>
                </xf:if>
            </xf:if>
        </xf:contentcheck>
    </span>
</xf:if>


I used above code as you said but not worked, And also I changed the "$xf.visitor" values to "$user" but no....... again!
I used this code in different ways in "member_view" template. It does not work by any kind of changes. it never works to me.

Do you have a better suggestion to make it work?
 

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:

Thanks for answering and spending your time to find it :love:, but !! do you test it in "member_view" ??? do it work to you ??

HTML:
<xf:if contentcheck="true">
    <span class="featuredBadges featuredBadges--account">
        <xf:contentcheck>
            <xf:if is="$xf.visitor.user_id">
                <xf:if is="$xf.visitor.cached_featured_badges">
                    <xf:foreach loop="$user.cached_featured_badges" value="$userBadge" if="$userBadge.Badge is not empty">
                        <xf:if is="$userBadge.badge_id == 10"> my badge id is 10
                            This user have a golden badge.
                        </xf:if>
                    </xf:foreach>
                </xf:if>
            </xf:if>
        </xf:contentcheck>
    </span>
</xf:if>


I used above code as you said but not worked, And also I changed the "$xf.visitor" values to "$user" but no....... again!
I used this code in different ways in "member_view" template. It does not work by any kind of changes. it never works to me.

Do you have a better suggestion to make it work?
SamuelYes all I post has been tested and it works fine. You did not placed the complete section in your modification!

Blok.png
 

Samuel

Well-known member
Registered
Joined
May 13, 2021
Messages
84
Points
28

Reputation:

Yes all I post has been tested and it works fine. You did not placed the complete section in your modification!

View attachment 33269
BattleKingOh man, Thank you. it worked. You are a master of xenforo, i like you xD. I had a huge mistake in ID identification. The ID of the badge item was 110, I entered the value of 10. I am really crazy. you are perfect, i want to kiss u 😘🤣
 

Loki

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Dec 31, 2019
Messages
480
Points
253

Reputation:

Loki

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Dec 31, 2019
Messages
480
Points
253

Reputation:

Loki

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Dec 31, 2019
Messages
480
Points
253

Reputation:

Loki

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Dec 31, 2019
Messages
480
Points
253

Reputation:

broduer

New member
Registered
Joined
Apr 21, 2023
Messages
1
Points
1

Reputation:

So I am wondering why the badges are all showing up super small?

for instance I try using
ADMINISTRATOR.png

and it shows super small almost 1px or something

**I got this fixed, was simple changes to the settings**
 
Last edited:

Kenpachi

Well-known member
Registered
Joined
Oct 1, 2019
Messages
171
Points
53

Reputation:

Thanks for sharing. I have an question, someone know how to modify the URL format? I want to remove the ozzmodz_

domain/help/ozzmodz_badges/
 

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:

Thanks for sharing. I have an question, someone know how to modify the URL format? I want to remove the ozzmodz_

domain/help/ozzmodz_badges/
Kenpachigo to help pages and change the URL Portion, but it looks like you need to use a different name, badges only do not work, I changed it to badgesp

1683270187430.png
 
View previous replies…

Loki

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Dec 31, 2019
Messages
480
Points
253

Reputation:

registt

New member
Registered
Joined
May 24, 2023
Messages
4
Points
1

Reputation:

I'm getting an import error can you help?

2696177609.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…
Top