MyBB Community Forums

Full Version: Replies to outgoing PM's and similar issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
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.
I fully agree
I'm not sure whether we should fix this - especially the fix with the quickreply is invalid as it only checks the author but (as discussed elsewhere) we also allow PMs send to yourself (testing, debugging, whatever).
You can send yourself an email/pm from the profile page too btw.
I'm against changing the mentioned conditionals to what you're suggesting too.

As Jones said, you can PM yourself and it's very useful for debugging. Sometimes I also use that to keep notes of important things - I prefer it over notepad in UCP because I can keep my messages unread so that I don't forget anything.
Similarly, you may want to Email yourself if you found something interesting and you need to quickly save it outside of forums.

No reason to hide them for your own account IMO.
Rejecting this then. If someone has a really good reason to change this feel free to mention them.