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

Why won't this condition work X_X

Discussion in 'XenForo Questions and Support' started by Wuebit, Jul 4, 2011.

  1. Wuebit

    Wuebit Well-Known Member

    HTML:
    <xen:if is="{$post.position} == 0 AND  !{$visitor.user_id} AND !{$message.conversation_id}">
    
    Was working last time I used it but now it will not work.
    Did something change?

    Cheers
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It's working for me.
    What are you expecting it to do?

    I'm not sure you need the last condition as it will only apply to guests anyway.
     
  3. Wuebit

    Wuebit Well-Known Member

    What is it doing for you?
    For me it just will not show "test" after the first post on every thread (page 1,2,3,etc..)
    The last condition to to stop it showing in the conversations.

    Template ad_message_below

    HTML:
    <xen:hook name="ad_message_below" />
    <xen:if is="{$post.position} == 0 AND  !{$visitor.user_id} AND !{$message.conversation_id}">
    <Code>
    </xen:if>
    
    
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    If you want it on every page then you need to use this:
    Code:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND  !{$visitor.user_id}">
    As it's only shown to guests then you don't need the conversation condition as you have to be logged in to read them.
     
  5. Wuebit

    Wuebit Well-Known Member

    So it did change also that does not work still.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    It's working for me.
    It shows after the first post on every page when not logged in.

    The conditional has always been like that for first post on every page.
     
  7. Wuebit

    Wuebit Well-Known Member

    I'll play some more later on cheers anyway man.
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Double check you're editing the correct style, it's an easy mistake to make.

    I've done it myself enough times :rolleyes:
     
    Vodkaholic likes this.
  9. Wuebit

    Wuebit Well-Known Member

    haha am out of touch Sigh... yea they both work fine :whistle:
     

Share This Page