This is the key part: {xen:if {$thread.user_post_count}, ' memberPrticipatedThread'} {xen:if '{xen:helper ismemberof, $thread, XXX}', ' staffThreads'} {xen:if '{xen:helper ismemberof, $thread, YYY}', ' VIPThreads'}"
.
The evaluation is inline with a CSS class applied.
My resource does something very similar using XF2 syntax: {{ $message.user_id == $xf.visitor.user_id ? 'ctaConversationMessageSelf' : 'ctaConversationMessageOther' }}
.