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

How to let the users know theirs subscription ended

Discussion in 'XenForo Questions and Support' started by AndreaMarucci, May 9, 2011.

  1. AndreaMarucci

    AndreaMarucci Well-Known Member

    My forum is a pay one but unfortunately XF doesn't send an email telling the user that his subscription is ended so the user find hisself without permission to write and send an email to me asking why.

    I need a suggestion. How can I tell a user that his subscription is ended so that he can pay to restore the permissions?

    Thank you very much!
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You will need an add-on for this which you could then tie in to a new cron task.

    As your forum is a pay forum though, surely the users know how long they purchased a subscription for and when it's going to end?
    In that respect it's no different to any other fixed duration subscription - the onus is till on the user to renew it.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You could also use a template condition to display a message on the forum:

    http://xenforo.com/community/threads/usergroup-checking-in-the-templates.9447/

    For example:

    Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

    Add this code (where X is the user_group_id of the subscriber group):

    Code:
    						<xen:if is="!{xen:helper ismemberof, $visitor, X}">
    						<div class="importantMessage" style="text-align: left; padding: 10px;">
    							MESSAGE FOR USERS WHO ARE NOT IN GROUP X
    						</div>
    						</xen:if>
    
    as shown below:

    Code:
    						<xen:if is="{$isAwaitingEmailConfirmation}">
    							<p class="importantMessage">
    								{xen:phrase your_account_is_currently_awaiting_confirmation_confirmation_sent_to_x, 'email={$visitor.email}'}<br />
    								<a href="{xen:link account-confirmation/resend}" class="OverlayTrigger">{xen:phrase resend_confirmation_email}</a>
    							</p>
    						</xen:if>
    						</xen:hook>
    						
    						<xen:if is="!{xen:helper ismemberof, $visitor, X}">
    						<div class="importantMessage" style="text-align: left; padding: 10px;">
    							MESSAGE FOR USERS WHO ARE NOT IN GROUP X
    						</div>
    						</xen:if>
    
    						<xen:include template="ad_above_top_breadcrumb" />
    
    The result:

    Screen shot 2011-05-09 at 9.29.23 AM.png
     
    Brogan likes this.
  4. AndreaMarucci

    AndreaMarucci Well-Known Member

    @Brogan Thanks but my users always forgot when the subscription ended so they prefer to ask me what happen and why they doesn't see anymore all the forums...

    @Jake. This can be the solution without installing a specific addon. Thank you very much!!!
     
  5. AndreaMarucci

    AndreaMarucci Well-Known Member

    Just a question Jake. My pay usergroup is 12 but I've also an admin (me) that's in group 3 and some moderators that are in group 4. How can I modify the code so the message does not appear also to group 3 and 4?
     
  6. AndreaMarucci

    AndreaMarucci Well-Known Member

    I've tried this one
    Code:
    <xen:if is="!{xen:helper ismemberof, $visitor, 12} or !{xen:helper ismemberof, $visitor, 3} or !{xen:helper ismemberof, $visitor, 4}">
    <div class="importantMessage" style="text-align: left; padding: 10px;">
    MESSAGE for all the users but not for the users in group 3, 4 and 12.
    </div>
    </xen:if>
    but does not work since I'm in UG 3 and the message appear also to me...

    Am I doing something wrong?
     
  7. AndreaMarucci

    AndreaMarucci Well-Known Member

    This one works
    Code:
    <xen:if is="!{xen:helper ismemberof, $visitor, 12} AND !{xen:helper ismemberof, $visitor, 3} AND !{xen:helper ismemberof, $visitor, 4}">
    <div class="importantMessage" style="text-align: left; padding: 10px;">
    MESSAGE.
    </div>
    </xen:if>
     
    Jake Bunce likes this.
  8. ragtek

    ragtek Guest

    Hm, IMHO it wouldn't be hard to create a add-on sending a mail to the ending users.

    Interested in such a add-on or not?*g*
     
    Markos likes this.
  9. AndreaMarucci

    AndreaMarucci Well-Known Member

    Thanks ragtek. I'm surely interested and I think I'll not be the only one...
     
  10. Bellinis

    Bellinis Active Member

    I'd be interested in this as well! :)
     

Share This Page