Thank you The code is working, but I forgot a critical thing. All titles belong to the same group "Registered Users". By earning points users should get these user titles, but remain in the same group:
I wanted to add images for each of those user titles by using conditions. The issue here is that if users can change their custom title, the user rank images will then be changed too. If the Newcomer group has 1 star as rank image and the Member group 3 stars, members can decrease their stars by changing their user title to Newcomer and thus, faking their ranks. How can I fix it?
That would work too and will probably be used by me if everything else fails. But I would like to keep every user in the same group if possible to save work. Also I believe a future version of XenForo will provide custom images for user ranks. Then it won't be necessary anymore to make usergroups for each rank.
Allright, I decided to distribute user rank images by trophy points. All I need now is the if condition that checks if a user has reached X points. I couldn't figure out the right code. Help is greatly appreciated
<xen:if is="{$user.user_group_id} == 2 AND {$user.trophy_points} == 1"><p>user rank image</p></xen:if>
User Group 2 is for registered users. This prevents other special usergroups from getting rank images that are supposed to be for normal registered users only.
<xen:if is="{$user.user_group_id} == 2 AND {$user.trophy_points} == 1"><p>user rank image</p></xen:if>
User Group 2 is for registered users. This prevents other special usergroups from getting rank images that are supposed for normal registered users only.