XF 2.1 Would this work for a "reaction ladder" with images?

Brad Padgett

Well-known member
HTML:
<xf:if is="$xf.visitor.reaction_count == 50">  <img src="path/to/img/"> </xf:if>

<xf:if is="$xf.visitor.reaction_count == 100">  <img src="path/to/img/"> </xf:if>

<xf:if is="$xf.visitor.reaction_count == 150">  <img src="path/to/img/"> </xf:if>

For example if someone has 50 reactions I could add half a star, if they had 100 a full star... etc until I have so many star images. Would this work? If I'm doing it wrong do you have any idea how I could achieve this with a different function. Should I be using $user instead? Thanks for any help
 
It depends on the context and what you're trying to do.

In general, $visitor is the record for the current logged in user, $user is the record being processed/viewed.
 
It depends on the context and what you're trying to do.

In general, $visitor is the record for the current logged in user, $user is the record being processed/viewed.

I found this tutorial for Xenforo 1. What would be the equivalent to this on Xenforo 2 for reactions or trophy points?

 
Last edited:
Top Bottom