Announcement

Collapse
No announcement yet.

Usergroup conditions problem

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

  • Usergroup conditions problem

    I want to add a template condition for the case where forum browsed is X, and the user is not a member of usergroups Y or Z. I have tried
    Code:
    <if condition="$foruminfo['forumid'] == X AND (!is_member_of($bbuserinfo, Y) OR !is_member_of($bbuserinfo, Z))">
    but can't get it to work. It will display for the correct forum, but the usergroup part is ignored - it displays regardless of user group.

  • #2
    AND !is_member_of($bbuserinfo, X, Y, Z)

    try that instead.

    Comment


    • #3
      This is weird...

      I tried <if condition="$foruminfo['forumid'] == X AND is_member_of($bbuserinfo, Y, Z)">, and now it works. Shouldn't this display for forum X only if the user is member of Y or Z?
      Last edited by Havard; Tue 17 Jul '07, 6:06am.

      Comment


      • #4
        say the forum id is 5 and the usergroups are 9 and 11


        First it checks if the forumid is that forum ID
        Then it checks if the user browsing is a member of either usergroup one, or the other.
        If that's the case, it basically reads,


        If 5 AND either 9 or 11 ...

        Comment

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