Thanks for your reply @Brogan.There is no way of targeting a specific resource using conditional statements or CSS.
I would recommend adding the content to the resource description.
<xen:if is="{xen:helper ismemberof, $visitor, 5}">
{xen:raw $content}
<xen:else />
<xen:if is="{$visitor.user_id}">
Sorry your are not in the 5 usergroup
<xen:else />
<a href="{xen:link register}">{xen:phrase register}</a> or <label for="LoginControl"><a href="{xen:link login}">Login</a></label> to view Spoiler content!
</xen:if>
37. How can I show content to members with more than x posts?
<xen:if is="{$visitor.message_count} > x">
This content will show to members with more than x posts
</xen:if>
<xen:if is="{$user.message_count} > 50">
This content will only apppear in the posts of those members who have more than 50 posts.
</xen:if>
You will have to check if that is available in the template you are trying to use it in.
Use this guide to dump the user record and see what's available: https://xenforo.com/community/resources/using-variables-in-templates.5034/
If there is a user group linked to the upgrade, you can use the standard user group check - number 4 in the guide.Is there a way to check if a user has a certain upgrade?
<xen:if is="{$message.attach_count} > 0">Is there a conditional to determine if a post contains an attached image?
<xen:if is="{$post.position} == 0 AND {$thread.sticky} == 1">
Show content INSIDE first post of sticky thread
</xen:if>
array(42) {
["thread_id"] => int(123)
["node_id"] => int(7)
["title"] => string(54) "Title"
["reply_count"] => int(0)
["view_count"] => int(457)
["user_id"] => int(12345)
["username"] => string(14) "Author"
["post_date"] => int(1483995629)
["sticky"] => int(1)
<xen:if is="{$post.position} == 0 AND {$thread.sticky} == 1">
<div style="float:right;"><img src="/sticky-graphic.png"></div>
</xen:if>
{xen:raw $message.messageHtml}
We use essential cookies to make this site work, and optional cookies to enhance your experience.