Quote:
Originally Posted by almqdad
This hack is very nice
is there away to restrict awarding awards by admin 7 supermoderator
may be group based or id based
thanks
|
I wanted to do something similar so came up with this method that works great. Allow access to moderators in the options (Turn on YAAS in ModCP)
Now create a new User Profile Field as follows;
Type: Single-Selection Radio Buttons
Name: Award System Manager
Options:
No
Yes
Set Default: Yes
Field Editable by User: No
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No
Now go into the Plugin Manager and Edit Plugin YAAS - Give Award to User Nav
Find
PHP Code:
if ($vbulletin->options['aw_modcp'])
replace with (or comment out and add below)
PHP Code:
if ($vbulletin->userinfo['fieldXX'] == 'Yes')
Where fieldXX is the User Profile Field ID of the field you've just created.
My entire block for that now looks like (note I commented out the first line)
PHP Code:
// *************************************************
$cangiveaward = false;
// if ($vbulletin->options['aw_modcp'])
if ($vbulletin->userinfo['field12'] == 'Yes')
{
$cangiveaward = true;
construct_nav_option($vbphrase['give_user_award'], 'award.php?do=manage');
}
if ($cangiveaward)
{
construct_nav_group($vbphrase['award_system']);
construct_nav_spacer();
}
Finally, pick the users that you want to give access to and go into their profile in the AdminCP and select Yes in the Award System Manager profile field.
The user WILL need to already have access to the ModCP for this to work but as you're looking at Super Mods then I assume this is already the case.
I've done this on our forum as we did not want all moderators to be able to give awards, just our 'section heads'
On another note, I've also got the award system plugged into the permissions now and when an award is given to a user a scheduled task runs and checks for new awards and assigns them to a usergroup based on the award. There is also a script that checks for removed awards and will remove the relevant usergroup too.