Chris@76: '; Chris@76: Chris@76: if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) Chris@76: { Chris@76: echo ' Chris@76:
Chris@76: ';
Chris@76:
Chris@76: // If the board or children is new, show an indicator.
Chris@76: if ($board['new'] || $board['children_new'])
Chris@76: echo '
Chris@76: ![]() ![]() ![]() |
Chris@76:
Chris@76: ', $board['name'], '';
Chris@76:
Chris@76: // Has it outstanding posts for approval?
Chris@76: if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
Chris@76: echo '
Chris@76: (!)';
Chris@76:
Chris@76: echo '
Chris@76:
Chris@76: ', $board['description'] , ' '; Chris@76: Chris@76: // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) Chris@76: if (!empty($board['moderators'])) Chris@76: echo ' Chris@76:', count($board['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), ' '; Chris@76: Chris@76: // Show some basic information about the number of posts, etc. Chris@76: echo ' Chris@76: |
Chris@76:
Chris@76: ', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' |
Chris@76: ';
Chris@76:
Chris@76: /* The board's and children's 'last_post's have:
Chris@76: time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
Chris@76: link, href, subject, start (where they should go for the first unread post.),
Chris@76: and member. (which has id, name, link, href, username in it.) */
Chris@76: if (!empty($board['last_post']['id']))
Chris@76: echo '
Chris@76: ', $txt['last_post'], ' ', $txt['by'], ' ', $board['last_post']['member']['link'], ' |
Chris@76:
', $txt['parent_boards'], ': ', implode(', ', $children), ' |
', $context['description'], '
'; Chris@76: Chris@76: // Create the button set... Chris@76: $normal_buttons = array( Chris@76: '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', 'active' => true), Chris@76: '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'), 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_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']), Chris@76: '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']), Chris@76: ); Chris@76: Chris@76: // They can only mark read if they are logged in and it's enabled! Chris@76: if (!$context['user']['is_logged'] || !$settings['show_mark_read']) Chris@76: unset($normal_buttons['markread']); Chris@76: Chris@76: // Allow adding new buttons easily. Chris@76: call_integration_hook('integrate_messageindex_buttons', array(&$normal_buttons)); Chris@76: Chris@76: if (!$context['no_topic_listing']) Chris@76: { Chris@76: echo ' Chris@76:'; Chris@76: Chris@76: if (!$context['no_topic_listing']) Chris@76: echo ' Chris@76:
', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
Chris@76: ' . $txt['participation_caption'] . '
' : '', '
Chris@76: ' . $txt['normal_topic'] . '
Chris@76: ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '
Chris@76: ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '
Chris@76:
Chris@76: ' . $txt['locked_topic'] . '
' . ($modSettings['enableStickyTopics'] == '1' ? '
Chris@76: ' . $txt['sticky_topic'] . '
' : '') . ($modSettings['pollMode'] == '1' ? '
Chris@76: ' . $txt['poll'] : '') . '
Chris@76: