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