Chris@76: Chris@76:
';
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:
', $txt[20], ' | Chris@76:', $txt[330], ' | Chris@76:', $txt[21], ' | Chris@76:', $txt[22], ' | 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:
Chris@76:
Chris@76: ', $board['link'], ' 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: $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; Chris@76: Chris@76: echo ' Chris@76: Chris@76: ', $txt['parent_boards'], ': ', implode(', ', $children), ''; Chris@76: } Chris@76: Chris@76: echo ' Chris@76: |
Chris@76: ', $board['topics'], ' | Chris@76:', $board['posts'], ' | '; 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: echo ' Chris@76:
Chris@76:
Chris@76: ', $board['last_post']['time'], ' Chris@76: ', $txt['smf88'], ' ', $board['last_post']['link'], ' Chris@76: ', $txt[525], ' ', $board['last_post']['member']['link'], ' Chris@76: Chris@76: |
Chris@76:
Chris@76: ![]() ![]() |
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'] ? '![]() |
Chris@76:
', $txt[685], ' | Chris@76:||||
', $txt[214], ' | Chris@76:||||
Chris@76:
Chris@76: ![]() |
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: |||
', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], ' | Chris@76:||||
Chris@76:
Chris@76: ![]() |
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: |
Chris@76: |||
', $txt[331], ' | Chris@76:||||
Chris@76: ', $context['show_member_list'] ? '' : '', '![]() |
Chris@76:
Chris@76: ', $context['show_member_list'] ? '' . $txt[332] . '' : $txt[332], ' Chris@76: ', $txt[200], ' Chris@76: |
Chris@76: |||
', $txt[645], ' | Chris@76:||||
Chris@76:
Chris@76: ![]() |
Chris@76:
Chris@76:
|
Chris@76: |||
', $txt[158], ' | Chris@76:||||
Chris@76: ', $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: |
Chris@76: |||
', $txt[159], ' | Chris@76:||||
Chris@76: ', $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], $context['allow_pm'] ? ' ' . $txt[662] . '' : '', ' ', $txt[663], ' Chris@76: Chris@76: |
Chris@76: |||
Chris@76: ', $txt[34], ' (' . $txt[315] . ') Chris@76: | Chris@76:||||
Chris@76:
Chris@76: ![]() |
Chris@76: Chris@76: Chris@76: | Chris@76: