• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Show signatures of some user groups to guests

HenrikHansen

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

Fx, normal users: signatures not shown to guests
premium users: signatures shown to guests
 

Chris D

XenForo developer
Staff member
#3
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.
 

Jake Bunce

XenForo moderator
Staff member
#5
This should do it:

Admin CP -> Appearance -> Templates -> message

Add the red code:

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.
 

snoopy5

Well-known member
#6
This should do it:

Admin CP -> Appearance -> Templates -> message

Add the red code:

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
 

HenrikHansen

Well-known member
#7
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.
 

MsJacquiiC

Well-known member
#8
This should do it:

Admin CP -> Appearance -> Templates -> message

Add the red code:

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.
 

Jake Bunce

XenForo moderator
Staff member
#9
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.
That's correct.
 

Stuart Wright

Well-known member
#10
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?