Change the color of reply count based on the number of reply

turtlefloating

New member
Registered
Joined
Jun 4, 2021
Messages
2
Points
1

Reputation:

Dear support,

Could you help to change the color of reply count based on the number of reply

1622906956738.png


For example:
- If the number of reply is from 0 to 50, color: black
- if the numer of reply is from 51 to 100, color: blue
- if it is more than 100, color: red,

Thank you so much in advanced.
 

Jace

Collaborate
Collaborate
Registered
Joined
Aug 9, 2020
Messages
169
Points
73

Reputation:

HTML:
<xf:if is="$thread.reply_count|number < 50">

    <div style="color: black;"></div>

<xf:elseif is="$thread.reply_count|number > 50"/>

    <div style="color: blue;"></div>

<xf:elseif is="$thread.reply_count|number > 100"/>

    <div style="color: red;"></div>

</xf:if>
 

hvkhanh90

Member
Registered
Joined
Jun 26, 2019
Messages
7
Points
13

Reputation:

HTML:
<xf:if is="$thread.reply_count|number < 50">

    <div style="color: black;"></div>

<xf:elseif is="$thread.reply_count|number > 50"/>

    <div style="color: blue;"></div>

<xf:elseif is="$thread.reply_count|number > 100"/>

    <div style="color: red;"></div>

</xf:if>
JaceWhere should I insert ?
 

thuylinh

Active member
Registered
Joined
Feb 5, 2020
Messages
36
Points
18

Reputation:

I'm looking forward to more detailed instructions because I haven't been able to do this on xenforo 2.2 yet. Thanks you!
 
Top