XF 1.5 IF / Conditions in XenForo?

vFranky

Active member
Hello,

I came from vBulletin. There we have conditional code in the templates like this, which I use to display advertisments (to not logged in users) oder not (to logged in users) ==>

Code:
<if condition="!in_array(THIS_SCRIPT, array('register','login'))">
     <if condition="$vbulletin->userinfo['userid']">

or to do a postcount ==>

Code:
  <if condition="in_array($post['postcount'], array(3))">

Is there any option to do the same in XenForo? Because I am using Audentio UI.X style with [AD] Monetization and want to use something like postcount there to position add banner in each 3rd oder 5th posting in a thread.

Any tips are welcome, thank you very much.

Kind regards,
Frank
 
Code:
<xen:if is="!{$visitor.user_id}"> Show this to guests only </xen:if>


Not sure if message count was “posts“, can't look it up on my mobile. Maybe someone else knows or you have to try around a little/wait until later.
Code:
<xen:if is="{$visitor.posts} <= 3"> Show to everyone with not more[ than 3 posts</xen:if>
 
Top Bottom