MyBB Community Forums

Full Version: MyPS feature | Small fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I know this plugin is far outdated and dose not have many people who develop for it, but I'll try anyway. I have no php experience whatsoever and I need someone to modify the code so only team leaders can modify users points(edit), but that goes for every team leader on the forum.

Thanks! We can work out a deal for payback, I can't pay anyone though.
IN MYPS, there is an option: Allow Moderation where you can select which usergroup among team is allowed to edit MYPS.
It gives me three options: Admins Only, Admins and Super Mods, Admins and All Mods. It dosen't allow for specific groups.
Open plugin file and find;
if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin')
and;
if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods'))

and change it to;
if (in_array($mybb->user['usergroup'], array(2,4,8))

Edit 2,4,8 with your usergroup IDs you wish to allow them to edit / moderate MYPS.
Thanks, now how can I make it so only the team leaders of the groups can modify it?
I'll word it this way, how can I make it so only specific UID's can edit the points, also to make it so it is easily editable via ACP options.
I think this requires any extension for MYPS or editing the plugin file.
I'll see if I can get newpoints to do this.
Do you know anyone with the ability to edit/make this extension?
Open plugin file and find;
if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin')
and;
if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods'))

and change it to;
$userid = $mybb->user['uid'];
$userids = array(1,2,3,4,5);
if (in_array($mybb->user['usergroup'], array(2,4,8) || in_array($userid,$userids))

Edit 2,4,8 with your usergroup IDs you wish to allow them to edit / moderate MYPS.
Edit 1,2,3,4,5 with your user IDs you wish to allow them to edit / moderate MYPS.
Pages: 1 2