Chris@76: Chris@76: Chris@76: ', theme_linktree(), ' Chris@76: '; Chris@76: if (!$settings['show_sp1_info']) Chris@76: echo ' Chris@76: ', $txt[19], ': ', $context['common_stats']['total_members'], '  •  ', $txt[95], ': ', $context['common_stats']['total_posts'], '  •  ', $txt[64], ': ', $context['common_stats']['total_topics'], ' Chris@76: ', ($settings['show_latest_member'] ? '
' . $txt[201] . ' ' . $context['common_stats']['latest_member']['link'] . '' . $txt[581] : ''); Chris@76: echo ' Chris@76: Chris@76: 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: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76:
', $txt[102], '
'; Chris@76: Chris@76: // Prepare all the javascript settings. Chris@76: echo ' 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 iamge), Chris@76: and boards. (see below.) */ Chris@76: foreach ($context['categories'] as $category) Chris@76: { Chris@76: echo ' Chris@76:
Chris@76: Chris@76: Chris@76: '; Chris@76: Chris@76: // Assuming the category hasn't been collapsed... Chris@76: if (!$category['is_collapsed']) 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: Chris@76: '; Chris@76: } Chris@76: } Chris@76: Chris@76: echo ' Chris@76:
'; 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 ' Chris@76: ', $category['link'], ' Chris@76:
'; Chris@76: Chris@76: // If the board is new, show a strong indicator. Chris@76: if ($board['new']) Chris@76: echo '', $txt[333], ''; Chris@76: // This board doesn't have new posts, but its children do. Chris@76: elseif ($board['children_new']) Chris@76: echo '', $txt[333], ''; Chris@76: // No new posts at all! The agony!! Chris@76: else Chris@76: echo '', $txt[334], ''; Chris@76: Chris@76: echo ' Chris@76: ', $board['name'], '
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[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '
'; 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: $child['link'] = '' . $child['name'] . ''; Chris@76: $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; Chris@76: } Chris@76: Chris@76: echo ' Chris@76:
', $txt['parent_boards'], ': ', implode(', ', $children), '
'; Chris@76: } Chris@76: Chris@76: // Show some basic information about the number of posts, etc. Chris@76: echo ' Chris@76:
Chris@76: ', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '
Chris@76: ', $board['topics'], ' ', $txt[330], ' 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[22], ' ', $txt[30], ' ', $board['last_post']['time'], '
Chris@76: ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link']; Chris@76: Chris@76: echo ' Chris@76:
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: Chris@76: Chris@76:
Chris@76: ', $txt[333], ' Chris@76: ', $txt[334], ' Chris@76: '; Chris@76: // Show the mark all as read button? Chris@76: if ($settings['show_mark_read']) Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[452] . '' : $txt[452]), ''; Chris@76: echo ' Chris@76:
'; Chris@76: } Chris@76: Chris@76: // Here's where the "Info Center" starts... Chris@76: echo ' Chris@76:
Chris@76:
Chris@76: Chris@76: Chris@76: '; Chris@76: Chris@76: // This is the "Recent Posts" bar. Chris@76: if (!empty($settings['number_recent_posts'])) Chris@76: { Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: // Show information about events, birthdays, and holidays on the calendar. Chris@76: if ($context['show_calendar']) Chris@76: { Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: // Show a member bar. Not heavily ornate, but functional at least. Chris@76: if ($settings['show_member_bar']) Chris@76: { Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: // Show YaBB SP1 style information... Chris@76: if ($settings['show_sp1_info']) Chris@76: { Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: // "Users online" - in order of activity. Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: Chris@76: // If they are logged in, but SP1 style information is off... show a personal message bar. Chris@76: if ($context['user']['is_logged'] && !$settings['show_sp1_info']) Chris@76: { Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: // Show the login bar. (it's only true if they are logged out anyway.) Chris@76: if ($context['show_login_bar']) Chris@76: { Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: echo ' Chris@76:
', $txt[685], '
', $txt[214], '
Chris@76: Chris@76: ', $txt[214], ' Chris@76: '; Chris@76: Chris@76: // Only show one post. Chris@76: if ($settings['number_recent_posts'] == 1) Chris@76: { Chris@76: // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.) Chris@76: echo ' Chris@76: ', $txt[214], ' Chris@76:
Chris@76: ', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')
Chris@76:
'; Chris@76: } Chris@76: // Show lots of posts. Chris@76: elseif (!empty($context['latest_posts'])) Chris@76: { Chris@76: echo ' Chris@76: '; Chris@76: /* Each post in latest_posts has: Chris@76: board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), Chris@76: subject, short_subject (shortened with...), time, link, and href. */ Chris@76: foreach ($context['latest_posts'] as $post) Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: echo ' Chris@76:
[', $post['board']['link'], ']', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '', $post['time'], '
'; Chris@76: } Chris@76: echo ' Chris@76:
', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '
Chris@76: Chris@76: ', $txt['calendar24'], ' Chris@76: Chris@76: '; Chris@76: Chris@76: // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. Chris@76: if (!empty($context['calendar_holidays'])) Chris@76: echo ' Chris@76: ', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '
'; Chris@76: Chris@76: // People's birthdays. Like mine. And yours, I guess. Kidding. Chris@76: if (!empty($context['calendar_birthdays'])) Chris@76: { Chris@76: echo ' Chris@76: ', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], ' '; Chris@76: /* Each member in calendar_birthdays has: Chris@76: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */ Chris@76: foreach ($context['calendar_birthdays'] as $member) Chris@76: echo ' Chris@76: ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '
' : ', '; Chris@76: } Chris@76: // Events like community get-togethers. Chris@76: if (!empty($context['calendar_events'])) Chris@76: { Chris@76: echo ' Chris@76: ', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], ' '; Chris@76: /* Each event in calendar_events should have: Chris@76: title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */ Chris@76: foreach ($context['calendar_events'] as $event) Chris@76: echo ' Chris@76: ', $event['can_edit'] ? '* ' : '', $event['href'] == '' ? '' : '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], $event['href'] == '' ? '' : '', $event['is_last'] ? '
' : ', '; Chris@76: Chris@76: // Show a little help text to help them along ;). Chris@76: if ($context['calendar_can_edit']) Chris@76: echo ' Chris@76: (', $txt['calendar_how_edit'], ')'; Chris@76: } Chris@76: echo ' Chris@76:
Chris@76:
', $txt[331], '
Chris@76: ', $context['show_member_list'] ? '' : '', '', $txt[332], '', $context['show_member_list'] ? '' : '', ' Chris@76: Chris@76: ', $context['show_member_list'] ? '' . $txt[332] . '' : $txt[332], ' Chris@76:
', $txt[200], '
Chris@76:
', $txt[645], '
Chris@76: Chris@76: ', $txt[645], ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76:
Chris@76:
', $txt[490], ': ', $context['common_stats']['total_topics'], '
', $txt[489], ': ', $context['common_stats']['total_posts'], '
', !empty($context['latest_post']) ? ' Chris@76: ' . $txt[659] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')
' : '', ' Chris@76: ', $txt[234], '', $context['show_stats'] ? '
Chris@76: ' . $txt['smf223'] . '' : '', ' Chris@76:
Chris@76: ', $txt[488], ': ', $context['common_stats']['total_members'], '
Chris@76: ', $txt[656], ': ', $context['common_stats']['latest_member']['link'], '
'; Chris@76: // If they are logged in, show their unread message count, etc.. Chris@76: if ($context['user']['is_logged']) Chris@76: echo ' Chris@76: ', $txt['smf199'], ': ', $context['user']['messages'], ' ', $txt['newmessages3'], ': ', $context['user']['unread_messages'], ''; Chris@76: echo ' Chris@76:
Chris@76:
', $txt[158], '
Chris@76: ', $context['show_who'] ? '' : '', '', $txt[158], '', $context['show_who'] ? '' : '', ' Chris@76: '; Chris@76: Chris@76: if ($context['show_who']) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: echo $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users']; Chris@76: Chris@76: // Handle hidden users and buddies. Chris@76: if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies']))) Chris@76: { Chris@76: echo ' ('; Chris@76: Chris@76: // Show the number of buddies online? Chris@76: if ($context['show_buddies']) Chris@76: echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']; Chris@76: Chris@76: // How about hidden users? Chris@76: if (!empty($context['num_users_hidden'])) Chris@76: echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden']; Chris@76: Chris@76: echo ')'; Chris@76: } Chris@76: Chris@76: if ($context['show_who']) Chris@76: echo ''; Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link. Chris@76: if (!empty($context['users_online'])) Chris@76: echo ' Chris@76: ', $txt[140], ':
', implode(', ', $context['list_users_online']); Chris@76: Chris@76: echo ' Chris@76:
', $context['show_stats'] && !$settings['show_sp1_info'] ? ' Chris@76: ' . $txt['smf223'] . '' : '', ' Chris@76:
Chris@76:
', $txt[159], '
Chris@76: ', $context['allow_pm'] ? '' : '', '', $txt[159], '', $context['allow_pm'] ? '' : '', ' Chris@76: Chris@76: ', $txt[159], ' Chris@76:
Chris@76: ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' ', $txt[662], ' ', $txt[663], ' Chris@76:
Chris@76:
', $txt[34], ' (' . $txt[315] . ')
Chris@76: Chris@76: ', $txt[34], ' Chris@76: Chris@76:
Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76:
Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76:
Chris@76:
Chris@76:
'; Chris@76: } Chris@76: Chris@76: ?>