';
// 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()
{
echo '
';
}
function template_pm_popup()
{
global $context, $txt, $scripturl;
// Unlike almost every other template, this is designed to be included into the HTML directly via $().load()
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, $settings, $modSettings, $txt, $scripturl;
echo '
';
$alternate = true;
// Print each message out...
foreach ($context['personal_messages'] as $message)
{
// We showing it all?
if (!empty($context['search_params']['show_complete']))
{
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.png', 'reply_quote', 'reply_quote', 'class="centericon"');
$reply_button = create_button('im_reply.png', 'reply', 'reply', 'class="centericon"');
// 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']) && !empty($context['personal_messages']))
echo '
';
// No results?
if (empty($context['personal_messages']))
echo '
', $txt['pm_search_none_found'], '
';
echo '
', $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.
echo '
';
echo '
';
// If the admin enabled the pm drafts feature, show a draft selection box
if (!empty($context['drafts_pm_save']) && !empty($context['drafts']) && !empty($options['drafts_show_saved_enabled']))
{
echo '
';
echo '
';
}
// This template asks the user whether they wish to empty out their folder/messages.
function template_ask_delete()
{
global $context, $scripturl, $modSettings, $txt;
echo '
';
}
// This template asks the user what messages they want to prune.
function template_prune()
{
global $context, $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, $scripturl, $txt;
echo '
';
}
// Template for reporting a personal message.
function template_report_message()
{
global $context, $txt, $scripturl;
echo '
';
}
// Little template just to say "Yep, it's been submitted"
function template_report_message_complete()
{
global $context, $txt, $scripturl;
echo '
';
}
// Manage rules.
function template_rules()
{
global $context, $txt, $scripturl;
echo '
';
}
// Template for adding/editing a rule.
function template_add_rule()
{
global $context, $txt, $scripturl;
echo '
';
echo '
';
// Now setup all the bits!
echo '
';
}
// Template for showing all the PM drafts of the user.
function template_showPMDrafts()
{
global $context, $scripturl, $modSettings, $txt;
echo '
', $txt['drafts_show'], '
', $context['page_index'], '
';
// Button shortcuts
$edit_button = create_button('modify_inline.png', 'draft_edit', 'draft_edit', 'class="centericon"');
$remove_button = create_button('delete.png', 'draft_delete', 'draft_delete', 'class="centericon"');
// No drafts? Just show an informative message.
if (empty($context['drafts']))
echo '
', $txt['draft_none'], '
';
else
{
// For every draft to be displayed, give it its own div, and show the important details of the draft.
foreach ($context['drafts'] as $draft)
{
echo '