![]() |
Template conditional question
I'm editing the memberinfo_block_contactinfo template.
I wanted to add a conditional based on the usergroupid of the member whose profile is being viewed, not the usergroupid of the person viewing the profile page. Is the usergroupid already available here? Or do I need to make a plugin to get it? Thanks, James |
It's already there, the $userinfo variable contains all of the data for the user you're currently viewing the memberinfo profile for. So access the userid of the person you want like so: $userinfo['usergroupid']
This is NOT the same person as $vbulletin->userinfo['usergroupid'] (well, I suppose that it can be the same person if someone is viewing their own profile). |
Thanks TigerC10. I don't feel so badly about getting confused on that one now.
This worked for me in the template: Code:
<if condition="is_member_of($userinfo['usergroupid'], 5, 6, 9, 11, 13, 15, 17, 21, 22, 23)"> Thanks, James |
All times are GMT. The time now is 05:12 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|