XF 1.3 If statement with multiple usergroups

i_n_k

Member
I'm trying to figure out the conditional statements behind showing an item based on if people are not part of a particular usergroup.

In other words:

<if usergroup != "this group">

Show script

</end if>

Guessing it's really easy, but haven't been able to dig it out via search? :confused:
 

Still having an issue

I'm Using:

<xen:if is="!{xen:helper ismemberof, $visitor, 3}">
Output text
</xen:if>

Which Gives me:

Template Errors:
  1. Argument 1 passed to XenForo_Template_Helper_Core::helperIsMemberOf() must be an array, null given in /httpdocs/test-forum/library/XenForo/Template/Helper/Core.php
  2. Argument 1 passed to XenForo_Model_User::isMemberOfUserGroup() must be an array, null given, called in /httpdocs/test-forum/library/XenForo/Template/Helper/Core.php and defined in /httpdocs/test-forum/library/XenForo/Model/User.php
I'm testing it out using the id 3 (the administrator ID), which I found using this method:
http://xenforo.com/community/threads/user-group-id-numbers.39262/
 
Hi Brogan,

Sure, I've attached them. I've got the screenshot where the code is being inserted, and then the resulting error at the top of the forum.
 

Attachments

  • Screenshot-1.webp
    Screenshot-1.webp
    98.4 KB · Views: 16
  • Screenshot-2.webp
    Screenshot-2.webp
    22.3 KB · Views: 13
Can you copy and past everything in the Replace field.
Some of it is truncated so I want to make sure I use the same.

Have you used $0 at the start of the Replace field to insert the content?
 
Top Bottom