', $txt['report_sent'], ' '; } // Topic was sent successfully elseif ($context['topic_sent']) { echo '
', $txt['topic_sent'], '
'; } // Show the anchor for the top and for the first message. If the first message is new, say so. echo ' ', $context['first_new_message'] ? '' : ''; // Is this topic also a poll? if ($context['is_poll']) { echo '

', $txt['poll'], '

', $context['poll']['question'], '

'; // Are they not allowed to vote but allowed to view the options? if ($context['poll']['show_results'] || !$context['allow_vote']) { echo '
'; // Show each option with its corresponding percentage bar. foreach ($context['poll']['options'] as $option) { echo '
', $option['option'], '
'; if ($context['allow_poll_view']) echo ' ', $option['bar_ndt'], ' ', $option['votes'], ' (', $option['percent'], '%)'; echo '
'; } echo '
'; if ($context['allow_poll_view']) echo '

', $txt['poll_total_voters'], ': ', $context['poll']['total_votes'], '

'; } // They are allowed to vote! Go to it! else { echo '
'; // Show a warning if they are allowed more than one option. if ($context['poll']['allowed_warning']) echo '

', $context['poll']['allowed_warning'], '

'; echo '
    '; // Show each option with its button - a radio likely. foreach ($context['poll']['options'] as $option) echo '
  • ', $option['vote_button'], '
  • '; echo '
'; } // Is the clock ticking? if (!empty($context['poll']['expire_time'])) echo '

', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], '

'; echo '
'; template_button_strip($context['poll_buttons']); echo '
'; } // Does this topic have some events linked to it? if (!empty($context['linked_calendar_events'])) { echo '

', $txt['calendar_linked_events'], '

    '; foreach ($context['linked_calendar_events'] as $event) echo '
  • ', ($event['can_edit'] ? ' ' : ''), '', $event['title'], ': ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
  • '; echo '
'; } // Show the page index... "Pages: [1]". echo '
', template_button_strip($context['normal_buttons'], 'right'), ' ', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '' . $txt['go_down'] . '' : '', '
'; // Show the topic information - icon, subject, etc. echo '

', $txt['topic'], ': ', $context['subject'], ' (', $context['num_views_text'], ') ', $context['previous_next'], '

'; if (!empty($settings['display_who_viewing'])) { echo '

'; // Show just numbers...? if ($settings['display_who_viewing'] == 1) echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members']; // Or show the actual people viewing the topic? else echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); // Now show how many guests are here too. echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '

'; } echo '
'; $ignoredMsgs = array(); $removableMessageIDs = array(); $alternate = false; // Get all the messages... while ($message = $context['get_message']()) { $ignoring = false; $alternate = !$alternate; if ($message['can_remove']) $removableMessageIDs[] = $message['id']; // Are we ignoring this message? if (!empty($message['is_ignored'])) { $ignoring = true; $ignoredMsgs[] = $message['id']; } // Show the message anchor and a "new" anchor if this message is new. echo '
', $message['id'] != $context['first_message'] ? ' ' . ($message['first_new'] ? '' : '') : '', '
'; // Show information about the poster of this message. echo '

'; // Show online and offline buttons? if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) echo ' ', $context['can_send_pm'] ? '' : '', '', $message['member']['online']['text'], '', $context['can_send_pm'] ? '' : ''; // Show a link to the member's profile. echo ' ', $message['member']['link'], '

'; echo '
    '; // Show the user's avatar. if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) echo '
  • ', $message['member']['avatar']['image'], '
  • '; // Show the post group icons, but not for guests. if (!$message['member']['is_guest']) echo '
  • ', $message['member']['group_icons'], '
  • '; // Show the member's primary group (like 'Administrator') if they have one. if (!empty($message['member']['group'])) echo '
  • ', $message['member']['group'], '
  • '; // Show the member's custom title, if they have one. if (!empty($message['member']['title'])) echo '
  • ', $message['member']['title'], '
  • '; // Don't show these things for guests. if (!$message['member']['is_guest']) { // Show the post group if and only if they have no other group or the option is on, and they are in a post group. if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') echo '
  • ', $message['member']['post_group'], '
  • '; // Show how many posts they have made. if (!isset($context['disabled_fields']['posts'])) echo '
  • ', $txt['member_postcount'], ': ', $message['member']['posts'], '
  • '; // Is karma display enabled? Total or +/-? if ($modSettings['karmaMode'] == '1') echo '
  • ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
  • '; elseif ($modSettings['karmaMode'] == '2') echo '
  • ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
  • '; // Is this user allowed to modify this member's karma? if ($message['member']['karma']['allow']) echo '
  • ', $modSettings['karmaApplaudLabel'], ' ', $modSettings['karmaSmiteLabel'], '
  • '; // Show the member's gender icon? if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender'])) echo '
  • ', $txt['gender'], ': ', $message['member']['gender']['image'], '
  • '; // Show their personal text? if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') echo '
  • ', $message['member']['blurb'], '
  • '; // Any custom fields to show as icons? if (!empty($message['member']['custom_fields'])) { $shown = false; foreach ($message['member']['custom_fields'] as $custom) { if ($custom['placement'] != 1 || empty($custom['value'])) continue; if (empty($shown)) { $shown = true; echo '
    1. '; } echo '
    2. ', $custom['value'], '
    3. '; } if ($shown) echo '
  • '; } // This shows the popular messaging icons. if ($message['member']['has_messenger'] && $message['member']['can_view_profile']) echo '
    1. ', !empty($message['member']['icq']['link']) ? '
    2. ' . $message['member']['icq']['link'] . '
    3. ' : '', ' ', !empty($message['member']['skype']['link']) ? '
    4. ' . $message['member']['skype']['link'] . '
    5. ' : '', ' ', !empty($message['member']['aim']['link']) ? '
    6. ' . $message['member']['aim']['link'] . '
    7. ' : '', ' ', !empty($message['member']['yim']['link']) ? '
    8. ' . $message['member']['yim']['link'] . '
    9. ' : '', '
  • '; // Show the website and email address buttons. if ($message['member']['show_profile_buttons']) { echo '
    1. '; // Don't show an icon if they haven't specified a website. if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) echo '
    2. ', ($settings['use_image_buttons'] ? '' . $message['member']['website']['title'] . '' : $txt['www']), '
    3. '; // Don't show the email address if they want it hidden. if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email']) echo '
    4. ', ($settings['use_image_buttons'] ? '' . $txt['email'] . '' : $txt['email']), '
    5. '; // Since we know this person isn't a guest, you *can* message them. if ($context['can_send_pm']) echo '
    6. ', $settings['use_image_buttons'] ? '' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '
    7. '; echo '
  • '; } // Any custom fields for standard placement? if (!empty($message['member']['custom_fields'])) { foreach ($message['member']['custom_fields'] as $custom) if (empty($custom['placement']) || empty($custom['value'])) echo '
  • ', $custom['title'], ': ', $custom['value'], '
  • '; } } // Otherwise, show the guest's email. elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['can_send_email']) echo ' '; // Show the IP to this user for this post - because you can moderate? if (!empty($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'], '
  • '; // Are we showing the warning status? // Don't show these things for guests. if (!$message['member']['is_guest'] && $message['member']['can_see_warning']) echo '
  • ', $context['can_issue_warning'] ? '' : '', '', $txt['user_warn_' . $message['member']['warning_status']], '', $context['can_issue_warning'] ? '' : '', '', $txt['warn_' . $message['member']['warning_status']], '
  • '; echo '
