Make custom user banners in Xenforo

Sameer Memon
Sameer Memon
3 Min Read
- Advertisement -

What makes a forum more interesting? Their customization. What do you have extra for the forum users? Badges? Animations? Trophies? Well, these things motivate users to work for it. Out of many things, badges, trophies, and banners are the most liked features by users. Today we will learn how to make custom user banners for users and assign them to particular groups.

Below are the sample users with custom user banners.

Custome user banners in Xenforo

If you are wondering how I made the username like that then you can check this post to make animated username names or this to make a rainbow effect username

Let’s start with banners now:

1

Add banner classes entry in the banner template

here you can add multiple banners

Firstly you need to add your banner entry inside the banner template. For this Go to Admin Panel>Apperance>Template> search for app_user_banners.less

app user banners.less phrases in

Click to edit.

- Advertisement -

Now scroll down until you find the below codes.

These are the codes that define the banner’s name, colors, and border color.

default user banners codes entries

From userbanner–red to userbanner–orange are the default banner you see while customizing groups.

Now for custom banners add codes below the orange banners before the closing bracket at line no. 59. (see below image)

custom user banner entry in

Name your banner code something that will help you to remember it, for eg I am making a banner for admins, so I will name it as .userbanner–admin. Similarly, for demos, I am adding demo, demo1, etc. keep .m-userBannerVariation as it is.

Now coming to the brackets, the first value defines the Text color of the banner, 2nd value defines the background color of the banner and 3rd value is for the border color of the banner. (You can use hex code or a simple color name)

- Advertisement -

Click Save when done.

2

Assign banners to groups

We have now created the custom banners, now let’s assign them to groups.

Go to Groups & permissions>User groups and select the group you want to assign the banner to. If you haven’t created any Groups yet, follow this post to create custom groups and add users to the group.

For the tutorial, I am using the user group “Family”. Click to edit the group.

user groups in

Under User banner styling, check the “other, using custom CSS class name“. Enter the class name of the banner we just designed in above step. Only add the name.(No fullstop)

Click Save.

- Advertisement -
custom banner fr user groups

All done. Now add your users to this new group, and check how the banner looks.

You can also add symbols to user banners.

- Advertisement -
Follow:
Sameer Memon is a passionate writer with 3 years of experience in Blogging. With a strong background in Blogs, SEO, and Social Media Marketing, Sameer has been creating engaging content on various topics for a wide range of clients. As a dedicated and driven individual, Sameer takes pride in delivering well-researched and thoughtfully written articles that provide readers with valuable insights and information. He is constantly striving to stay up-to-date with the latest industry trends and techniques to produce content that is not only informative but also engaging and easy to read. When Sameer isn't busy writing, he enjoys gaming. He also loves to explore new places to gain fresh perspectives and inspiration for his writing. If you're interested in learning more about Sameer and his work, you can follow him on social media platform at give handles.