XF 1.4 Signature still viewable after user upgrade expires

WoodiE

Well-known member
On my forum I have set not allowed regular users to use or edit signatures and then offer a premium user upgrade that allows several added benefits, one of which is the ability to use signatures.

What I've noticed is that if a user upgrades their account, adds a signature and then lets the premium membership expire - the users signature will still remain. Is this expected behavior and if so is there a way to have the signatures removed from the users profile once their upgrade expires, or at least remove it from being viewable unless they have an active membership?

Thanks!
 
This is designed behaviour - the permissions are only checked when editing a signature.

You would require custom development to remove the signatures of users that no longer have permission to use them.

Liam
 
Thanks @Liam W - how about using a Xenforo conditional? If I was to use a conditional to only show if the posting member was a premium member or would that mean the only way to even see the sig was to also be a premium member?
 
Thanks @Liam W - how about using a Xenforo conditional? If I was to use a conditional to only show if the posting member was a premium member or would that mean the only way to even see the sig was to also be a premium member?

I'm not 100% sure - it would depend on whether or not the ismemberof helper requires the full user array...

I'd be interested in contributing to an add-on that deletes or hides signatures & avatars in this scenario. Both are part of my upgrade package.

I'd be interested in creating such an add-on. I might do so, it'll be a free release.

Liam
 
I'd be interested in creating such an add-on.

I too would be interested in contributing to the addon. Avatars is something I let all members use since I hate seeing a sea of "default" avatars but the ability to remove the sig without a premium membership would be great.

In the meantime I'll play around with the conditional's as well. I fear though this would only work if both the member posting and the member viewing was a premium member.
 
I too would be interested in contributing to the addon. Avatars is something I let all members use since I hate seeing a sea of "default" avatars but the ability to remove the sig without a premium membership would be great.

In the meantime I'll play around with the conditional's as well. I fear though this would only work if both the member posting and the member viewing was a premium member.

Start in the message template, find the signature if block, and try the following conditional:

HTML:
{xen:helper ismemberof, $message, <premium group id>}

I'm not sure if the $message variable contains all the needed data though.

Liam
 
Is that not just for signatures though?
The above works for signatures, but about the same principle works for avatars.

Open the message_user_info template and find:

Code:
    <div class="avatarHolder">
       <span class="helper"></span>
       <xen:avatar user="$user" size="m" img="true" />
       <xen:if is="{$user.isOnline}"><span class="Tooltip onlineMarker" title="{xen:phrase online_now}" data-offsetX="-22" data-offsetY="-8"></span></xen:if>
       <!-- slot: message_user_info_avatar -->
     </div>

and replace with such:

Code:
<xen:if is="{xen:helper ismemberof, $user, 1,2,3}">
    <div class="avatarHolder">
       <span class="helper"></span>
       <xen:avatar user="$user" size="m" img="true" />
       <xen:if is="{$user.isOnline}"><span class="Tooltip onlineMarker" title="{xen:phrase online_now}" data-offsetX="-22" data-offsetY="-8"></span></xen:if>
       <!-- slot: message_user_info_avatar -->
     </div>
</xen:if>

Replacing 1,2,3 with the groups you want to only display avatars.
 
Yes it just hides them from view.

I see it also gets rid of the not so nice default no avatar image for the groups that don't have the avatar permission. Bonus!


For the template conditional and you KNOW which groups have access:
Code:
<xen:if is="{xen:helper isMemberOf, $message, 2, 3, 5}">

<!-- signature block goes here... -->

</xen:if>
where 2, 3 and 5 are the user group ids... :)

Where does that code go?
 
@rwm1962 sorry I missed your post :oops:
Check out the template "message" at the very bottom:
Code:
<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
    <div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
</xen:if>
 
Hi - That's fine! Any help is appreciated & I need it more than most I think. So I just paste that & edit user groups where you wrote 'signature block goes here'?
 
Back
Top Bottom