Chris@76: Chris@76: Chris@76: '; Chris@76: Chris@76: // The ?fin20 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: // Some browsers need an extra stylesheet due to bugs/compatibility issues. Chris@76: foreach (array('ie7', 'ie6', 'webkit') as $cssfix) Chris@76: if ($context['browser']['is_' . $cssfix]) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: // RTL languages require an additional stylesheet. Chris@76: if ($context['right_to_left']) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: // Here comes the JavaScript bits! Chris@76: echo ' Chris@76: Chris@76: Chris@76: '; Chris@76: Chris@76: echo ' Chris@76: Chris@76: ', !empty($context['meta_keywords']) ? ' Chris@76: ' : '', ' Chris@76: ', $context['page_title_html_safe'], ''; Chris@76: Chris@76: // Please don't index these Mr Robot. Chris@76: if (!empty($context['robot_no_index'])) Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: // Present a canonical url for search engines to prevent duplicate content in their indices. Chris@76: if (!empty($context['canonical_url'])) 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']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) 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: // Output any remaining HTML headers. (from mods, maybe?) Chris@76: echo $context['html_headers']; Chris@76: Chris@76: echo ' Chris@76: Chris@76: '; Chris@76: } Chris@76: Chris@76: function template_body_above() Chris@76: { Chris@76: global $context, $settings, $options, $scripturl, $txt, $modSettings; Chris@76: Chris@76: echo !empty($settings['forum_width']) ? ' Chris@76:
' : '', ' Chris@76: '; Chris@76: Chris@76: // The main content should go here. Chris@76: echo ' Chris@76:
Chris@76:
'; Chris@76: Chris@76: // Custom banners and shoutboxes should be placed here, before the linktree. Chris@76: Chris@76: // Show the navigation tree. Chris@76: theme_linktree(); Chris@76: } Chris@76: Chris@76: function template_body_below() Chris@76: { Chris@76: global $context, $settings, $options, $scripturl, $txt, $modSettings; Chris@76: Chris@76: echo ' Chris@76:
Chris@76:
'; 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: ', !empty($settings['forum_width']) ? ' Chris@76:
' : ''; Chris@76: } Chris@76: Chris@76: function template_html_below() Chris@76: { Chris@76: global $context, $settings, $options, $scripturl, $txt, $modSettings; Chris@76: Chris@76: echo ' 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($force_show = false) Chris@76: { Chris@76: global $context, $settings, $options, $shown_linktree; Chris@76: Chris@76: // If linktree is empty, just return - also allow an override. Chris@76: if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) Chris@76: return; Chris@76: Chris@76: echo ' Chris@76: '; Chris@76: Chris@76: $shown_linktree = true; 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: echo ' Chris@76: '; Chris@76: } Chris@76: Chris@76: // Generate a strip of buttons. Chris@76: function template_button_strip($button_strip, $direction = 'top', $strip_options = array()) Chris@76: { Chris@76: global $settings, $context, $txt, $scripturl; Chris@76: Chris@76: if (!is_array($strip_options)) Chris@76: $strip_options = array(); Chris@76: Chris@76: // List the buttons in reverse order for RTL languages. Chris@76: if ($context['right_to_left']) Chris@76: $button_strip = array_reverse($button_strip, true); Chris@76: Chris@76: // Create the buttons... Chris@76: $buttons = array(); Chris@76: foreach ($button_strip as $key => $value) Chris@76: { Chris@76: if (!isset($value['test']) || !empty($context[$value['test']])) Chris@76: $buttons[] = ' Chris@76:
  • ' . $txt[$value['text']] . '
  • '; Chris@76: } Chris@76: Chris@76: // No buttons? No button strip either. Chris@76: if (empty($buttons)) Chris@76: return; Chris@76: Chris@76: // Make the last one, as easy as possible. Chris@76: $buttons[count($buttons) - 1] = str_replace('', '', $buttons[count($buttons) - 1]); Chris@76: Chris@76: echo ' Chris@76: '; Chris@76: } Chris@76: Chris@76: ?>