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

Chris@76: ', $txt['poll'], ' Chris@76:

Chris@76:

Chris@76: ', $context['poll']['question'], ' Chris@76:

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

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

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

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

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

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

'; Chris@76: Chris@76: echo ' Chris@76:
Chris@76:
Chris@76:
'; Chris@76: Chris@76: // Build the poll moderation button array. Chris@76: $poll_buttons = array( Chris@76: 'vote' => array('test' => 'allow_return_vote', 'text' => 'poll_return_vote', 'image' => 'poll_options.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start']), Chris@76: 'results' => array('test' => 'show_view_results_button', 'text' => 'poll_results', 'image' => 'poll_results.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start'] . ';viewresults'), Chris@76: 'change_vote' => array('test' => 'allow_change_vote', 'text' => 'poll_change_vote', 'image' => 'poll_change_vote.gif', 'lang' => true, 'url' => $scripturl . '?action=vote;topic=' . $context['current_topic'] . '.' . $context['start'] . ';poll=' . $context['poll']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']), Chris@76: 'lock' => array('test' => 'allow_lock_poll', 'text' => (!$context['poll']['is_locked'] ? 'poll_lock' : 'poll_unlock'), 'image' => 'poll_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lockvoting;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), Chris@76: 'edit' => array('test' => 'allow_edit_poll', 'text' => 'poll_edit', 'image' => 'poll_edit.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;topic=' . $context['current_topic'] . '.' . $context['start']), Chris@76: 'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), Chris@76: ); Chris@76: Chris@76: template_button_strip($poll_buttons); Chris@76: Chris@76: echo ' Chris@76:

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

', $txt['calendar_linked_events'], '

Chris@76:
Chris@76: Chris@76:
Chris@76:
'; Chris@76: } Chris@76: Chris@76: // Build the normal button array. Chris@76: $normal_buttons = array( Chris@76: 'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message']), Chris@76: 'add_poll' => array('test' => 'can_add_poll', 'text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start']), Chris@76: 'notify' => array('test' => 'can_mark_notify', 'text' => ($context['is_marked_notify'] ? 'unnotify' : 'notify'), 'image' => ($context['is_marked_notify'] ? 'un' : ''). 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), Chris@76: 'mark_unread' => array('test' => 'can_mark_unread', 'text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), Chris@76: 'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'), Chris@76: 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'), Chris@76: ); Chris@76: Chris@76: // Allow adding new buttons easily. Chris@76: call_integration_hook('integrate_display_buttons', array(&$normal_buttons)); Chris@76: Chris@76: // Show the page index... "Pages: [1]". Chris@76: echo ' Chris@76:
Chris@76: Chris@76:
', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_down'] . '' : '', '
Chris@76: Chris@76:
'; Chris@76: Chris@76: // Show the topic information - icon, subject, etc. Chris@76: echo ' Chris@76:
Chris@76:

Chris@76: Chris@76: ', $txt['author'], ' Chris@76: ', $txt['topic'], ': ', $context['subject'], '  (', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ') Chris@76:

'; Chris@76: Chris@76: if (!empty($settings['display_who_viewing'])) Chris@76: { Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // Show just numbers...? Chris@76: if ($settings['display_who_viewing'] == 1) Chris@76: echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members']; Chris@76: // Or show the actual people viewing the topic? Chris@76: else Chris@76: 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'] . ')'); Chris@76: Chris@76: // Now show how many guests are here too. Chris@76: echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], ' Chris@76:
'; Chris@76: } Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // These are some cache image buttons we may want. Chris@76: $reply_button = create_button('quote.gif', 'reply', 'quote', 'align="middle"'); Chris@76: $modify_button = create_button('modify.gif', 'modify', 'modify', 'align="middle"'); Chris@76: $remove_button = create_button('delete.gif', 'remove', 'remove', 'align="middle"'); Chris@76: $split_button = create_button('split.gif', 'split', 'split', 'align="middle"'); Chris@76: $approve_button = create_button('approve.gif', 'approve', 'approve', 'align="middle"'); Chris@76: $restore_message_button = create_button('restore_topic.gif', 'restore_message', 'restore_message', 'align="middle"'); Chris@76: Chris@76: $ignoredMsgs = array(); Chris@76: $removableMessageIDs = array(); Chris@76: Chris@76: // Get all the messages... Chris@76: while ($message = $context['get_message']()) Chris@76: { Chris@76: $is_first_post = !isset($is_first_post) ? true : false; Chris@76: $ignoring = false; Chris@76: if ($message['can_remove']) Chris@76: $removableMessageIDs[] = $message['id']; Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // Are we ignoring this message? Chris@76: if (!empty($message['is_ignored'])) Chris@76: { Chris@76: $ignoring = true; Chris@76: $ignoredMsgs[] = $message['id']; Chris@76: } Chris@76: Chris@76: // Show the message anchor and a "new" anchor if this message is new. Chris@76: if ($message['id'] != $context['first_message']) Chris@76: echo ' Chris@76: ', $message['first_new'] ? '' : ''; Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // Show information about the poster of this message. Chris@76: echo ' Chris@76:
Chris@76:

