Thread Rating:
  • 3 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Beta]Control ModCP
(07-06-2010, 07:37 AM)Tomm M Wrote: Nayar - I have a few issues with your plugin...

PHP Code:
    $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:

PHP Code:
if($mybb->input['action'] != "editprofile")

...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
Thanks, Polarbear541

Forum Jump:

Users browsing this thread: 1 Guest(s)