Announcement

Collapse
No announcement yet.

Template Conditional

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

  • Template Conditional

    Is there a template conditional in VB5 that will allow me to show some text in a post if a member is in usergroup X only..

  • #2
    I would also be interested for this.

    Indeed the next sentence doesn't seem to work

    Code:
    <vb:if condition="$userInfo['usergroupid'] == 6">
    Any idea?

    Comment


    • #3
      Originally posted by Papa Bear View Post
      Is there a template conditional in VB5 that will allow me to show some text in a post if a member is in usergroup X only..

      The member that wrote the post or the one viewing the post? Two different things.
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API - Full / Mobile
      Vote for your favorite feature requests and the bugs you want to see fixed.

      Comment


      • #4
        The member that is viewing the post.
        But after many many tries and page investigation, I think I found it.
        Perhaps can you confirm?
        Code:
        <vb:if condition="$user['usergroupid'] == XX">
        But can also be interesting to have the member that wrote the post ;-)

        Can you also confirm that in $user['xxx'], the xxx can be replaced by any field of the table "user"?

        Thanks

        Comment


        • #5
          use is_member_of($VAR, VALUE); instead, it checks additional and primary usergroups.

          Comment


          • #6
            Originally posted by vb_nils View Post
            Can you also confirm that in $user['xxx'], the xxx can be replaced by any field of the table "user"?
            I would guess the total contents of the array would on the location it is used at. Would probably need an extension to do a var_dump of the array in the location where you're using it at.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API - Full / Mobile
            Vote for your favorite feature requests and the bugs you want to see fixed.

            Comment


            • #7
              Originally posted by Wayne Luke View Post

              Would probably need an extension to do a var_dump of the array in the location where you're using it at.
              You can do:

              Code:
              {vb:debugvardump user}

              GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

              Comment

              Related Topics

              Collapse

              Working...
              X