IF conditional help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChriSsY
    Senior Member
    • Mar 2002
    • 106

    IF conditional help

    Anybody tell me what im getting wrong in the following IF statement?

    <if condition="in_array($foruminfo[forumid],array(30)) AND $post[postcount] == 1 AND !$bbuserinfo[userid]">

    Im wanting to display image X in forumID 30 after the 1st post to guests only
  • Jose Amaral Rego
    Senior Member
    • Feb 2005
    • 11058
    • 1.1.x

    #2
    Jake Bounce 'How To's' may point you in right direction.

    Comment

    • peterska2
      Senior Member
      • Oct 2003
      • 8869
      • 3.7.x

      #3
      <if condition="($foruminfo[forumid]==30) AND ($post[postcount]==1) AND $show[guest]">

      That would be a lot better.

      !$bbuserinfo[userid] is never going to be true as a guest has a userid of 0.

      Comment

      • thanhdat
        Member
        • Feb 2005
        • 79
        • 3.8.x

        #4
        Hello, please help me lz.

        I would like to use if conditional in template forumhome_forumbit_level2_post: for Forums where have not any Moderators and Forums are not forumid example 2 and 3, shows some text.

        I tried this, but don't work!
        <if condition="$forum[moderators]"><div class="smallfont">$vbphrase[moderator]:&nbsp;$forum[moderators]&nbsp;</div>
        <elseif condition="$forum[forumid] != 2,3"/><div class="smallfont"> This forumid is not 2 or 3</div></if>
        </if>
        Last edited by thanhdat; Mon 23 Apr '07, 1:10pm.
        Vui Ve Club - www.vuiveclub.net

        Comment

        • Zachery
          Former vBulletin Support
          • Jul 2002
          • 59097

          #5
          There is no elseif condition.
          Code:
          <if condition="X">
          	X is met
          <else />
          	<if condition="Y>
          		Y is met
          	<else />
          		Y was not met, X was not met
          	</if>
          </if>

          Comment

          • thanhdat
            Member
            • Feb 2005
            • 79
            • 3.8.x

            #6
            Thanks, but i have one more question.

            How can I use this condition for more forum ids?

            <if condition="$forum[forumid] != 2,3,4"> đfsf </if>
            It does not work!
            Vui Ve Club - www.vuiveclub.net

            Comment

            • Jose Amaral Rego
              Senior Member
              • Feb 2005
              • 11058
              • 1.1.x

              #7
              I have this as a note... I sorta wish a list can be made of most likely things to add to templates.

              Code:
              <if condition="in_array($forum['forumid'], array(2,3,4))"> [COLOR="Red"]đfsf or what you place here[/COLOR] </if>

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...