';
// Prepare all the javascript settings.
echo '
', $context['news_lines'][0], '
|
', $txt[20], ' | ', $txt[330], ' | ', $txt[21], ' | ', $txt[22], ' | |
'; // If this category even can collapse, show a link to collapse it. if ($category['can_collapse']) echo ' ', $category['collapse_image'], ''; echo ' ', $category['link'], ' | ||||
', $board['link'], ' ', $board['description']; // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) if (!empty($board['moderators'])) echo ' ', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), ''; // 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) $children[] = $child['new'] ? '' . $child['link'] . '' : $child['link']; echo ' ', $txt['parent_boards'], ': ', implode(', ', $children), ''; } echo ' |
', $board['topics'], ' | ', $board['posts'], ' | '; /* The board's and children's 'last_post's have: time, timestamp (a number that represents the time.), id (of the post), topic (topic id.), link, href, subject, start (where they should go for the first unread post.), and member. (which has id, name, link, href, username in it.) */ echo '
', $board['last_post']['time'], ' ', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link'], ' |
|
'; // Show the mark all as read button? if ($settings['show_mark_read']) echo ' ', ($settings['use_image_buttons'] ? '' : $txt[452]), ''; echo ' |
', $txt[685], ' | ||||
', $txt[214], ' | ||||
';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
', $txt[214], ' ', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ') '; } // Show lots of posts. elseif (!empty($context['latest_posts'])) { echo '
|
||||
', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], ' | ||||
';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), ' '; // People's birthdays. Like mine. And yours, I guess. Kidding. if (!empty($context['calendar_birthdays'])) { echo ' ', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], ' '; /* Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */ foreach ($context['calendar_birthdays'] as $member) echo ' ', $member['is_today'] ? '' : '', $member['name'], $member['is_today'] ? '' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? ' ' : ', '; } // Events like community get-togethers. if (!empty($context['calendar_events'])) { echo ' ', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], ' '; /* Each event in calendar_events should have: title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */ foreach ($context['calendar_events'] as $event) echo ' ', $event['can_edit'] ? '* ' : '', $event['href'] == '' ? '' : '', $event['is_today'] ? '' . $event['title'] . '' : $event['title'], $event['href'] == '' ? '' : '', $event['is_last'] ? ' ' : ', '; // Show a little help text to help them along ;). if ($context['calendar_can_edit']) echo ' (', $txt['calendar_how_edit'], ')'; } echo ' |
||||
', $txt[331], ' | ||||
', $context['show_member_list'] ? '' : '', '', $context['show_member_list'] ? '' : '', ' |
', $context['show_member_list'] ? '' . $txt[332] . '' : $txt[332], ' ', $txt[200], ' |
|||
', $txt[645], ' | ||||
|
||||
', $txt[158], ' | ||||
', $context['show_who'] ? '' : '', '', $context['show_who'] ? '' : '', ' | ';
if ($context['show_who'])
echo '
';
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'];
// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';
// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];
// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];
echo ')';
}
if ($context['show_who'])
echo '';
echo '
';
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ': ', implode(', ', $context['list_users_online']); echo ' ', $context['show_stats'] && !$settings['show_sp1_info'] ? ' ' . $txt['smf223'] . '' : '', ' |
|||
', $txt[159], ' | ||||
', $context['allow_pm'] ? '' : '', '', $context['allow_pm'] ? '' : '', ' |
', $txt[159], ' ', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], $context['allow_pm'] ? ' ' . $txt[662] . '' : '', ' ', $txt[663], ' |
|||
', $txt[34], ' (' . $txt[315] . ') | ||||