2017-04-26, 10:29 PM
Hi all-
If you're like me, you want to keep your forums organized. When it comes to using MySupport, some users might not know how to accept posts as solutions, leaving our "Not Solved : Solved" ratio inaccurate. I searched for a way to allow our trusted Moderators to mark solutions for other users. Obviously, this is a delicate topic since we want to ensure only posts that completely answer questions are marked as solutions. Should you choose to allow your Moderators to mark solutions, a bit of coding is required, but it's not that hard.
1. Open yourforum.com/inc/plugins/mysupport.php in your code editor of choice
2. Use the Find feature to search for this line: $post['mysupport_bestanswer'] = "";
Below that line, you should see: if($mybb->user['uid'] == $thread['uid'])
3. Replace the line in blue with this red line of code: if(($mybb->user['uid'] == $thread['uid']) || ($mybb->user['usergroup'] == *))
4. Replace the green asterisk in the line above with the usergroup ID number of the moderator/administrator group who should have the ability to mark the best answer.
5. Now, use the Find feature again to search for: // did this user author this thread??
6. Remove the following code altogether:
There we go! Moderators should now be able to mark replies to a thread as the Best Answer.
If you're like me, you want to keep your forums organized. When it comes to using MySupport, some users might not know how to accept posts as solutions, leaving our "Not Solved : Solved" ratio inaccurate. I searched for a way to allow our trusted Moderators to mark solutions for other users. Obviously, this is a delicate topic since we want to ensure only posts that completely answer questions are marked as solutions. Should you choose to allow your Moderators to mark solutions, a bit of coding is required, but it's not that hard.
1. Open yourforum.com/inc/plugins/mysupport.php in your code editor of choice
2. Use the Find feature to search for this line: $post['mysupport_bestanswer'] = "";
Below that line, you should see: if($mybb->user['uid'] == $thread['uid'])
3. Replace the line in blue with this red line of code: if(($mybb->user['uid'] == $thread['uid']) || ($mybb->user['usergroup'] == *))
4. Replace the green asterisk in the line above with the usergroup ID number of the moderator/administrator group who should have the ability to mark the best answer.
5. Now, use the Find feature again to search for: // did this user author this thread??
6. Remove the following code altogether:
// did this user author this thread??
elseif($mybb->user['uid'] != $post_info['author_uid'])
{
error($lang->bestanswer_not_author);
exit;
}
There we go! Moderators should now be able to mark replies to a thread as the Best Answer.