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

Implemented CSS Classes for Thread Prefixes

John L.

Well-known member
#1
This is a suggestion for a feature that is not out yet so you may have this already implemented for 1.1. But when a prefix is created and put on a thread I would like to see that thread row in the thread list have a css class applied to it that matches the prefix. For example:

I have a prefix created called "in progress". I would like to have a css class applied to the thread listing called "in-progress" so that I can use CSS to apply special styles to that listing. Thank you!
 

Kier

XenForo Developer
Staff member
#7
I have a prefix created called "in progress". I would like to have a css class applied to the thread listing called "in-progress" so that I can use CSS to apply special styles to that listing. Thank you!
In the current implementation, threads with a prefix have an extra CSS class of prefixN applied to the li.discussionListItem, where 'N' is the numeric ID of the thread prefix, therefore if your 'in progress' prefix had prefix_id = 321, you would be able to create a CSS class called .prefix321 and apply your custom styling to that. XenForo itself does not make use of that class.
 

James

Well-known member
#8
In the current implementation, threads with a prefix have an extra CSS class of prefixN applied to the li.discussionListItem, where 'N' is the numeric ID of the thread prefix, therefore if your 'in progress' prefix had prefix_id = 321, you would be able to create a CSS class called .prefix321 and apply your custom styling to that. XenForo itself does not make use of that class.
And just to ask, are these prefixes clickable (so we can filter a forum to show only a specific prefix - like vB's &prefixid=x query string)?
 

John L.

Well-known member
#9
In the current implementation, threads with a prefix have an extra CSS class of prefixN applied to the li.discussionListItem, where 'N' is the numeric ID of the thread prefix, therefore if your 'in progress' prefix had prefix_id = 321, you would be able to create a CSS class called .prefix321 and apply your custom styling to that. XenForo itself does not make use of that class.
I like it, makes it more flexible for styling specific prefixes. Thank you!