'; foreach ($context['boards'] as $board) { 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'] . ($child['new'] ? '' . $txt['new'] . '' : '') . ''; 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['sub_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']) || !empty($board['moderator_groups'])) echo '

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

'; // Show some basic information about the number of posts, etc. echo '

', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '

'; if (!empty($board['last_post']['id'])) echo '

', $board['last_post']['last_post_message'], '

'; echo '

', $txt['sub_boards'], ': ', implode(', ', $children), '

'; } // They can only mark read if they are logged in and it's enabled! if (!$context['user']['is_logged']) unset($context['normal_buttons']['markread']); if (!$context['no_topic_listing']) { echo '
', $context['menu_separator'], '', $txt['go_down'], ' ', template_button_strip($context['normal_buttons'], 'right'), '
'; if ($context['description'] != '' || !empty($context['moderators'])) { echo '

', $context['name'], ' - 

'; if ($context['description'] != '') echo ' ', $context['description'], ' '; if (!empty($context['moderators'])) echo ' ', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.'; echo '

'; } // If Quick Moderation is enabled start the form. if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) echo '
'; echo '
'; if (!empty($settings['display_who_viewing'])) { echo '

'; 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']) || $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']; 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'])) echo ' '; else 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 ' '; } // No topics.... just say, "sorry bub". else echo ' '; echo ' '; // If this person can approve items and we have some awaiting approval tell them. if (!empty($context['unapproved_posts_message'])) { echo ' '; } foreach ($context['topics'] as $topic) { $color_class = 'windowbg'; // 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'] ? 'approvetopic ' : 'approvepost ') . $color_class; // Sticky topics should get a different color, too. if ($topic['is_sticky']) $color_class = 'sticky ' . $color_class; // Locked topics get special treatment as well. if ($topic['is_locked']) $color_class = 'locked ' . $color_class; // Some columns require a different shade of the color class. $alternate_class = $color_class . '2'; // @todo - [WIP] Markup can be cleaned up later. CSS can go in the CSS files later. 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 '
  ', $context['topics_headers']['subject'], ' / ', $context['topics_headers']['starter'], ' ', $context['topics_headers']['replies'], ' / ', $context['topics_headers']['views'], '', $context['topics_headers']['last_post'], '', $context['topics_headers']['last_post'], '   ', $txt['topic_alert_none'], '  
! ', $context['unapproved_posts_message'], '
', $topic['is_posted_in'] ? '' : '', '
'; // Now we handle the icons echo '
'; if ($topic['is_locked']) echo ' '; if ($topic['is_sticky']) echo ' '; if ($topic['is_redirect']) echo ' '; if ($topic['is_poll']) echo ' '; echo '
'; echo '
', $topic['new'] && $context['user']['is_logged'] ? '' . $txt['new'] . '' : '', ' ', $topic['first_post']['link'], ($context['can_approve_posts'] && !$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '

', $txt['started_by'], ' ', $topic['first_post']['member']['link'], ' ', $topic['pages'], '


', $topic['replies'], ' ', $txt['replies'], '
', $topic['views'], ' ', $txt['views'], '
', sprintf($txt['last_post_topic'], '' . $topic['last_post']['time'] . '', $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 ''; if ($topic['quick_mod']['lock']) echo ''; if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) echo '
'; if ($topic['quick_mod']['sticky']) echo ''; if ($topic['quick_mod']['move']) echo ''; } 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($context['normal_buttons'], 'right'), ' ', $context['menu_separator'], '', $txt['go_up'], '
'; } // Show breadcrumbs at the bottom too. theme_linktree(); if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) echo ' '; // Javascript for inline editing. echo ' '; template_topic_legend(); } function template_topic_legend() { global $context, $settings, $txt, $modSettings; echo '

 

'; if (empty($context['no_topic_listing'])) echo '

', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? ' ' . $txt['participation_caption'] . '
' : '', ' '. ($modSettings['pollMode'] == '1' ? ' ' . $txt['poll'] : '') . '
' . $txt['moved_topic'] . '

' . $txt['locked_topic'] . '
' . $txt['sticky_topic'] . '

'; if (!empty($context['jump_to'])) echo ' '; echo '
'; } ?>