Announcement

Collapse
No announcement yet.

if condition

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

  • if condition

    I would like to ask about this code :
    PHP Code:
    <if condition="$bbuserinfo['usergroupid'] ==13"
    If i want to put more than one groupid in this comdition
    what I hace to do ?

    cange 13 to 13,6,5

    How ?
    Kuwait sun

  • #2
    use this:

    PHP Code:
    <if condition="in_array($bbuserinfo[usergroupid], array(13,6,5))"
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      Just out of wondering, are you checking for primary or secondary usergroups?

      Comment


      • #4
        Originally posted by Colin F
        use this:

        PHP Code:
        <if condition="in_array($bbuserinfo[usergroupid], array(13,6,5))"
        Does the above work only for primary usergroups?

        If we want to check for secondary usergroups also, should we use...
        HTML Code:
        <if condition="is_member_of($bbuserinfo, array(13,6,5))">
        ..., am I right?

        Comment


        • #5
          Yes I believe so Gearloose...
          John

          Comment


          • #6
            hi

            i need if user have permissinon on this forumid can see this code

            is this possible ?

            Comment

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