2015-02-03, 06:49 PM
The issues below are not bugs, I'd rather call it inconsistancies. So when this thread is considered misplaced here, please move it to a better suited (sub)forum.
When you read an outgoing PM the form Quickreply is still shown (if this is set in AdminCP and UserCP). This is of course weird, and can simply be avoided by an addional clause in the if statement of line 1157 of private.php.
Now it is:
Which could be replaced by:
By this, the quickreply form is not shown for outgoing PM's, independent of which mailbox it is placed in.
But then we still have a Send Email and SendPM buttons in the footer of the message. Also these buttons make no sense for outgoing PM's, and neither do they for your own messages in threads.
Both can be solved by changing similar if statements in function build_postbit (inc/functions_post.php). For the Send Email button, line 356 of inc/functions_post.php reads:
This could be replaced by:
For the PM button, line 514 reads:
And this could be replaced by:
This removes the Email and PM buttons from bouth outgoing PM's and posts in threads posted by yourself.
It may seem exaggerated, but please believe me it is better not to have options (buttons, links) that are redundant. I am teaching (mostly elder) people using internet and forums, and always get questions about why certain choices are there when they do not make sense.
I could have solved this with the plugin conditionals in templates, but I think it belongs in the core source of MyBB.
When you read an outgoing PM the form Quickreply is still shown (if this is set in AdminCP and UserCP). This is of course weird, and can simply be avoided by an addional clause in the if statement of line 1157 of private.php.
Now it is:
if($mybb->settings['pmquickreply'] != 0 && $mybb->user['showquickreply'] != 0 && $mybb->usergroup['cansendpms'] != 0 && $pm['fromid'] != 0 && $pm['folder'] != 3)
Which could be replaced by:
if($mybb->settings['pmquickreply'] != 0 && $mybb->user['showquickreply'] != 0 && $mybb->usergroup['cansendpms'] != 0 && $pm['fromid'] != 0 && $pm['folder'] != 3 && $pm['fromid'] != $mybb->user['uid'])
By this, the quickreply form is not shown for outgoing PM's, independent of which mailbox it is placed in.
But then we still have a Send Email and SendPM buttons in the footer of the message. Also these buttons make no sense for outgoing PM's, and neither do they for your own messages in threads.
Both can be solved by changing similar if statements in function build_postbit (inc/functions_post.php). For the Send Email button, line 356 of inc/functions_post.php reads:
if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1)
This could be replaced by:
if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1 && $post['author'] != $mybb->user['uid'])
For the PM button, line 514 reads:
eval("\$post['button_reply_pm'] = \"".$templates->get("postbit_reply_pm")."\";");
And this could be replaced by:
if ($post['author'] != $mybb->user['uid'])
{
eval("\$post['button_reply_pm'] = \"".$templates->get("postbit_reply_pm")."\";");
}
This removes the Email and PM buttons from bouth outgoing PM's and posts in threads posted by yourself.
It may seem exaggerated, but please believe me it is better not to have options (buttons, links) that are redundant. I am teaching (mostly elder) people using internet and forums, and always get questions about why certain choices are there when they do not make sense.
I could have solved this with the plugin conditionals in templates, but I think it belongs in the core source of MyBB.