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

What am I getting wrong with this basic code?

#1
Code:
<xen:if is="{$message.position} == {$xenOptions.messagesPerPage} - 1 OR {$message.position} == {$thread.reply_count}">
   <!--AD CODE HERE -->
</xen:if>
I'm aware the above will show an advert underneath the last post of each page. I am trying to modify it to only show to the visitors usergroup, using {$visitor.user_id} but wherever I place it, it causes a line code error and the threads do not display.

Where am I messing up? All help is greatly appreciated.
 

Brogan

XenForo moderator
Staff member
#2
If you are having trouble adding it to the xen:if, you can wrap the whole thing in another xen:if.

Code:
<xen:if is=...
<xen:if is=...
...
</xen:if>
</xen:if>