• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Display message to user when hit ad limit for group

ValidHorseChewer

New Member
CAS Premium
LD Premium
You can set a limit on the number of open ads per user group.

If the user has reached this limit, currently, it just hides the "Post Ad" button link.

I would like to be able to display a message to the user to tell them that they have reached the limit, and pretty please, would they like to upgrade?

xa_cas_category_view has this code:

<xf:pageaction if="$category.canPostAd()">
<xf:button href="{{ link('cas/categories/add', $category) }}" class="button--cta" icon="add">
{{ $category.content_term ? phrase('xa_cas_post_x_ad', {'term': $category.content_term|to_lower}) : phrase('xa_cas_post_ad') }}
</xf:button>
</xf:pageaction>

I am wondering if there is a way to test in the template whether or not the user has reached their groups ad limit.

I've dumped $cateogory, $xf.visitor and $xf.options. But I don't think they have the info I need. I have bozz eyes, they're big dumps!
 
Back
Top