', $message['member']['link'], '

Chris@76:
    '; Chris@76: Chris@76: // Show the member's custom title, if they have one. Chris@76: if (isset($message['member']['title']) && $message['member']['title'] != '') Chris@76: echo ' Chris@76:
  • ', $message['member']['title'], '
  • '; Chris@76: Chris@76: // Show the member's primary group (like 'Administrator') if they have one. Chris@76: if (isset($message['member']['group']) && $message['member']['group'] != '') Chris@76: echo ' Chris@76:
  • ', $message['member']['group'], '
  • '; Chris@76: Chris@76: // Don't show these things for guests. Chris@76: if (!$message['member']['is_guest']) Chris@76: { Chris@76: // 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. Chris@76: if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') Chris@76: echo ' Chris@76:
  • ', $message['member']['post_group'], '
  • '; Chris@76: echo ' Chris@76:
  • ', $message['member']['group_stars'], '
  • '; Chris@76: Chris@76: // Is karma display enabled? Total or +/-? Chris@76: if ($modSettings['karmaMode'] == '1') Chris@76: echo ' Chris@76:
  • ', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
  • '; Chris@76: elseif ($modSettings['karmaMode'] == '2') Chris@76: echo ' Chris@76:
  • ', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
  • '; Chris@76: Chris@76: // Is this user allowed to modify this member's karma? Chris@76: if ($message['member']['karma']['allow']) Chris@76: echo ' Chris@76:
  • Chris@76: ', $modSettings['karmaApplaudLabel'], ' Chris@76: ', $modSettings['karmaSmiteLabel'], ' Chris@76:
  • '; Chris@76: Chris@76: // Show online and offline buttons? Chris@76: if (!empty($modSettings['onlineEnable'])) Chris@76: echo ' Chris@76:
  • ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '
  • '; Chris@76: Chris@76: // Show the member's gender icon? Chris@76: if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender'])) Chris@76: echo ' Chris@76:
  • ', $txt['gender'], ': ', $message['member']['gender']['image'], '
  • '; Chris@76: Chris@76: // Show how many posts they have made. Chris@76: if (!isset($context['disabled_fields']['posts'])) Chris@76: echo ' Chris@76:
  • ', $txt['member_postcount'], ': ', $message['member']['posts'], '
  • '; Chris@76: Chris@76: // Any custom fields for standard placement? Chris@76: if (!empty($message['member']['custom_fields'])) Chris@76: { Chris@76: foreach ($message['member']['custom_fields'] as $custom) Chris@76: if (empty($custom['placement']) && !empty($custom['value'])) Chris@76: echo ' Chris@76:
  • ', $custom['title'], ': ', $custom['value'], '
  • '; Chris@76: } Chris@76: Chris@76: // Show avatars, images, etc.? Chris@76: if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) Chris@76: echo ' Chris@76:
  • ', $message['member']['avatar']['image'], '
  • '; Chris@76: Chris@76: // Show their personal text? Chris@76: if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') Chris@76: echo ' Chris@76:
  • ', $message['member']['blurb'], '
  • '; Chris@76: Chris@76: // Any custom fields to show as icons? Chris@76: if (!empty($message['member']['custom_fields'])) Chris@76: { Chris@76: $shown = false; Chris@76: foreach ($message['member']['custom_fields'] as $custom) Chris@76: { Chris@76: if ($custom['placement'] != 1 || empty($custom['value'])) Chris@76: continue; Chris@76: if (empty($shown)) Chris@76: { Chris@76: $shown = true; Chris@76: echo ' Chris@76:
  • Chris@76:
      '; Chris@76: } Chris@76: echo ' Chris@76:
    • ', $custom['value'], '
    • '; Chris@76: } Chris@76: if ($shown) Chris@76: echo ' Chris@76:
    Chris@76:
  • '; Chris@76: } Chris@76: Chris@76: // This shows the popular messaging icons. Chris@76: if ($message['member']['has_messenger'] && $message['member']['can_view_profile']) Chris@76: echo ' Chris@76:
  • Chris@76:
      Chris@76: ', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '
    • ' . $message['member']['icq']['link'] . '
    • ' : '', ' Chris@76: ', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '
    • ' . $message['member']['msn']['link'] . '
    • ' : '', ' Chris@76: ', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '
    • ' . $message['member']['aim']['link'] . '
    • ' : '', ' Chris@76: ', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '
    • ' . $message['member']['yim']['link'] . '
    • ' : '', ' Chris@76:
    Chris@76:
  • '; Chris@76: Chris@76: // Show the profile, website, email address, and personal message buttons. Chris@76: if ($settings['show_profile_buttons']) Chris@76: { Chris@76: echo ' Chris@76:
  • Chris@76: Chris@76:
  • '; Chris@76: } Chris@76: Chris@76: // Are we showing the warning status? Chris@76: if ($message['member']['can_see_warning']) Chris@76: echo ' Chris@76:
  • ', $context['can_issue_warning'] ? '' : '', '', $txt['user_warn_' . $message['member']['warning_status']], '', $context['can_issue_warning'] ? '' : '', '', $txt['warn_' . $message['member']['warning_status']], '
  • '; Chris@76: } Chris@76: // Otherwise, show the guest's email. Chris@76: elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum'))) Chris@76: echo ' Chris@76:
  • ', ($settings['use_image_buttons'] ? '' . $txt['email'] . '' : $txt['email']), '
  • '; Chris@76: Chris@76: // Done with the information about the poster... on to the post itself. Chris@76: echo ' Chris@76:
