XF 1.4 IF condition to shows x banner to usergroups?

Okenyon

Active member
Hey all, I don't code so kindly write the code for me if you'd be so kind,

Is there a way to serve banner X to normal users, but banner Y if you're in a certain user group?

By banner I mean an adbanner just using templates and HTML.
 
Thank you, i've just had a read through but my head goes missing on stuff like this, if anyone would be so kind to show me the exact code to show a banner to different usergroups, thank you.
 
Thank you, i've just had a read through but my head goes missing on stuff like this, if anyone would be so kind to show me the exact code to show a banner to different usergroups, thank you.
4. How can I show content to a specific user group?
<xen:if is="{xen:helper ismemberof, $visitor, x}">
This content will show to members of user group x
</xen:if>

Rich (BB code):
<xen:if is="{xen:helper ismemberof, $visitor, x, y, z}">
insert the code for your banner here
</xen:if>

x, y, z = replace with a comma-separated list of the usergroups you want to show the banner to (e.g. 5, 12, 19).
 
Rich (BB code):
<xen:if is="{xen:helper ismemberof, $visitor, x, y, z}">
insert the code for your banner here
</xen:if>

x, y, z = replace with a comma-separated list of the usergroups you want to show the banner to (e.g. 5, 12, 19).

Thank you @James however what if I wish to show one banner to all uaergroups and another to one specific user group?
 
Thank you @James however what if I wish to show one banner to all uaergroups and another to one specific user group?
Combine an if-else:
Rich (BB code):
<xen:if is="{xen:helper ismemberof, $visitor, x, y, z}">
insert the code for the specific usergroup(s) here
<xen:else />
insert the code for everyone else here
</xen:if>
 
Top Bottom