';
Chris@76:
Chris@76: // Message sent? Show a small indication.
Chris@76: if (isset($context['pm_sent']))
Chris@76: echo '
Chris@76:
Chris@76: ', $txt['pm_sent'], '
Chris@76:
';
Chris@76: }
Chris@76:
Chris@76: // Just the end of the index bar, nothing special.
Chris@76: function template_pm_below()
Chris@76: {
Chris@76: global $context, $settings, $options;
Chris@76:
Chris@76: echo '
Chris@76: ';
Chris@76: }
Chris@76:
Chris@76: function template_folder()
Chris@76: {
Chris@76: global $context, $settings, $options, $scripturl, $modSettings, $txt;
Chris@76:
Chris@76: // The every helpful javascript!
Chris@76: echo '
Chris@76: ';
Chris@76:
Chris@76: echo '
Chris@76: ';
Chris@76: }
Chris@76:
Chris@76: // Just list all the personal message subjects - to make templates easier.
Chris@76: function template_subject_list()
Chris@76: {
Chris@76: global $context, $options, $settings, $modSettings, $txt, $scripturl;
Chris@76:
Chris@76: echo '
Chris@76:
', $txt['from'], ': ', $message['member']['link'], ', ', $txt['to'], ': ';
Chris@76:
Chris@76: // Show the recipients.
Chris@76: // !!! This doesn't deal with the sent item searching quite right for bcc.
Chris@76: if (!empty($message['recipients']['to']))
Chris@76: echo implode(', ', $message['recipients']['to']);
Chris@76: // Otherwise, we're just going to say "some people"...
Chris@76: elseif ($context['folder'] != 'sent')
Chris@76: echo '(', $txt['pm_undisclosed_recipients'], ')';
Chris@76:
Chris@76: echo '
Chris@76:
Chris@76:
Chris@76:
Chris@76:
Chris@76:
Chris@76: ', $message['body'], '
Chris@76:
';
Chris@76:
Chris@76: if ($context['can_send_pm'])
Chris@76: {
Chris@76: $quote_button = create_button('quote.gif', 'reply_quote', 'reply_quote', 'align="middle"');
Chris@76: $reply_button = create_button('im_reply.gif', 'reply', 'reply', 'align="middle"');
Chris@76: // You can only reply if they are not a guest...
Chris@76: if (!$message['member']['is_guest'])
Chris@76: echo '
Chris@76: ', $quote_button , '', $context['menu_separator'], '
Chris@76: ', $reply_button , ' ', $context['menu_separator'];
Chris@76: // This is for "forwarding" - even if the member is gone.
Chris@76: else
Chris@76: echo '
Chris@76: ', $quote_button , '', $context['menu_separator'];
Chris@76: }
Chris@76:
Chris@76: echo '
Chris@76:
Chris@76:
Chris@76:
Chris@76:
';
Chris@76: }
Chris@76: // Otherwise just a simple list!
Chris@76: else
Chris@76: {
Chris@76: // !!! No context at all of the search?
Chris@76: echo '
Chris@76:
Chris@76:
', $message['time'], '
Chris@76:
', $message['link'], '
Chris@76:
', $message['member']['link'], '
Chris@76:
';
Chris@76: }
Chris@76:
Chris@76: $alternate = !$alternate;
Chris@76: }
Chris@76:
Chris@76: // Finish off the page...
Chris@76: if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages']))
Chris@76: echo '
Chris@76:
Chris@76:
';
Chris@76:
Chris@76: // No results?
Chris@76: if (empty($context['personal_messages']))
Chris@76: echo '
Chris@76:
';
Chris@76:
Chris@76: }
Chris@76:
Chris@76: function template_send()
Chris@76: {
Chris@76: global $context, $settings, $options, $scripturl, $modSettings, $txt;
Chris@76:
Chris@76: // Show which messages were sent successfully and which failed.
Chris@76: if (!empty($context['send_log']))
Chris@76: {
Chris@76: echo '
Chris@76:
Chris@76:
', $txt['pm_send_report'], '
Chris@76:
Chris@76:
Chris@76:
Chris@76:
';
Chris@76: if (!empty($context['send_log']['sent']))
Chris@76: foreach ($context['send_log']['sent'] as $log_entry)
Chris@76: echo '', $log_entry, ' ';
Chris@76: if (!empty($context['send_log']['failed']))
Chris@76: foreach ($context['send_log']['failed'] as $log_entry)
Chris@76: echo '', $log_entry, ' ';
Chris@76: echo '
Chris@76:
Chris@76:
Chris@76:
Chris@76: ';
Chris@76: }
Chris@76:
Chris@76: // Show the preview of the personal message.
Chris@76: if (isset($context['preview_message']))
Chris@76: echo '
Chris@76:
';
Chris@76:
Chris@76: echo '
Chris@76:
Chris@76:
Chris@76: ';
Chris@76: }
Chris@76:
Chris@76: // This template asks the user whether they wish to empty out their folder/messages.
Chris@76: function template_ask_delete()
Chris@76: {
Chris@76: global $context, $settings, $options, $scripturl, $modSettings, $txt;
Chris@76:
Chris@76: echo '
Chris@76:
';
Chris@76: }
Chris@76:
Chris@76: // This template asks the user what messages they want to prune.
Chris@76: function template_prune()
Chris@76: {
Chris@76: global $context, $settings, $options, $scripturl, $txt;
Chris@76:
Chris@76: echo '
Chris@76: ';
Chris@76: }
Chris@76:
Chris@76: // Here we allow the user to setup labels, remove labels and change rules for labels (i.e, do quite a bit)
Chris@76: function template_labels()
Chris@76: {
Chris@76: global $context, $settings, $options, $scripturl, $txt;
Chris@76:
Chris@76: echo '
Chris@76:
Chris@76: ';
Chris@76: }
Chris@76:
Chris@76: // Template for reporting a personal message.
Chris@76: function template_report_message()
Chris@76: {
Chris@76: global $context, $settings, $options, $txt, $scripturl;
Chris@76:
Chris@76: echo '
Chris@76: ';
Chris@76: }
Chris@76:
Chris@76: // Little template just to say "Yep, it's been submitted"
Chris@76: function template_report_message_complete()
Chris@76: {
Chris@76: global $context, $settings, $options, $txt, $scripturl;
Chris@76:
Chris@76: echo '
Chris@76: