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

XF 1.4 Adding Customer Border for a Rank

Daphonic

Active member
#1
My end goal is this = http://imgur.com/PcybLjM The blueish border around Sarahmon's Avatar.

I figured this is possible with the Below Code

.message.staff .messageUserInfo .helper {
display: block;
position: absolute;
top: -6px;
left: -6px;
content: "";
background: url("@imagePath/xenforo/icons/staff-ribbon-posted.png") no-repeat transparent;
height: 107px;
width: 107px;

}
This code is used to put Staff banner on Peoples Avatar. What I'd like to try and do is Members who Obtain Patron Status (upgraded account/donations) will get a cool banner around their avatar to show they are helping keep the community going and funded.

I'm slowly figuring out what I needed to do, but I'm not sure what I need to do to this code above. The Group that the member joins once they upgrade their account is "Patron Status" so that's the group id like the border to be linked to. Would anyone mind helping me out with this?
 

Daphonic

Active member
#3
Thank you for looking, after reading most of those posts, looks like they are having errors. Also the amount of code they use is crazy.. I would think the above code work would. I'm just not sure what I put in the ".message.staff .messageUserInfo .helper {" for what i want to do, everything i try doesn't work.
 

DEZero

Well-known member
#4
I'll work on something tonight, if I get it down I'll post the code and results. Unless someone else figures it out before then.
 

batpool52!

Well-known member
#6
Under template
Find:
HTML:
<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
Replace with:
HTML:
<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if $message.isIgnored, ignored} {xen:if {xen:helper ismemberof, $message, 69}, 'if_you_know_what_i_mean_hehe'}" data-author="{$message.username}">
In Extra.CSS
Code:
.message.if_you_know_what_i_mean_hehe .messageUserInfo .helper
{
    display:    block;
    position:   absolute;
    top:        -6px;
    left:       -6px;
    content:    "";
    background: url("@imagePath/xenforo/icons/staff-ribbon-posted.png") no-repeat transparent;
    height:     107px;
    width:      107px;
}
======================
Change:
69
In:
Code:
{xen:if {xen:helper ismemberof, $message, 69}
With:
The user group id to which users are promoted after purchasing the user upgrade.

Change:
Code:
if_you_know_what_i_mean_hehe
To the class name you prefer:
Whatever you want :p
 

Daphonic

Active member
#8
@batpool52! sorry took me so long to get back to you, but What Template Am I looking under for
<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}"> ?
 

Daphonic

Active member
#17
Ahh, Understood. I still need to fix the Site on mobile all around :( Once I'm 100% finished with site on normal. I think ill work on the mobile, but thank you for the info sir.