Turn "Thread prefixes" into a powerful content management tool for XenForo 2.3
Most of us know Thread Prefixes as pretty little color labels in front of the title, for example: [Discussion], [Q&A]. But if you just stop there, you are missing out on 90% of the power of this tool. When used strategically, prefixes are not only decorative, but also an extremely effective content classification, filtering, and management system for both administrators and members.
This article will guide you through advanced techniques to turn simple labels into an indispensable content management tool for your forum.
Step 1: Rethink Prefixes - Build a logical system
Before creating, make a plan. Don't make prefixes spontaneously. Let's group them according to their intended use.- Groups by Status: Very useful for support categories and error reports. For example:
[Pending]
,[Under review]
,[Resolved]
,[Refuse]
. - Groups by Content Type: Helps classify articles in a large category. For example:
[Instructions]
,[News]
,[Reviews]
,[Free Discussion]
. - Group by Level: Suitable for knowledge sharing forums. For example:
[Basic]
,[Advanced]
,[Advanced]
.
- Groups by Status: Very useful for support categories and error reports. For example:
Step 2: Configure Prefix in AdminCP
Now, go to AdminCP to realize your plan.Create a Prefix group
- Access AdminCP > Forums > Thread prefixes.
- Click + Add prefix group.
- Name the group, for example, "Error Statement" or "Article Classification". Creating groups helps you manage relevant prefixes easily.
Create Prefixes and Customize CSS
- In the group you just created, click + Add prefix.
- Title: Enter a prefix name, for example:
Resolved
. - Display styling: This is where you make a difference. Instead of choosing available classes, choose Other, using custom CSS class name.
- CSS class name: Give a name that is easy to remember, for example
prefix--solved
. - Repeat for other prefixes.
Customize colors for Prefixes
- Access AdminCP > Appearance > Style you are using > Templates and open the template extra.less.
- Add the following CSS code at the end of the file to define colors for the classes you created:
CSS:.prefix.prefix--solved { color: white; background-color: #4caf50; // Xanh lá cây border-color: #388e3c; } .prefix.prefix--unsolved { color: white; background-color: #f44336; // Đỏ border-color: #d32f2f; }
- Save. Now your prefixes have distinct and striking colors.
Step 3: Apply Prefix to Forum and Required Requirements
This is the step of turning the prefix into a true management tool.
- Access AdminCP > Forums > Nodes and select the category you want to apply to (for example, "Error & Support Report").
- In section Available prefixes, select the prefixes or groups of prefixes you want to allow use in this category.
- Important: Tick the box Require users to select a prefix.
- Save.
Step 4: Instruct Members to use the Prefix Filter
The feature is here, now you need to show users how to exploit it. XenForo's interface already has a powerful filter built in.
- While viewing a category, at the top of the topic list, there is a button named Filters.
- When clicked, a menu will drop down. In item Prefix, users can tick one or more prefixes they want to see.
- For example, a support member may simply filter for prefixed topics
[Pending]
to quickly find problems that need to be handled.