MyBB Community Forums
[Rejected] Replies to outgoing PM's and similar issues - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Development (https://community.mybb.com/forum-161.html)
+--- Forum: MyBB 1.8 Development (https://community.mybb.com/forum-165.html)
+---- Forum: 1.8 Bugs and Issues (https://community.mybb.com/forum-157.html)
+----- Forum: Rejected (https://community.mybb.com/forum-184.html)
+----- Thread: [Rejected] Replies to outgoing PM's and similar issues (/thread-166581.html)



Replies to outgoing PM's and similar issues - Ad Bakker - 2015-02-03

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.


RE: Replies to outgoing PM's and similar issues - Eldenroot - 2015-02-04

I fully agree


RE: Replies to outgoing PM's and similar issues - Jones H - 2015-06-25

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).


RE: Replies to outgoing PM's and similar issues - Jones H - 2015-06-25

You can send yourself an email/pm from the profile page too btw.


RE: Replies to outgoing PM's and similar issues - Destroy666 - 2015-06-25

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.


RE: Replies to outgoing PM's and similar issues - Jones H - 2015-06-28

Rejecting this then. If someone has a really good reason to change this feel free to mention them.