Chris@76: Chris@76: Chris@76: Chris@76: ', empty($context['robot_no_index']) ? '' : ' Chris@76: ', ' Chris@76: Chris@76: Chris@76: Chris@76: ', $context['page_title'], ''; Chris@76: Chris@76: // The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly. Chris@76: echo ' Chris@76: Chris@76: '; Chris@76: Chris@76: /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) Chris@76: Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. Chris@76: Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. Chris@76: Standards compliance mode happens when you use xhtml... */ Chris@76: if ($context['browser']['needs_size_fix']) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: // Show all the relative links, such as help, search, contents, and the like. Chris@76: echo ' Chris@76: Chris@76: Chris@76: '; Chris@76: Chris@76: // If RSS feeds are enabled, advertise the presence of one. Chris@76: if (!empty($modSettings['xmlnews_enable'])) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: // If we're viewing a topic, these should be the previous and next topics, respectively. Chris@76: if (!empty($context['current_topic'])) Chris@76: echo ' Chris@76: Chris@76: '; Chris@76: Chris@76: // If we're in a board, or a topic for that matter, the index will be the board's index. Chris@76: if (!empty($context['current_board'])) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: // We'll have to use the cookie to remember the header... Chris@76: if ($context['user']['is_guest']) Chris@76: $options['collapse_header'] = !empty($_COOKIE['upshrink']); Chris@76: Chris@76: // Output any remaining HTML headers. (from mods, maybe?) Chris@76: echo $context['html_headers'], ' Chris@76: Chris@76: Chris@76: Chris@76: '; Chris@76: Chris@76: // Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!) Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // The logo and the three info boxes. Chris@76: echo ' Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76:
'; Chris@76: Chris@76: // This part is the logo and forum name. You should be able to change this to whatever you want... Chris@76: echo ' Chris@76: '; Chris@76: if (empty($settings['header_logo_url'])) Chris@76: echo ' Chris@76: ', $context['forum_name'], ''; Chris@76: else Chris@76: echo ' Chris@76: ', $context['forum_name'], ''; Chris@76: Chris@76: echo ' Chris@76:
Chris@76: Chris@76: *'; Chris@76: Chris@76: // Show the menu here, according to the menu sub template. Chris@76: template_menu(); Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // The main content should go here. A table is used because IE 6 just can't handle a div. Chris@76: echo ' Chris@76: Chris@76: Chris@76:
'; Chris@76: } Chris@76: Chris@76: function template_main_below() Chris@76: { Chris@76: global $context, $settings, $options, $scripturl, $txt; Chris@76: Chris@76: echo '
'; Chris@76: Chris@76: // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere! Chris@76: echo ' Chris@76: Chris@76:
Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76: Chris@76:
Chris@76: ', $txt['powered_by_mysql'], ' Chris@76: ', $txt['powered_by_php'], ' Chris@76: Chris@76: ', theme_copyright(), ' Chris@76: Chris@76: ', $txt['valid_xhtml'], ' Chris@76: ', $txt['valid_css'], ' Chris@76:
'; Chris@76: Chris@76: // Show the load time? Chris@76: if ($context['show_load_time']) Chris@76: echo ' Chris@76: ', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], ''; Chris@76: Chris@76: echo ' Chris@76:
'; Chris@76: Chris@76: // This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough. Chris@76: if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox']) Chris@76: { Chris@76: // The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself. Chris@76: echo ' Chris@76: '; Chris@76: } Chris@76: Chris@76: // The following will be used to let the user know that some AJAX process is running Chris@76: echo ' Chris@76: Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: // Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. Chris@76: function theme_linktree() Chris@76: { Chris@76: global $context, $settings, $options; Chris@76: Chris@76: // Folder style or inline? Inline has a smaller font. Chris@76: echo ''; Chris@76: Chris@76: // Each tree item has a URL and name. Some may have extra_before and extra_after. Chris@76: foreach ($context['linktree'] as $link_num => $tree) Chris@76: { Chris@76: // Show the | | |-[] Folders. Chris@76: if (!$settings['linktree_inline']) Chris@76: { Chris@76: if ($link_num > 0) Chris@76: echo str_repeat('| ', $link_num - 1), '|-'; Chris@76: echo '+  '; Chris@76: } Chris@76: Chris@76: // Show something before the link? Chris@76: if (isset($tree['extra_before'])) Chris@76: echo $tree['extra_before']; Chris@76: Chris@76: // Show the link, including a URL if it should have one. Chris@76: echo '', $settings['linktree_link'] && isset($tree['url']) ? '' . $tree['name'] . '' : $tree['name'], ''; Chris@76: Chris@76: // Show something after the link...? Chris@76: if (isset($tree['extra_after'])) Chris@76: echo $tree['extra_after']; Chris@76: Chris@76: // Don't show a separator for the last one. Chris@76: if ($link_num != count($context['linktree']) - 1) Chris@76: echo $settings['linktree_inline'] ? '  |  ' : '
'; Chris@76: } Chris@76: Chris@76: echo '
'; Chris@76: } Chris@76: Chris@76: // Show the menu up top. Something like [home] [help] [profile] [logout]... Chris@76: function template_menu() Chris@76: { Chris@76: global $context, $settings, $options, $scripturl, $txt; Chris@76: Chris@76: // Show the [home] and [help] buttons. Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator']; Chris@76: Chris@76: // How about the [search] button? Chris@76: if ($context['allow_search']) Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[182] . '' : $txt[182]), '', $context['menu_separator']; Chris@76: Chris@76: // Is the user allowed to administrate at all? ([admin]) Chris@76: if ($context['allow_admin']) Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[2] . '' : $txt[2]), '', $context['menu_separator']; Chris@76: Chris@76: // Edit Profile... [profile] Chris@76: if ($context['allow_edit_profile']) Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[79] . '' : $txt[467]), '', $context['menu_separator']; Chris@76: Chris@76: // The [calendar]! Chris@76: if ($context['allow_calendar']) Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt['calendar24'] . '' : $txt['calendar24']), '', $context['menu_separator']; Chris@76: Chris@76: // If the user is a guest, show [login] and [register] buttons. Chris@76: if ($context['user']['is_guest']) Chris@76: { Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[34] . '' : $txt[34]), '', $context['menu_separator'], ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[97] . '' : $txt[97]), ''; Chris@76: } Chris@76: // Otherwise, they might want to [logout]... Chris@76: else Chris@76: echo ' Chris@76: ', ($settings['use_image_buttons'] ? '' . $txt[108] . '' : $txt[108]), ''; Chris@76: } Chris@76: Chris@76: // Generate a strip of buttons, out of buttons. Chris@76: function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '') Chris@76: { Chris@76: global $settings, $buttons, $context, $txt, $scripturl; Chris@76: Chris@76: if (empty($button_strip)) Chris@76: return ''; Chris@76: Chris@76: // Create the buttons... Chris@76: foreach ($button_strip as $key => $value) Chris@76: { Chris@76: if (isset($value['test']) && empty($context[$value['test']])) Chris@76: { Chris@76: unset($button_strip[$key]); Chris@76: continue; Chris@76: } Chris@76: elseif (!isset($buttons[$key]) || $force_reset) Chris@76: $buttons[$key] = '' . ($settings['use_image_buttons'] ? '' . $txt[$value['text']] . '' : $txt[$value['text']]) . ''; Chris@76: Chris@76: $button_strip[$key] = $buttons[$key]; Chris@76: } Chris@76: Chris@76: echo ' Chris@76: ', implode($context['menu_separator'], $button_strip) , ''; Chris@76: } Chris@76: Chris@76: ?>