Log in

View Full Version : UserGroup Conditional


tuRiver
05-17-2018, 10:21 AM
Hi

Im stuck with this, and it should be simple

Im trying to show a badge on postbit to users that are in some custom group.

Im using this

<vb:if condition="is_member_of($userinfo, 32)">Text</vb:if>

But te text its not displayed... any ideas?

Thanks

MarkFL
05-17-2018, 12:47 PM
Try:

<vb:if condition="is_member_of($vbulletin->userinfo, array(32))">Text</vb:if>

tuRiver
05-17-2018, 01:18 PM
Its not working on postbit_legacy, any ideas?

MarkFL
05-17-2018, 02:28 PM
Its not working on postbit_legacy, any ideas?

Just to be sure, are you testing this with an account that is a member of that group? Have you edited the template corresponding to the style you are using?

Personally, I would use a plugin rather than a template hack.

tuRiver
05-17-2018, 02:58 PM
But i want to be visible to all users, not just for members of that group.

The condition to be shown, its that the message its been made by a member of that group

MarkFL
05-17-2018, 03:10 PM
But i want to be visible to all users, not just for members of that group.

The condition to be shown, its that the message its been made by a member of that group

Yes, of course...my apologies. Try this:

<vb:if condition="is_member_of($post, array(32))">Text</vb:if>

tuRiver
05-17-2018, 03:12 PM
Thank you!

--------------- Added 1526642732 at 1526642732 ---------------

Yes, of course...my apologies. Try this:

<vb:if condition="is_member_of($post, array(32))">Text</vb:if>

What about if its a secondary group?