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

XF 1.2 messagecount and custom field conditionals

#1
So i have Ranks A that i display based on message count by default for all users (using no custom field conditionals).

I want to have Ranks B and Ranks C that i want to display for users, based on what they have selected for the custom field Rank A/Rank B/or Rank C.

How can i do that so all users have Ranks A selected by default and then those who "prefer" Ranks B they can simply change the custom field to display Ranks B for themselves.
 
Last edited:

Brogan

XenForo moderator
Staff member
#2
Depending on exactly what it is you are trying to do, you can edit the template(s) and use this:
<xen:if is="{$user.customFields.field_id}">...</xen:if>
 
#3
Depending on exactly what it is you are trying to do, you can edit the template(s) and use this:
<xen:if is="{$user.customFields.field_id}">...</xen:if>
I am trying to use this if a field is not selected (blank) (to show for users who have not selected the field by default) and if it is selected show different image.

So

Ranks A (by default, even if not selected any user field OR by selecting Ranks A)
Ranks B (by selecting Ranks B)
Ranks C (by selecting Ranks C)
 

Brogan

XenForo moderator
Staff member
#4
Code:
<xen:if is="{$user.customFields.field_id}">
Your code for rank B or rank C here {$user.customFields.profile_field_id}
<xen:else />
Your code for rank A
</xen:if>