if conditions help please

Discussion in 'vBulletin' started by Dekker, Nov 27, 2005.

  1. #1
    im currrently using this if condition to display an ad after the 5th post on each page

    <if condition="$post[postcount] % $vboptions[maxposts] == 5">

    but i'd like to combine it with this <if condition="$post['islastshown']">

    so it'd be if it's the 5th post and NOT the last one being shown, then display it

    how would I do so?
     
    Dekker, Nov 27, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Couldn't you just use an AND statement?

    <if condition="($post[postcount] % $vboptions[maxposts] == 5) && !$post['islastshown']">
     
    digitalpoint, Nov 27, 2005 IP
  3. Dekker

    Dekker Peon

    Messages:
    4,185
    Likes Received:
    287
    Best Answers:
    0
    Trophy Points:
    0
    #3
    that works perfectly, thanks again shawn :)

    (i dont know how to code :p i just used them from the vbulletin tutorial and changed the numbers)
     
    Dekker, Nov 27, 2005 IP