Liam W in memoriam 1998-2020 Mar 23, 2014 #1 Is there a template variable for the usergroups a member is in? I want to show ads to everyone except members of this usergroup... Liam
Is there a template variable for the usergroups a member is in? I want to show ads to everyone except members of this usergroup... Liam
H HWS Well-known member Mar 23, 2014 #2 Code: <xen:if is="!{xen:helper ismemberof, $visitor, X}"> CONTENT </xen:if> Replace X with your user group and CONTENT with your content. Upvote 0 Downvote
Code: <xen:if is="!{xen:helper ismemberof, $visitor, X}"> CONTENT </xen:if> Replace X with your user group and CONTENT with your content.
P Paul B XenForo moderator Staff member Mar 23, 2014 #3 All explained here: http://xenforo.com/community/resources/conditional-statements.1604/ Upvote 0 Downvote
Liam W in memoriam 1998-2020 Mar 23, 2014 #4 Ah yes, I remember now Thanks @HWS and @Brogan Liam Upvote 0 Downvote
R reohh Member Mar 23, 2014 #5 Create a custom template and put this code in: Code: <xen:if is="{$visitor.user_group_id} != 3"> <div style="text-align: center; padding: 7px;"> <!--INSERT ADSENSE CODE HERE --> </div> </xen:if> This will show the ad for anyone not in usergroup 3 Now in your PAGE_CONTAINER or wherever you want the ad to appear insert this code: Code: <xen:include template="NAME_Of_CUSTOM_AD_TEMPLATE" /> Upvote 0 Downvote
Create a custom template and put this code in: Code: <xen:if is="{$visitor.user_group_id} != 3"> <div style="text-align: center; padding: 7px;"> <!--INSERT ADSENSE CODE HERE --> </div> </xen:if> This will show the ad for anyone not in usergroup 3 Now in your PAGE_CONTAINER or wherever you want the ad to appear insert this code: Code: <xen:include template="NAME_Of_CUSTOM_AD_TEMPLATE" />
P Paul B XenForo moderator Staff member Mar 23, 2014 #6 No need to use custom templates. There are ad_ templates built in. Upvote 0 Downvote