« ', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ': ', $message['time'], ' »
';
// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
';
// Maybe we can approve it, maybe we should?
if ($message['can_approve'])
echo '
- ', $approve_button, '
';
// Can they reply? Have they turned on quick reply?
if ($context['can_quote'] && !empty($options['display_quick_reply']))
echo '
- ', $reply_button, '
';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_quote'])
echo '
- ', $reply_button, '
';
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
- ', $modify_button, '
';
// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
- ', $remove_button, '
';
// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['real_num_replies']))
echo '
- ', $split_button, '
';
// Can we restore topics?
if ($context['can_restore_msg'])
echo '
- ', $restore_message_button, '
';
// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '
';
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
';
echo '
';
// Ignoring this user? Hide the post.
if ($ignoring)
echo '
';
// Show the post itself, finally!
echo '
';
if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
echo '
', $txt['post_awaiting_approval'], '
';
echo '
', $message['body'], '
', $message['can_modify'] ? '
![' . $txt['modify_msg'] . ' '. $txt['modify_msg']. '](' . $settings['images_url'] . '/icons/modify_inline.gif)
' : '';
// Assuming there are attachments...
if (!empty($message['attachment']))
{
// Now for the attachments, signature, ip logged, etc...
echo '
';
}
echo '
';
// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« ', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], ' »';
echo '
';
// Maybe they want to report this post to the moderator(s)?
if ($context['can_report_moderator'])
echo '
', $txt['report_to_mod'], ' ';
// Can we issue a warning because of this post? Remember, we can't give guests warnings.
if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
echo '
![', $txt['issue_warning_post'], ' ', $txt['issue_warning_post'], '](', $settings['images_url'], '/warn.gif)
';
echo '

';
// Show the IP to this user for this post - because you can moderate?
if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
echo '
', $message['member']['ip'], ' (?)';
// Or, should we show it because this is you?
elseif ($message['can_see_ip'])
echo '
', $message['member']['ip'], '';
// Okay, are you at least logged in? Then we can show something about why IPs are logged...
elseif (!$context['user']['is_guest'])
echo '
', $txt['logged'], '';
// Otherwise, you see NOTHING!
else
echo '
', $txt['logged'];
echo '
';
// Are there any custom profile fields for above the signature?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 2 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
echo '
', $message['member']['signature'], '
';
echo '
';
}
echo '
';
echo '
', template_button_strip($normal_buttons, 'top'), '
', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '
' . $txt['go_up'] . '' : '', '
', $context['previous_next'], '
';
// Show the lower breadcrumbs.
theme_linktree();
$mod_buttons = array(
'move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
'delete' => array('test' => 'can_delete', 'text' => 'remove_topic', 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_remove_topic'] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'set_lock' : 'set_unlock', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'merge' => array('test' => 'can_merge', 'text' => 'merge', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
'calendar' => array('test' => 'calendar_post', 'text' => 'calendar_link', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0'),
);
// Restore topic. eh? No monkey business.
if ($context['can_restore_topic'])
$mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
// Allow adding new mod buttons easily.
call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));
echo '
', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '
';
// Show the jumpto box, or actually...let Javascript do it.
echo '
';
echo '
', $txt['quick_reply_desc'], $context['is_locked'] ? '
' . $txt['quick_reply_warning'] . '
' : '', $context['oldTopicError'] ? '
' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '
' : '', '
', $context['can_reply_approved'] ? '' : '' . $txt['wait_for_approval'] . '', '
', !$context['can_reply_approved'] && $context['require_verification'] ? '
' : '', '
';
}
if ($context['show_spellchecking'])
echo '