'; if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) { echo '
'; foreach ($context['boards'] as $board) { echo ' '; // If the board or children is new, show an indicator. if ($board['new'] || $board['children_new']) echo ' ', $txt['new_posts'], ''; // Is it a redirection board? elseif ($board['is_redirect']) echo ' *'; // No new posts at all! The agony!! else echo ' ', $txt['old_posts'], ''; echo ' ', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], ' '; /* The board's and children's 'last_post's have: time, timestamp (a number that represents the time.), id (of the post), topic (topic id.), link, href, subject, start (where they should go for the first unread post.), and member. (which has id, name, link, href, username in it.) */ if (!empty($board['last_post']['id'])) echo ' ', $txt['last_post'], ' ', $txt['by'], ' ', $board['last_post']['member']['link'] , '
', $txt['in'], ' ', $board['last_post']['link'], '
', $txt['on'], ' ', $board['last_post']['time']; echo '
'; // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) if (!empty($board['children'])) { // Sort the links into an array with new boards bold so it can be imploded. $children = array(); /* Each child in each board's children has: id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ foreach ($board['children'] as $child) { if (!$child['is_redirect']) $child['link'] = '' . $child['name'] . ''; else $child['link'] = '' . $child['name'] . ''; // Has it posts awaiting approval? if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) $child['link'] .= ' (!)'; $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; } echo ' '; } } echo '
', $txt['parent_boards'], '

', $board['name'], ''; // Has it outstanding posts for approval? if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) echo ' (!)'; echo '

', $board['description'] , '

'; // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) if (!empty($board['moderators'])) echo '

', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '

'; // Show some basic information about the number of posts, etc. echo '
', $txt['parent_boards'], ': ', implode(', ', $children), '
'; } if (!empty($options['show_board_desc']) && $context['description'] != '') { echo '
', $context['description'], '
'; } // Create the button set... $normal_buttons = array( 'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'), 'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'), '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_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']), 'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']), ); // They can only mark read if they are logged in and it's enabled! if (!$context['user']['is_logged'] || !$settings['show_mark_read']) unset($normal_buttons['markread']); // Allow adding new buttons easily. call_integration_hook('integrate_messageindex_buttons', array(&$normal_buttons)); if (!$context['no_topic_listing']) { echo '
', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '  ' . $txt['go_down'] . '' : '', '
', template_button_strip($normal_buttons, 'bottom'), '
'; // If Quick Moderation is enabled start the form. if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) echo '
'; echo '
'; // Are there actually any topics to show? if (!empty($context['topics'])) { echo ' '; // Show a "select all" box for quick moderation? if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) echo ' '; // If it's on in "image" mode, don't show anything but the column. elseif (!empty($context['can_quick_mod'])) echo ' '; echo ' '; } echo ' '; if (!empty($settings['display_who_viewing'])) { echo ' '; } // If this person can approve items and we have some awaiting approval tell them. if (!empty($context['unapproved_posts_message'])) { echo ' '; } // No topics.... just say, "sorry bub". if (empty($context['topics'])) 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')); // Is this topic pending approval, or does it have any posts pending approval? if ($context['can_approve_posts'] && $topic['unapproved_posts']) $color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg'; // Sticky topics should get a different color, too. elseif ($topic['is_sticky'] && !empty($settings['separate_sticky_lock'])) $color_class = 'windowbg3'; // Last, but not least: regular topics. else $color_class = 'windowbg'; // Some columns require a different shade of the color class. $alternate_class = 'windowbg2'; echo ' '; // Show the quick moderation options? if (!empty($context['can_quick_mod'])) { echo ' '; } echo ' '; } if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) { 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' ? ' ' : '', '  
'; if ($settings['display_who_viewing'] == 1) echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members']; else echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
! ', $context['unapproved_posts_message'], '
', $txt['msg_alert_none'], '
'; if (!empty($settings['separate_sticky_lock'])) echo ' ', $topic['is_locked'] ? '' : '', ' ', $topic['is_sticky'] ? '' : ''; echo ' ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '', $topic['is_sticky'] ? '' : ''; // Is this topic new? (assuming they are logged in!) if ($topic['new'] && $context['user']['is_logged']) echo ' ', $txt['new'], ''; echo ' ', $topic['pages'], ' ', $topic['first_post']['member']['link'], ' ', $topic['replies'], ' ', $topic['views'], ' ', $txt['last_post'], ' ', $topic['last_post']['time'], '
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
'; if ($options['display_quick_mod'] == 1) echo ' '; else { // Check permissions on each and show only the ones they are allowed to use. if ($topic['quick_mod']['remove']) echo '', $txt['remove_topic'], ''; if ($topic['quick_mod']['lock']) echo '', $txt['set_lock'], ''; if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) echo '
'; if ($topic['quick_mod']['sticky']) echo '', $txt['set_sticky'], ''; if ($topic['quick_mod']['move']) echo '', $txt['move_topic'], ''; } echo '
'; // Show a list of boards they can move the topic to. if ($context['can_move']) { echo ' '; } echo '
'; // Finish off the form - again. if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) echo '
'; echo '
', template_button_strip($normal_buttons, 'top'), '
' . $txt['pages'] . ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '  ' . $txt['go_up'] . '' : '', '
'; } // Show breadcrumbs at the bottom too. echo '
', theme_linktree(), '
'; echo '

 

'; if (!$context['no_topic_listing']) 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'] : '') . '
'; echo '
'; // Javascript for inline editing. echo ' '; } function theme_show_buttons() { global $context, $settings, $options, $txt, $scripturl; $buttonArray = array(); // If they are logged in, and the mark read buttons are enabled.. if ($context['user']['is_logged'] && $settings['show_mark_read']) $buttonArray[] = '' . $txt['mark_read_short'] . ''; // If the user has permission to show the notification button... ask them if they're sure, though. if ($context['can_mark_notify']) $buttonArray[] = '' . $txt[$context['is_marked_notify'] ? 'unnotify' : 'notify'] . ''; // Are they allowed to post new topics? if ($context['can_post_new']) $buttonArray[] = '' . $txt['new_topic'] . ''; // How about new polls, can the user post those? if ($context['can_post_poll']) $buttonArray[] = '' . $txt['new_poll'] . ''; // Right to left menu should be in reverse order. if ($context['right_to_left']) $buttonArray = array_reverse($buttonArray, true); return implode('  |  ', $buttonArray); } ?>