XF 1.4 Differentiate between two groups of users quickly

JackieChun

Well-known member
I need to be able to differentiate quickly between paid and unpaid posters on the forum and see which member belongs to which group directly from the thread view. It doesn't have to be a special title or anything like that, just a visible tag (like an icon or an asterisk) for either or both groups.

What is the quickest and most efficient way to do this?
 
Try placing this in the template wherever you want it:

Code:
<xen:if is="{$visitor.is_admin}">Paid</xen:if>

You can also phrase it, but I recommend prefixing it with your forum's initials so you know it's custom:

Code:
<xen:if is="{$visitor.is_admin}">{xen:phrase initials_paid}</xen:if>
 
I spaced out.

You'll need two conditionals, I think--the admin one above and another one. You already have Unpaid and Paid user groups, I presume. One conditional will show Paid to everyone in the latter user group (use the user group ID) and the other one will show that only to admins--wrap the user group one within the admin one.

Have a look at @Brogan's Conditional Statements resource for help.
 
This is likely the most complete solution:

Code:
<xen:if is="{xen:helper ismemberof, $visitor, 3, 4}">
    <xen:if is="{xen:helper ismemberof, $user, 9, 10}">
        PAID MEMBER
    </xen:if>
</xen:if>

If you were to add that to, e.g. the message_user_info template, e.g. next to the username or user title (you may need to adjust the styling accordingly), that would show the words PAID MEMBER next to users who are in user group 9 or 10 and that would only appear to visitors in user group 3 or 4.
 
Thank you @Chris D and @Brogan. So I would need to create a new group and manually add all the paid members to this group as a secondary membership, is that correct?

Brogan, which add-on are you using in your screenshots? Are you using an add-on instead of modifying the template to prevent these changes from being overwritten when the style is updated?
 
Back
Top Bottom