MyBB Community Forums

Full Version: What php code would allow me to display this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I want to display the text: "Staff Member" on a user's profile page who is in the staff usergroups. What php code could I use to do this?

I was trying things like: If etc...
Do you mean you want to use userbars? For example: If someone is in the Staff usergroup, then on their profile it will show an image saying that they are a Staff member.

Or do you want to say "Staff Member" in their usertitle?
Neither, like next to the online status on the users profile it says staff member. Would an if code with echo work? Sorry using the account on my phone Smile
It's cool but the OP doesn't mention anything about the online status and I don't see anything related to being in a certain usergroup after or next to the online status. I'll just wait for the OP to clarify.
Okay, but what is the groups variable like $something?
1. Download Template Conditionals (tplcond-1.7.7z) http://mybbhacks.zingaburga.com/showthread.php?tid=464
2. Put .txt and .php to inc/plugins. Activate it in ACP.
3. In member_profile (or any other template displayed in profile) put:
<if in_array($memprofile['usergroup'], array(3,4,6)) || in_array($memprofile['additionalgroups'], array(3,4,6)) then>
Staff Member
</if>

where 3,4,6 etc. are comma separated group ids (can check them in ACP -> Users & Groups -> Groups -> end of link when editing group gid=x) which should have "Staff Member" displayed.
Thank you, it worked Smile

(2013-07-21, 01:13 PM)Destroy666 Wrote: [ -> ]1. Download Template Conditionals (tplcond-1.7.7z) http://mybbhacks.zingaburga.com/showthread.php?tid=464
2. Put .txt and .php to inc/plugins. Activate it in ACP.
3. In member_profile (or any other template displayed in profile) put:
<if in_array($memprofile['usergroup'], array(3,4,6)) || in_array($memprofile['additionalgroups'], array(3,4,6)) then>
Staff Member
</if>

where 3,4,6 etc. are comma separated group ids (can check them in ACP -> Users & Groups -> Groups -> end of link when editing group gid=x) which should have "Staff Member" displayed.
What it looks like:
[Image: 2ihw9du.png]