vb4 conditions

Discussion in 'vBulletin' started by gauravgrt, Jun 1, 2010.

  1. #1
    Hello

    I want to show a "button" to guests of "particular forum" only.

    I tried this

    <vb:if condition="in_array($forum['forumid'], array(4,12,36))">
    (it has to show button to forum with id's 4 , 12 ,36.

    But it is not working in vb4 at all.The guests condition is working though.(show[guests]).

    Similar condition in vb3 is working properly.

    Help appreciated.

    Regards
     
    gauravgrt, Jun 1, 2010 IP
  2. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Last edited: Jun 1, 2010
    ChopSuey, Jun 1, 2010 IP
  3. gauravgrt

    gauravgrt Peon

    Messages:
    2,035
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    0
    #3
    m placing the code in FORUMHOME template.

    I've used the same condition , still its not working :(
     
    gauravgrt, Jun 1, 2010 IP
  4. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Add it to forumdisplay template :)
     
    ChopSuey, Jun 1, 2010 IP
  5. gauravgrt

    gauravgrt Peon

    Messages:
    2,035
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    0
    #5
    its not working :(
     
    gauravgrt, Jun 1, 2010 IP
  6. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you want you can post your code here and tell me where exactly you want it. &what code you want showing.
     
    ChopSuey, Jun 2, 2010 IP
  7. gauravgrt

    gauravgrt Peon

    Messages:
    2,035
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    0
    #7
    In forumdisplay

    {vb:raw footer}
    <vb:if condition="$show['guest']">
    <vb:if condition="in_array($forum['forumid'], array(50,51,52,53,54,58,59,60,61,62,63,64,65,66,72 ,79,80,81,82,83,84,85,89,97,98,99,100,101))">
    Show Pic / ad / button
    </vb:if>
    </vb:if>
     
    gauravgrt, Jun 2, 2010 IP
  8. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #8
    <vb:if condition="$show['guest']" AND "in_array($forum['forumid'], array(1,2,3))">
    Show Pic / ad / button
    </vb:if>
     
    Abhik, Jun 3, 2010 IP
  9. gauravgrt

    gauravgrt Peon

    Messages:
    2,035
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    0
    #9
    "And" worked :)

    Thanks a lot :D
     
    gauravgrt, Jun 3, 2010 IP