XenForo [cXF] Status icon with text

CR LEAKS

CR LEAKS

Administrative
Joined
Mar 25, 2022
Messages
1,272
Reaction score
5,191
Points
113
Credits
19,896
Status icons show us a thread type or just if a thread is sticky, watched, etc. They can be useful.






But we can expand the customization a bit more to have it like this:




As you can see the icon can look like a label with a text. Maybe you can find this useful for your forum. If not, just skip it.

To achieve this just add this code to your extra.less template:



Code:
Please, Log in or Register to view codes content!

To change the text to anything else, just font the content property and edit it. Yes, it is not ideal for multilanguage forums (in that case every language should use its own style and paste different code there).

Depends on all your other settings you might need to adjust and play a bit with the paddings.

As you can see, the question label is a customized status icon for question thread type and Prefix 1 is a built-in thread prefix.

Some more examples of status icons with text and thread prefixes:
 
4,485Threads
10,412Messages
39,631Members
mika67Latest member
Top