XF 2.0 Custom Thread Prefix

picom

Active member
Hi all, just looking for any advice on creating a custom thread prefix with CSS.

Is it the same setup as 1.5 or do you need to do something different with 2.0?

Thanks
 
Strange, it should. Try other names, for example "myprefix1" or something. So replace in extra.less .myprefix1 and in the prefix css box myprefix1
 
In edit prefix

label label--solved

In extra.less

Code:
.label.label--solved {
    color: #0d9a0d !important;
    background: #fff !important;
    border-color: #2cb12c !important;
}
 
You don't have to use "label--". So that this won't be complicated for you, try doing this. Or just do this if label just isn't really working for you.

Create a new css class with the same attribute as .label. In this example, badge.

.badge {
background: #000;
color: #fff;
border: 1px solid red;
}

And then the next ones will be your customs. So if you're doing Administrator.

.Administrator {
background: red;
color: yellow;
border-color: pink;
}

In your usergroups, just put "badge Administrator". Without the quotes. That should show up. If it won't show up, hard refresh your browser. It could be just a cache issue.
 
Back
Top Bottom