Announcement

Collapse
No announcement yet.

List of IF CONDITION

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • List of IF CONDITION

    Is there a list of conditionals that vB uses? In particular, I'm wondering if there are any album-related conditionals like IF USER_HAS_ALBUM or some such. Thanks!

  • #2
    I am not aware of any conditions for that. I checked the various user fields and there is nothing for that present in the standard $bbuserinfo array. Custom code is required to fetch that information.

    There is no comprehensive list of conditionals. This document has some generic examples:

    http://www.vbulletin.com/docs/html/m...e_conditionals

    Comment


    • #3
      Thanks for the info, Jake.

      Comment


      • #4
        Along the same lines as my first question...is there a conditional to tell whether a member is an active member, especially one that can be used in the postbit? Thanks!

        Comment


        • #5
          For example:

          Code:
          <if condition="$post[lastactivity] > TIMENOW - X*86400">
          
          </if>
          Where X is the number of past days during which a user must have visited the forum to be considered active.

          Comment


          • #6
            Perfect! Much thanks!

            Comment


            • #7
              Originally posted by Jake Bunce View Post
              For example:

              Code:
              <if condition="$post[lastactivity] > TIMENOW - X*86400">
              
              </if>
              Where X is the number of past days during which a user must have visited the forum to be considered active.
              Hi Jake,
              how can I do to show something in template for users have more than X posts?
              Vui Ve Club - www.vuiveclub.net

              Comment


              • #8
                In the postbit?

                Code:
                <if condition="$post[posts] > X">
                
                </if>

                Comment


                • #9
                  Originally posted by Jake Bunce View Post
                  In the postbit?

                  Code:
                  <if condition="$post[posts] > X">
                  
                  </if>
                  Oh, sorry, I need it in FORUMHOME.

                  So i think then it is:

                  Code:
                  <if condition="$userinfo[posts] > X">
                  
                  </if>
                  ?
                  Vui Ve Club - www.vuiveclub.net

                  Comment


                  • #10
                    $bbuserinfo not $userinfo
                    Kerry-Anne :)

                    Twitter Blog

                    www.peterska2.com www.worldnewszone.com www.popularusenetgroups.com www.superclickers.co.uk www.forumsforchrist.com www.browsergameplanet.com

                    Comment


                    • #11
                      Originally posted by Kerry-Anne View Post
                      $bbuserinfo not $userinfo
                      OK thank you,
                      but I need something more.
                      I tried
                      Code:
                      <if condition="$bbuserinfo[age] > 15">
                      
                      </if>
                      It doesnt work, please help me
                      thanks
                      Vui Ve Club - www.vuiveclub.net

                      Comment


                      • #12
                        There is no variable for age. You will need to create a small plugin to utilize PHP's date functions on the user's birthday. If you have some coding ability then you can post on www.vbulletin.org for help with this.

                        Comment

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