Chris@76: Chris@76: ', $txt['members'], ': ', $context['common_stats']['total_members'], '  •  ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], '  •  ', $txt['topics'], ': ', $context['common_stats']['total_topics'], ' Chris@76: ', ($settings['show_latest_member'] ? '
' . $txt['welcome_member'] . ' ' . $context['common_stats']['latest_member']['link'] . '' . $txt['newest_member'] : '') , ' Chris@76:

'; Chris@76: Chris@76: // Show the news fader? (assuming there are things to show...) Chris@76: if ($settings['show_newsfader'] && !empty($context['fader_news_lines'])) Chris@76: { Chris@76: echo ' Chris@76:
Chris@76:

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

Chris@76:
Chris@76:
', $context['news_lines'][0], '
Chris@76:
Chris@76:
Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: /* Each category in categories is made up of: Chris@76: id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?), Chris@76: new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image), Chris@76: and boards. (see below.) */ Chris@76: foreach ($context['categories'] as $category) Chris@76: { Chris@76: // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed) Chris@76: if (empty($category['boards']) && !$category['is_collapsed']) Chris@76: continue; Chris@76: Chris@76: echo ' Chris@76:
Chris@76:

'; Chris@76: Chris@76: if (!$context['user']['is_guest'] && !empty($category['show_unread'])) Chris@76: echo ' Chris@76: ', $txt['view_unread_category'], ''; Chris@76: Chris@76: // If this category even can collapse, show a link to collapse it. Chris@76: if ($category['can_collapse']) Chris@76: echo ' Chris@76: ', $category['collapse_image'], ' '; Chris@76: Chris@76: echo $category['link']; Chris@76: Chris@76: echo ' Chris@76:

'; Chris@76: Chris@76: // Assuming the category hasn't been collapsed... Chris@76: if (!$category['is_collapsed']) Chris@76: { Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: /* Each board in each category's boards has: Chris@76: new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.), Chris@76: children (see below.), link_children (easier to use.), children_new (are they new?), Chris@76: topics (# of), posts (# of), link, href, and last_post. (see below.) */ Chris@76: foreach ($category['boards'] as $board) Chris@76: { Chris@76: echo ' Chris@76: 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: ', $txt['new_posts'], ''; Chris@76: // Is it a redirection board? Chris@76: elseif ($board['is_redirect']) Chris@76: echo ' Chris@76: *'; Chris@76: // No new posts at all! The agony!! Chris@76: else Chris@76: echo ' Chris@76: ', $txt['old_posts'], ''; Chris@76: Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: ', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
Chris@76: ', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], ' Chris@76: 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['in'], ' ', $board['last_post']['link'], '
Chris@76: ', $txt['on'], ' ', $board['last_post']['time']; Chris@76: echo ' Chris@76: Chris@76:
'; Chris@76: Chris@76: // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) Chris@76: if (!empty($board['children'])) Chris@76: { Chris@76: // Sort the links into an array with new boards bold so it can be imploded. Chris@76: $children = array(); Chris@76: /* Each child in each board's children has: Chris@76: id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ Chris@76: foreach ($board['children'] as $child) Chris@76: { Chris@76: if (!$child['is_redirect']) Chris@76: $child['link'] = '' . $child['name'] . ''; Chris@76: else Chris@76: $child['link'] = '' . $child['name'] . ''; Chris@76: Chris@76: // Has it posts awaiting approval? Chris@76: if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) Chris@76: $child['link'] .= ' (!)'; Chris@76: Chris@76: $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; Chris@76: } Chris@76: echo ' Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: } Chris@76: echo ' 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:
', $txt['parent_boards'], ': ', implode(', ', $children), '
'; Chris@76: } Chris@76: echo ' Chris@76:
'; Chris@76: } Chris@76: Chris@76: if ($context['user']['is_logged']) Chris@76: { Chris@76: echo ' Chris@76:
Chris@76:
Chris@76:
Chris@76: ', $txt['new_posts'], ' Chris@76: ', $txt['old_posts'], ' Chris@76:
'; Chris@76: Chris@76: // Mark read button. Chris@76: $mark_read_button = array( Chris@76: 'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']), Chris@76: ); Chris@76: Chris@76: // Show the mark all as read button? Chris@76: if ($settings['show_mark_read'] && !empty($context['categories'])) Chris@76: template_button_strip($mark_read_button, 'top'); Chris@76: Chris@76: echo ' Chris@76:
Chris@76:
'; Chris@76: } Chris@76: Chris@76: template_info_center(); Chris@76: } Chris@76: Chris@76: function template_info_center() Chris@76: { Chris@76: global $context, $settings, $options, $txt, $scripturl, $modSettings; Chris@76: Chris@76: // Here's where the "Info Center" starts... Chris@76: echo ' Chris@76:
Chris@76:

Chris@76: Chris@76: ', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), ' Chris@76:

Chris@76: Chris@76:
'; Chris@76: } Chris@76: ?>