News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Hide "Reply" and "Quote" next to your own PMs in conversation

Started by ILUXA, September 19, 2018, 09:21:20 AM

Previous topic - Next topic

ILUXA

There was a mod, that sets default look of private messages to conversation (dialog),
it was called "PM Settings", probably it was deleted by the author, but I have a copy, attaching it to this post,
it is very useful, because in SMF by default PMs are shown in pretty old way, after installing this mod,
you'll be able to set default PM look for all users in Admin -- Modification settings.

In conversation, you'll see "Reply" and "Quote" buttons even next to your PMs, and if you'll click it,
you'll write an answer to yourself :) and not to conversation, so user with whom you have a conversation with,
will never see it, some users are confused with this. I found out how to change this appearance,
edit /Themes/Theme/PersonalMessage.template.php, search for "reply_button" and "quote_button" inside of "<li>"
echo '
<li class="reply_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $txt['reply'], '</a></li>
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>';

And add "if ($message['member']['id'] != $context['user']['id'])" before "echo":
if ($message['member']['id'] != $context['user']['id'])
echo '
<li class="reply_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $txt['reply'], '</a></li>
<li class="quote_button"><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '">', $txt['quote'], '</a></li>';


Then you won't see any "Reply" or "Quote" buttons next to your own PMs —

Steve

DO NOT pm me for support!

Advertisement: