XF 1.5 Show Signatures for Guests based on Username

XenBurger

Active member
Is it possible to enable "show signatures to guests" for one user account?

I have a participant advertiser who isn't happy that their signature will be hidden from everyone except those logged-in.

And I don't necessarily want to flip the entire discussion forum to be "visible signatures" either.

Couldn't this be in user-specific permissions too?
 
Major bummer. Would love to have this added to user-based permissions. For advertising purposes this is a big problem. We are going to have a lot of sponsored participants and half their advertising ability is going to be blocked. In fact maybe 80% of it, since only 20% of site users ever actually sign up an account. On a site my size, to enable 70,000 signatures would be a very bad move SEO-wise so I can't just flip it on globally.
 
You can use template modification. :)

First, make sure in setting you set to show signature to guests.

Then, find this on "message" template.

PHP:
<xen:if hascontent="true">
      <div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside><xen:contentcheck>{xen:raw $message.signatureHtml}</xen:contentcheck></aside></div>
 </xen:if>

Replace with
PHP:
<xen:if is="{$visitor.user_id} OR (!{$visitor.user_id} AND in_array({$message.user_id}, array(22, 33, 44, 55)))">
    <xen:if hascontent="true">
        <div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside><xen:contentcheck>{xen:raw $message.signatureHtml}</xen:contentcheck></aside></div>
    </xen:if>
</xen:if>

Where 22, 33, 44, 55 are your advertiser user IDs.

There is cleaner approach, which is checking the advertiser usergroup. But it needs custom helper. :)
 
Top Bottom