Chris@76:
Chris@76:
Chris@76:
Chris@76:
Chris@76:
Chris@76:
Chris@76: ', $message['subject'], ' Chris@76:
Chris@76:
« ', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ': ', $message['time'], ' »
Chris@76:
Chris@76:
'; Chris@76: Chris@76: // If this is the first post, (#0) just say when it was posted - otherwise give the reply #. Chris@76: if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg']) Chris@76: echo ' Chris@76:
    '; Chris@76: Chris@76: // Maybe we can approve it, maybe we should? Chris@76: if ($message['can_approve']) Chris@76: echo ' Chris@76:
  • ', $approve_button, '
  • '; Chris@76: Chris@76: // Can they reply? Have they turned on quick reply? Chris@76: if ($context['can_quote'] && !empty($options['display_quick_reply'])) Chris@76: echo ' Chris@76:
  • ', $reply_button, '
  • '; Chris@76: Chris@76: // So... quick reply is off, but they *can* reply? Chris@76: elseif ($context['can_quote']) Chris@76: echo ' Chris@76:
  • ', $reply_button, '
  • '; Chris@76: Chris@76: // Can the user modify the contents of this post? Chris@76: if ($message['can_modify']) Chris@76: echo ' Chris@76:
  • ', $modify_button, '
  • '; Chris@76: Chris@76: // How about... even... remove it entirely?! Chris@76: if ($message['can_remove']) Chris@76: echo ' Chris@76:
  • ', $remove_button, '
  • '; Chris@76: Chris@76: // What about splitting it off the rest of the topic? Chris@76: if ($context['can_split'] && !empty($context['real_num_replies'])) Chris@76: echo ' Chris@76:
  • ', $split_button, '
  • '; Chris@76: Chris@76: // Can we restore topics? Chris@76: if ($context['can_restore_msg']) Chris@76: echo ' Chris@76:
  • ', $restore_message_button, '
  • '; Chris@76: Chris@76: // Show a checkbox for quick moderation? Chris@76: if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg']) Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // Ignoring this user? Hide the post. Chris@76: if ($ignoring) Chris@76: echo ' Chris@76:
