MyBB Community Forums

Full Version: [Beta]Control ModCP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2010-07-06, 07:37 AM)Tomm M Wrote: [ -> ]Nayar - I have a few issues with your plugin...

	$user = get_user($mybb->input['uid']);

Although this does get checked in the function, you should perform some sort of validation to ensure you actually have a user to edit and show an error if there isn't.

Also, the entire modcpperm function runs whether you're editing a profile or not. In this function, you could do this:

if($mybb->input['action'] != "editprofile")
{
	return false;
}

...and just another gripe, but correct me if I'm wrong - these settings seem global? As in if you set an option to 'no', then no moderator can edit that section. This includes administrators and all moderators? I'm not too sure if you planned to do that or not...

Last thing, there are 11 str_replace function calls. This function accepts arrays as parameters, so it would be a lot easier if you added the strings and replacements then only one str_replace function is needed...
this was the first ever plugin i made without any knowledge of php and myBB. I only copied codes from other plugins and modified it to just get the job done.

Thanks for your suggestions

I will rewrite the plugin from scratch in November. Could a mod please close this thread till the next release. I am removing the download
/Closed by Request.
Feel free to PM any of the staff to re-open it for you Smile
Pages: 1 2