2010-04-16, 07:50 PM
Great job. You could just add a new setting for "Allowed Groups" and the accepted values would be the group id's separated by a comma (each gid).
Then just explode() the settings and check if the user belongs to any of those groups.
You can use my "check permissions" function if you want:
http://community.mybboard.net/thread-557...#pid396538
You don't need to explode the settings if you use my function since it will do it for you.
It checks if the _current_ user belongs to any of the groups set in the settings.
Returns true if yes else returns false.
Then just explode() the settings and check if the user belongs to any of those groups.
You can use my "check permissions" function if you want:
http://community.mybboard.net/thread-557...#pid396538
You don't need to explode the settings if you use my function since it will do it for you.
It checks if the _current_ user belongs to any of the groups set in the settings.
Returns true if yes else returns false.
All my plugins are available for free at MyBB Extend and on my GitHub. MyBB-Plugins.com has been closed and none of my plugins are officially maintained or supported.