Announcement

Collapse
No announcement yet.

usergroup conditional

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

  • usergroup conditional

    I must be doing something wrong...

    I want real names to show up in the postbit but only for certain usergroups. So I put the following into the postbit_legacy template:

    Code:
             <if condition="in_array($bbuserinfo['usergroup'], array(6,15))">
                  <div>
                      <if condition="$post['field5']">
                          a.k.a. : $post[field5]
                      </if>
                  </div>
             </if>
    I only want the info to show for members of usergroups 6 and 15. So what am I doing wrong?

  • #2
    Originally posted by loaf View Post
    I must be doing something wrong...

    I want real names to show up in the postbit but only for certain usergroups. So I put the following into the postbit_legacy template:

    Code:
             <if condition="in_array($bbuserinfo['usergroup'], array(6,15))">
    try changing the first line

    Code:
    <if condition="in_array($bbuserinfo[usergroupid],array(6,15))">
    also you could use

    Code:
    <if condition="is_member_of($bbuserinfo,array(6,15))">

    Comment


    • #3
      You want it to showup for the person viewing the post? or the poster? Furthermore what template are you doing this in?

      Comment


      • #4
        I want it to show up for the person viewing the post. And I'm doing it in the postbit_legacy template.

        Comment


        • #5
          Use is_member_of($bbuserinfo, 1,2,3)

          Comment


          • #6
            Thanks! What's the difference between Use is_member_of($bbuserinfo, 1,2,3) and having the word array in there?

            Comment


            • #7
              It already is looking for an array.

              Comment

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