Customizing SMF > SMF Coding Discussion

Making a button only visible to certain member groups.

<< < (2/2)

Arantor:
OK, so you've added the button in the menu, and one of the things you added was a line like:

--- Code: ---'show' => true,
--- End code ---

to the button.

You should change that to:

--- Code: ---'show' => count(array_intersect($user_info['groups'], array(1, 2, 10))) > 0,
--- End code ---

wargames:
Thanks and that works.

Navigation

[0] Message Index

[*] Previous page

Go to full version