Show signatures of some user groups to guests

HenrikHansen

Well-known member
Show signatures of some user groups to guests, possible?

Fx, normal users: signatures not shown to guests
premium users: signatures shown to guests
 
Hmm, it would be interesting.

Ultimately, what would the benefit be?

Is this so links in their signatures would be followed by search engines? If so I have a solution for that.
 
This should do it:

Admin CP -> Appearance -> Templates -> message

Add the red code:

Rich (BB code):
		<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
		<xen:if is="{$visitor.user_id} OR {xen:helper ismemberof, $message, 4}">
			<div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
		</xen:if>
		</xen:if>

You need to specify the group_id of the privileged group.
 
This should do it:

Admin CP -> Appearance -> Templates -> message

Add the red code:

Rich (BB code):
Cool. I will try that one... Thanks
		<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
		<xen:if is="{$visitor.user_id} OR {xen:helper ismemberof, $message, 4}">
			<div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
		</xen:if>
		</xen:if>

You need to specify the group_id of the privileged group.

cool, I will try that one later... Thanks
 
Hmm, it would be interesting.

Ultimately, what would the benefit be?

Is this so links in their signatures would be followed by search engines? If so I have a solution for that.

Chris, the benefit would be to make some benefits to premium users, fx above 100 posts, to make their signature shown,
even if makes some SEO noise. I guess that would be smaller that if signature is shown for all.
 
This should do it:

Admin CP -> Appearance -> Templates -> message

Add the red code:

Rich (BB code):
<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
<xen:if is="{$visitor.user_id} OR {xen:helper ismemberof, $message, 4}">
<div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
</xen:if>
</xen:if>

You need to specify the group_id of the privileged group.

I'm still in the process of learning XF conditionals... So thanks for this share Jake :)
Quick question - can this conditonal be 'expanded' to include more than one usergroup like:

Code:
<xen:if is="{$visitor.user_id} OR {xen:helper ismemberof, $message, 3,4,5}">

Thanks,

J.
 
I have a question about showing signatures of certain usergroups to guests. Will the extra noise of some signatures in the thread_view page be detrimental to our search engine rankings?
 
Top Bottom