XF 2.3 Can I hide user names from view for a user group in one area?

Hoolio

Active member
Licensed customer
Trying to replicate our classifieds on VBulletin, only people that have paid can see who posted listings...

Can I hide user names from view for a user group in one area?

Thank you
 
There's no built-in XenForo feature for this unfortunately. You'd need a template modification, and honestly it gets complicated because you have to hide the username in multiple places (post author, avatar, quoted posts, etc.).
The closest approach is a template modification on post_macros that checks both the forum node ID and the viewer's user group. Something like:
Code:
<xf:if is="$forum.node_id == 42 AND !$xf.visitor.isMemberOf([5])">
    <span class="username">{{ phrase('anonymous') }}</span>
<xf:else />
    <xf:username user="$user" rich="true" />
</xf:if>
Where 42 is your classifieds forum node ID and 5 is the paid user group ID. But you'd also need to hide the avatar, user title, and other identifying info in the same area — that's a lot of template modifications to maintain.
Realistically, this is addon territory. There were a couple of anonymous posting addons ([bd] Anonymous Posting, Anonymous Posting XF 2) but they're both unmaintained now. You might want to check the resource manager for any updated alternatives, or consider commissioning a custom addon for this. It's a niche feature that template mods alone won't handle cleanly.
 
Back
Top Bottom