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

XF 1.2 Add class to threads over a certain amount of replies

Case

Active member
#1
Hi

When viewing a forum, I'd like to add a class to the thread list item if that thread has over x amount of replies.

eg.

<li id="thread-1" class="discussionListItem visible extraClass" data-author="User">

Is this possible?

Thanks
 

katsulynx

Well-known member
#2
I'd say it is possible by using the Xenforo Conditional Statements and the Template Modification System through setting the Forum to debug mode.

You need to do the following:
1. Set the forum to debug mode
2. Search the Template that contains your part of information
3. Open the TMS, add the appropriate statement and close
4. You're done
 

Case

Active member
#3
I'd say it is possible by using the Xenforo Conditional Statements and the Template Modification System through setting the Forum to debug mode.

You need to do the following:
1. Set the forum to debug mode
2. Search the Template that contains your part of information
3. Open the TMS, add the appropriate statement and close
4. You're done
Thanks for the reply. I couldn't see a statement that refers to number of replies though. Any idea?
 

katsulynx

Well-known member
#4
You will need to use a simple comparrison variable<-> numeric value. You will find the appropriate value near the spot where you want to add your statement.

I'm short on time at the moment, but maybe I can have a look for you later.