'; echo '
'; //Some people dont want subject ... The div is still required or quick edit breaks... echo'
', (empty($settings['subject_toggle']) ? '' : '' . $message['subject'] . ''), '
'; echo'
', !empty($message['counter']) ? ' #' . $message['counter'] : '', ' ', '
', $message['time'], ''; // Show "<< Last Edit: Time by Person >>" if this post was edited. if ($settings['show_modify'] && !empty($message['modified']['name'])) echo ' ', $message['modified']['last_edit_text'], ' '; echo '
'; // Ignoring this user? Hide the post. if ($ignoring) echo '
', $txt['ignoring_user'], '
'; // 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 '
'; // Assuming there are attachments... if (!empty($message['attachment'])) { echo ' '; } echo '
'; // Maybe they want to report this post to the moderator(s)? if ($context['can_report_moderator']) echo ' '; // Show the quickbuttons, for various operations on posts. if ($message['can_approve'] || $message['can_unapprove'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'] || $context['can_quote']) { echo '
    '; // Can they reply? Have they turned on quick reply? if ($context['can_quote'] && !empty($options['display_quick_reply'])) echo '
  • ', $txt['quote_action'], '
  • '; // So... quick reply is off, but they *can* reply? elseif ($context['can_quote']) echo '
  • ', $txt['quote_action'], '
  • '; // Can the user modify the contents of this post? Show the modify inline image. if ($message['can_modify']) echo '
  • ', $txt['modify_msg'], '', $txt['quick_edit'], '
  • '; if ($message['can_approve'] || $message['can_unapprove'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg']) echo '
  • ', $txt['post_options']; echo '
      '; // Can the user modify the contents of this post? if ($message['can_modify']) echo '
    • ', $txt['modify'], '
    • '; // How about... even... remove it entirely?! if ($message['can_remove']) echo '
    • ', $txt['remove'], '
    • '; // What about splitting it off the rest of the topic? if ($context['can_split'] && !empty($context['real_num_replies'])) echo '
    • ', $txt['split'], '
    • '; // 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'], '
    • '; // Can we restore topics? if ($context['can_restore_msg']) echo '
    • ', $txt['restore_message'], '
    • '; // Maybe we can approve it, maybe we should? if ($message['can_approve']) echo '
    • ', $txt['approve'], '
    • '; // Maybe we can unapprove it? if ($message['can_unapprove']) echo '
    • ', $txt['unapprove'], '
    • '; echo '
  • '; // 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 '
'; // 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 '
    '; } echo '
  • ', $custom['value'], '
  • '; } if ($shown) echo '
'; } // Show the member's signature? if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) echo ' '; echo '

'; } echo '
'; // Show the page index... "Pages: [1]". echo '
', template_button_strip($context['normal_buttons'], 'right'), ' ', !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '' . $txt['go_up'] . '' : '', '
'; // Show the lower breadcrumbs. theme_linktree(); echo '
', template_button_strip($context['mod_buttons'], 'bottom', array('id' => 'moderationbuttons_strip')), '
'; // Show the jumpto box, or actually...let Javascript do it. echo '
 
'; if ($context['can_reply'] && !empty($options['display_quick_reply'])) { echo '

', $txt['quick_reply'], '

1 ? '' : ' style="display: none"', '>

', $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'] ? '
' : '', '
'; // Guests just need more. if ($context['user']['is_guest']) echo ' ', $txt['name'], ': ', $txt['email'], ':
'; // Is visual verification enabled? if ($context['require_verification']) echo ' ', $txt['verification'], ':', template_control_verification($context['visual_verification_id'], 'quick_reply'), '
'; // Using the full editor if (empty($options['use_editor_quick_reply'])) { echo '
'; } else { // Show the actual posting area... if ($context['show_bbc']) { echo '
'; } // What about smileys? if (!empty($context['smileys']['postform']) || !empty($context['smileys']['popup'])) echo '
'; echo ' ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), ' '; } echo '
'; if ($context['show_spellchecking']) echo ' '; if ($context['drafts_save'] && !empty($options['drafts_show_saved_enabled'])) echo ' '; if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled'])) echo '
'; echo '
'; } else echo '
'; // draft autosave available and the user has it enabled? if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled'])) echo ' '; if ($context['show_spellchecking']) echo '
'; echo ' '; } ?>