Jump to content

SMF : Designating specific profile fields for specific user groups


ladyquack
 Share

Recommended Posts

I knew how to do this at one point in time, but for the life of me I can't remember how to now. SO, I have a custom mini profile on my site and I want to display the player's name on their character accounts as a custom profile field (which I know how to do), but I don't want that same profile field to show up on non-character accounts. How do I go about doing this?

 

Thanks in advance!

Link to comment
Share on other sites

if($message['member']['group_id'] != 'x' && !empty($message['member']['options']['cust_thing']))
	echo 'stuff here';

Change 'x' to the player group ID, and 'cust_thing' to the custom field's key.

If you have more than one ooc member group, which I'm sure you do:

$ooc_groups = array('ids','go','here');
if(!in_array($message['member']['group_id'], $ooc_groups) && !empty($message['member']['options']['cust_thing']))
	echo 'stuff here';

Replace the content of the $ooc_groups array with ooc group IDs. Note that integers/numbers do not need to be surrounded in apostrophes, so 1,2,3,4 works just as well as '1','2','3','4'.

  • Like 1
  • Cheers 1

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.