In XenForo 2.x, achieving this requires a minor template modification alongside the CSS, because the default trophy list template does not output a unique HTML class indicating whether the viewing user has earned each specific trophy. [1]
Step 1: The Template Modification
You must update the core trophy item wrapper to dynamically inject an is-earned class if an award date exists for that trophy. [2, 3]
- Go to your XenForo Admin Control Panel (ACP).
- Navigate to Appearance > Templates.
- Search for and open the help_trophies template.
- Locate the loop that renders each trophy (usually formatted as <li class="block-row block-row--separated">).
- Replace that line with a conditional attribute check: [4, 5]
<li class="block-row block-row--separated trophy-item {{ $trophy.award_date ? 'is-earned' : '' }}">
Step 2: Add the CSS
Now you can target .is-earned to visually differentiate unlocked achievements from locked ones.
- In your ACP, search for and open the extra.less template.
- Append one of the styling options below to the bottom of the file: [4]
Option A: Subtle Background Glow (Recommended)
This changes the background color and adds a subtle colored border border to the earned rows to make them stand out neatly.
/* Style for earned trophies in the help list */
.trophy-item.is-earned {
background-color: @xf-contentHighlightBg;
border-left: 4px solid @xf-borderColorAccent;
opacity: 1;
}
/* Optional: Dull out unearned trophies to emphasize earned ones */
.trophy-item:not(.is-earned) {
opacity: 0.6;
}
Option B: Ribbon / Text Highlight
This appends a custom badge or colors the trophy point counter green when unlocked.
/* Turn the trophy points badge green for awarded trophies */
.trophy-item.is-earned .contentRow-figure {
background: #27ae60 !important;
color: #ffffff !important;
font-weight: bold;
}
/* Highlight the trophy title text */
.trophy-item.is-earned .contentRow-title {
color: @xf-textColorAccent;
}
Option C: Desaturate Locked Trophies (Best for Grid layouts)
If your template uses custom trophy images or icons, this keeps earned trophies in full color while greying out the locked ones. [3, 6]
/* Grayscale unearned trophy icons */
.trophy-item:not(.is-earned) .contentRow-figure img {
filter: grayscale(100%);
opacity: 0.4;
}
/* Full opacity vivid color for earned ones */
.trophy-item.is-earned .contentRow-figure img {
filter: grayscale(0%);
opacity: 1;
}
I can help you adjust the Less variables (like @xf-contentHighlightBg) to precisely match your forum theme colors, or help you add Font Awesome icon indicators to the earned elements. Which would you prefer?
It could be AI shit mind also