Chris@76: ', $txt['ignoring_user'], ' Chris@76: Chris@76:
'; Chris@76: Chris@76: // Show the post itself, finally! Chris@76: echo ' Chris@76:
Chris@76:
'; Chris@76: Chris@76: if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id']) Chris@76: echo ' Chris@76:
Chris@76: ', $txt['post_awaiting_approval'], ' Chris@76:
'; Chris@76: echo ' Chris@76:
', $message['body'], '
Chris@76:
', $message['can_modify'] ? ' Chris@76: ' : ''; Chris@76: Chris@76: // Assuming there are attachments... Chris@76: if (!empty($message['attachment'])) Chris@76: { Chris@76: // Now for the attachments, signature, ip logged, etc... Chris@76: echo ' Chris@76: '; Chris@76: } Chris@76: Chris@76: echo ' Chris@76:
Chris@76:
Chris@76:
'; Chris@76: Chris@76: // Show "« Last Edit: Time by Person »" if this post was edited. Chris@76: if ($settings['show_modify'] && !empty($message['modified']['name'])) Chris@76: echo ' Chris@76: « ', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], ' »'; Chris@76: Chris@76: echo ' Chris@76:
Chris@76:
'; Chris@76: Chris@76: // Maybe they want to report this post to the moderator(s)? Chris@76: if ($context['can_report_moderator']) Chris@76: echo ' Chris@76: ', $txt['report_to_mod'], '  '; Chris@76: Chris@76: // Can we issue a warning because of this post? Remember, we can't give guests warnings. Chris@76: if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest']) Chris@76: echo ' Chris@76: ', $txt['issue_warning_post'], ''; Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: // Show the IP to this user for this post - because you can moderate? Chris@76: if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) Chris@76: echo ' Chris@76: ', $message['member']['ip'], ' (?)'; Chris@76: // Or, should we show it because this is you? Chris@76: elseif ($message['can_see_ip']) Chris@76: echo ' Chris@76: ', $message['member']['ip'], ''; Chris@76: // Okay, are you at least logged in? Then we can show something about why IPs are logged... Chris@76: elseif (!$context['user']['is_guest']) Chris@76: echo ' Chris@76: ', $txt['logged'], ''; Chris@76: // Otherwise, you see NOTHING! Chris@76: else Chris@76: echo ' Chris@76: ', $txt['logged']; Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // Are there any custom profile fields for above the signature? Chris@76: if (!empty($message['member']['custom_fields'])) Chris@76: { Chris@76: $shown = false; Chris@76: foreach ($message['member']['custom_fields'] as $custom) Chris@76: { Chris@76: if ($custom['placement'] != 2 || empty($custom['value'])) Chris@76: continue; Chris@76: if (empty($shown)) Chris@76: { Chris@76: $shown = true; Chris@76: echo ' Chris@76:
Chris@76:
    ', $message['member']['signature'], '
'; Chris@76: Chris@76: echo ' Chris@76:
Chris@76:
Chris@76:
'; Chris@76: } Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: echo ' Chris@76:
Chris@76: '; Chris@76: Chris@76: echo ' Chris@76:
Chris@76: Chris@76:
', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_up'] . '' : '', '
Chris@76:
', $context['previous_next'], '
Chris@76:
'; Chris@76: Chris@76: // Show the lower breadcrumbs. Chris@76: theme_linktree(); Chris@76: Chris@76: $mod_buttons = array( Chris@76: 'move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'), Chris@76: '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']), Chris@76: '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']), Chris@76: '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']), Chris@76: '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']), Chris@76: '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'), Chris@76: ); Chris@76: Chris@76: // Restore topic. eh? No monkey business. Chris@76: if ($context['can_restore_topic']) Chris@76: $mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']); Chris@76: Chris@76: // Allow adding new mod buttons easily. Chris@76: call_integration_hook('integrate_mod_buttons', array(&$mod_buttons)); Chris@76: Chris@76: echo ' Chris@76:
', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '
'; Chris@76: Chris@76: // Show the jumpto box, or actually...let Javascript do it. Chris@76: echo ' Chris@76:
Chris@76:
 
Chris@76:

'; Chris@76: Chris@76: if ($context['can_reply'] && !empty($options['display_quick_reply'])) Chris@76: { Chris@76: echo ' Chris@76: Chris@76:
'; Chris@76: Chris@76: echo ' Chris@76:

Chris@76: Chris@76: + Chris@76: Chris@76: ', $txt['quick_reply'], ' Chris@76:

Chris@76: Chris@76:
'; Chris@76: } Chris@76: Chris@76: if ($context['show_spellchecking']) Chris@76: echo ' Chris@76:
Chris@76: '; Chris@76: Chris@76: echo ' Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: ?>