PDA

View Full Version : vB conditional for poster usergroup?


Kevlar
03-12-2013, 11:33 PM
I was going to use this...

<vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Show this to user group 1, 2, and 3</vb:if>

but I assume that this for the the usergroup of the person viewing the thread/post. Is there a conditional for the person who posted the post? I am trying to get the usergroup of the person who made the thread/post, not the person who is viewing the thread/post.

kh99
03-12-2013, 11:46 PM
You can replace $bbuserinfo with $post (assuming you're using it in postbit or postbit_legacy).

Kevlar
03-13-2013, 12:37 PM
Does $post return the usergroup of the poster or does it return the post number?

kh99
03-13-2013, 01:40 PM
Does $post return the usergroup of the poster or does it return the post number?


It's an array with many entries, but in addition to all the information about the post itself, it contains the userdata from the author of the post, so it can work in place of $bbuserinfo to pass to is_member_of().

Kevlar
03-13-2013, 03:05 PM
Great... thanks.