', $txt['pages'], ': ', $context['page_index'], '
'; foreach ($context['posts'] as $post) { // This is far from ideal, but oh well - create buttons for the post. $button_set = array(); if ($post['can_delete']) $button_set['delete'] = array('text' => 'remove', 'image' => 'delete.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['remove_message'] . '?\');"', 'url' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id']); if ($post['can_reply']) $button_set['reply'] = array('text' => 'reply', 'image' => 'reply_sm.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start']); if ($post['can_quote']) $button_set['quote'] = array('text' => 'reply_quote', 'image' => 'quote.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id']); if ($post['can_mark_notify']) $button_set['notify'] = array('text' => 'notify_replies', 'image' => 'notify_sm.gif', 'lang' => true, 'url' => $scripturl . '?action=notify;topic=' . $post['topic'] . '.' . $post['start']); echo ' '; // Are we using tabs? if (!empty($settings['use_tabs'])) { echo '
 ', $post['counter'], ' 
 ', $post['category']['link'], ' / ', $post['board']['link'], ' / ', $post['link'], '
 ', $txt['on'], ': ', $post['time'], ' 
', $txt['started_by'], ' ' . $post['first_poster']['link'] . ' - ' . $txt['last_post'] . ' ' . $txt['by'] . ' ' . $post['poster']['link'] . '
' . $post['message'] . '
'; if (!empty($button_set)) echo '
', template_button_strip($button_set, 'top'), '
'; } else { if (!empty($button_set)) echo '
', template_button_strip($button_set, 'top'), '
'; echo ' '; } echo '
'; } echo '
', $txt['pages'], ': ', $context['page_index'], '
'; } function template_unread() { global $context, $settings, $options, $txt, $scripturl, $modSettings; $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read']; if ($showCheckboxes) echo '
'; if ($settings['show_mark_read']) { // Generate the button strip. $mark_read = array( 'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']), ); if ($showCheckboxes) $mark_read['markselectread'] = array( 'text' => 'quick_mod_markread', 'image' => 'markselectedread.gif', 'lang' => true, 'url' => 'javascript:document.quickModForm.submit();', ); } echo '
', $txt['pages'], ': ', $context['page_index'], '
'; if (!empty($mark_read) && !empty($settings['use_tabs'])) template_button_strip($mark_read, 'bottom'); echo '
'; echo '
'; if (!empty($context['topics'])) { echo ' '; if ($showCheckboxes) echo ' '; } else echo ' '; echo ' '; foreach ($context['topics'] as $topic) { // Do we want to separate the sticky and lock status out? if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false) $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky')); if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'locked') !== false) $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked')); echo ' '; if ($showCheckboxes) echo ' '; echo ' '; } if (!empty($context['topics']) && !$context['showing_all_topics']) echo ' '; if (empty($settings['use_tabs']) && !empty($mark_read)) echo ' '; echo '
  ', $txt['subject'], $context['sort_by'] == 'subject' ? ' ' : '', ' ', $txt['started_by'], $context['sort_by'] == 'starter' ? ' ' : '', ' ', $txt['replies'], $context['sort_by'] == 'replies' ? ' ' : '', ' ', $txt['views'], $context['sort_by'] == 'views' ? ' ' : '', ' ', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' ' : '', ' ', $context['showing_all_topics'] ? $txt['msg_alert_none'] : $txt['unread_topics_visit_none'], '
', $topic['is_locked'] && !empty($settings['separate_sticky_lock']) ? ' ' : '', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? ' ' : '', $topic['first_post']['link'], ' ', $txt['new'], ' ', $topic['pages'], ' ', $txt['in'], ' ', $topic['board']['link'], ' ', $topic['first_post']['member']['link'], ' ', $topic['replies'], ' ', $topic['views'], ' ', $txt['last_post'], ' ', $topic['last_post']['time'], '
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
', $txt['unread_topics_all'], '
', template_button_strip($mark_read, 'top'), '
', $txt['pages'], ': ', $context['page_index'], '
'; if (!empty($settings['use_tabs']) && !empty($mark_read)) template_button_strip($mark_read, 'top'); echo '

'; if ($showCheckboxes) echo '
'; echo '
    ', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
  • ' . $txt['participation_caption'] . '
  • ' : '', '
  • ' . $txt['normal_topic'] . '
  • ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '
  • ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '
  • ' . $txt['locked_topic'] . '
  • ' . ($modSettings['enableStickyTopics'] == '1' ? '
  • ' . $txt['sticky_topic'] . '
  • ' : '') . ($modSettings['pollMode'] == '1' ? '
  • ' . $txt['poll'] : '') . '
'; } function template_replies() { global $context, $settings, $options, $txt, $scripturl, $modSettings; $showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read']; if ($showCheckboxes) echo '
'; if (isset($context['topics_to_mark']) && !empty($settings['show_mark_read'])) { // Generate the button strip. $mark_read = array( 'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']), ); if ($showCheckboxes) $mark_read['markselectread'] = array( 'text' => 'quick_mod_markread', 'image' => 'markselectedread.gif', 'lang' => true, 'url' => 'javascript:document.quickModForm.submit();', ); } if (!empty($settings['use_tabs'])) { echo '
', $txt['pages'], ': ', $context['page_index'], '
'; if (!empty($mark_read)) template_button_strip($mark_read, 'bottom'); echo '
'; } echo '
'; if (!empty($context['topics'])) { echo ' '; if ($showCheckboxes) echo ' '; } else echo ' '; echo ' '; foreach ($context['topics'] as $topic) { // separate lock and sticky again? if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false) $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky')); if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'locked') !== false) $topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked')); echo ' '; if ($showCheckboxes) echo ' '; echo ' '; } if (empty($settings['use_tabs']) && !empty($mark_read)) echo ' '; echo '
  ', $txt['subject'], $context['sort_by'] == 'subject' ? ' ' : '', ' ', $txt['started_by'], $context['sort_by'] == 'starter' ? ' ' : '', ' ', $txt['replies'], $context['sort_by'] == 'replies' ? ' ' : '', ' ', $txt['views'], $context['sort_by'] == 'views' ? ' ' : '', ' ', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' ' : '', ' ' . $txt['msg_alert_none'] . '
', $topic['is_locked'] && !empty($settings['separate_sticky_lock']) ? '' : '', ' ', $topic['is_sticky'] && !empty($settings['separate_sticky_lock']) ? '' : '', ' ', $topic['first_post']['link'], ' ', $txt['new'], ' ', $topic['pages'], ' ', $txt['in'], ' ', $topic['board']['link'], ' ', $topic['first_post']['member']['link'], ' ', $topic['replies'], ' ', $topic['views'], ' ', $txt['last_post'], ' ', $topic['last_post']['time'], '
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
', template_button_strip($mark_read, 'top'), '
', $txt['pages'], ': ', $context['page_index'], '
'; if (!empty($settings['use_tabs']) && !empty($mark_read)) template_button_strip($mark_read, 'top'); echo '

'; if ($showCheckboxes) echo '
'; echo '
    ', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
  • ' . $txt['participation_caption'] . '
  • ' : '', '
  • ' . $txt['normal_topic'] . '
  • ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '
  • ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '
  • ' . $txt['locked_topic'] . '
  • ' . ($modSettings['enableStickyTopics'] == '1' ? '
  • ' . $txt['sticky_topic'] . '
  • ' : '') . ($modSettings['pollMode'] == '1' ? '
  • ' . $txt['poll'] : '') . '
'; } ?>