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

XF 1.4 Signature still viewable after user upgrade expires

WoodiE

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

Liam W

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

WoodiE

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

rwm1962

Active member
#4
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.
 

Liam W

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

WoodiE

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

Liam W

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

Mr. Goodie2Shoes

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

EDIT: got ninja'd :(
 

WoodiE

Well-known member
#13
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.
 
#14
I would like to contribute if we can create an addon, I would like to create upgrades for the future to let the user be able tu use avatar and sig's
 

rwm1962

Active member
#17
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?
 
#19
@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>
 

rwm1962

Active member
#20
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'?