'; // The ?alp21 part of this link is just here to make sure browsers don't cache it wrongly. echo ' '; // Some browsers need an extra stylesheet due to bugs/compatibility issues. // Note: Commented this out as it will be unnecessary if we go ahead with setting browser as id on . // foreach (array('ie7', 'ie6', 'webkit') as $cssfix) // if ($context['browser']['is_' . $cssfix]) // echo ' // '; // RTL languages require an additional stylesheet. if ($context['right_to_left']) echo ' '; // load in any css from mods or themes so they can overwrite if wanted template_css(); // Jquery Librarys if (isset($modSettings['jquery_source']) && $modSettings['jquery_source'] == 'cdn') echo ' '; elseif (isset($modSettings['jquery_source']) && $modSettings['jquery_source'] == 'local') echo ' '; else echo ' '; // Note that the Superfish function seems to like being called by the full syntax. // It doesn't appear to like being called by short syntax. Please test if contemplating changes. echo ' '; // Here comes the JavaScript bits! echo ' '; echo ' '; // load in any javascript files from mods and themes template_javascript(); echo ' ', !empty($context['meta_keywords']) ? ' ' : '', ' ', $context['page_title_html_safe'], ''; // Please don't index these Mr Robot. if (!empty($context['robot_no_index'])) echo ' '; // Present a canonical url for search engines to prevent duplicate content in their indices. if (!empty($context['canonical_url'])) echo ' '; // Show all the relative links, such as help, search, contents, and the like. echo ' ', ($context['allow_search'] ? ' ' : ''); // If RSS feeds are enabled, advertise the presence of one. if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) echo ' '; // If we're viewing a topic, these should be the previous and next topics, respectively. // Note: These have been modified to add additional functionality. Has already been tested live for two years. // Please see http://www.simplemachines.org/community/index.php?topic=210212.msg2546739#msg2546739 // and // http://www.simplemachines.org/community/index.php?topic=210212.msg2548628#msg2548628 for further details. if (!empty($context['links']['next'])) echo ' '; else if (!empty($context['current_topic'])) echo ' '; if (!empty($context['links']['prev'])) echo ' '; else if (!empty($context['current_topic'])) echo ' '; // If we're in a board, or a topic for that matter, the index will be the board's index. if (!empty($context['current_board'])) echo ' '; // Output any remaining HTML headers. (from mods, maybe?) echo $context['html_headers']; echo ' '; } function template_body_above() { // Note: Globals updated to allow linking member avatar to their profile. global $context, $settings, $options, $scripturl, $txt, $modSettings, $member; // Note: Echo a true top-of-page link. This is much better than just having the standard SMF "Go up" and "Go down" links. // Not that I have anything against going down, you understand. It's just that if one is going down one should do it properly. echo ' '; // Note: Header div is now full width. // We could change this later to an HTML5
tag if we use javascript to create some useful HTML5 elements for IE<9. // Example javascript here: http://www.nickyeoman.com/blog/html/118-html5-tags-in-ie8 // Note: Wrapper has been changed from an id to a class, to enable better theming options, and the ability to set forum width on the theme settings page has been removed. // Wrapper width is now set directly in index.css, as this is the only practical way of supporting an adaptable layout that will cope with mobile devices as well as desktop. echo '
'; // Note: Markup past this point may be slightly WIP. Wear your armour-plated undies. if ($context['user']['is_logged']) { if (!empty($context['user']['avatar'])) echo ' ', $context['user']['avatar']['image'], ''; echo ' '; } // the upshrink image, right-floated echo ' '; echo '
  '; // Search within current topic? if (!empty($context['current_topic'])) echo ' '; // If we're on a certain board, limit it to this board ;). elseif (!empty($context['current_board'])) echo ' '; echo '
'; echo '
'; // The main content should go here. echo '
'; // Custom banners and shoutboxes should be placed here, before the linktree. // Show the navigation tree. theme_linktree(); } function template_body_below() { global $context, $settings, $options, $scripturl, $txt, $modSettings; echo '
'; // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere! echo ' '; } function template_html_below() { global $context, $settings, $options, $scripturl, $txt, $modSettings; template_javascript(true); echo ' '; } /** * Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. * @param bool $force_show = false */ function theme_linktree($force_show = false) { global $context, $settings, $options, $shown_linktree, $txt, $scripturl; // If linktree is empty, just return - also allow an override. if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) return; echo ' '; $shown_linktree = true; } /** * Show the menu up top. Something like [home] [help] [profile] [logout]... */ function template_menu() { global $context, $settings, $options, $scripturl, $txt; echo ' '; } /** * Generate a strip of buttons. * @param array $button_strip * @param string $direction = '' * @param array $strip_options = array() */ function template_button_strip($button_strip, $direction = '', $strip_options = array()) { global $settings, $context, $txt, $scripturl; if (!is_array($strip_options)) $strip_options = array(); // List the buttons in reverse order for RTL languages. if ($context['right_to_left']) $button_strip = array_reverse($button_strip, true); // Create the buttons... $buttons = array(); foreach ($button_strip as $key => $value) { if (!isset($value['test']) || !empty($context[$value['test']])) $buttons[] = '
  • ' . $txt[$value['text']] . '
  • '; } // No buttons? No button strip either. if (empty($buttons)) return; // Can we have a first one too?. $buttons[0] = str_replace('" href="', ' first" href="', $buttons[0]); // Make the last one, as easy as possible. $buttons[count($buttons) - 1] = str_replace('" href="', ' last" href="', $buttons[count($buttons) - 1]); echo ' '; } /** * Output the Javascript files */ function template_javascript($do_defered = false) { global $context; // Use this hook to minify/optimize Javascript files call_integration_hook('pre_javascript_output'); foreach ($context['javascript_files'] as $filename => $options) if ((!$do_defered && empty($options['defer'])) || ($do_defered && !empty($options['defer']))) echo ' '; } /** * Output the Javascript vars */ function template_javascript_vars() { global $context; call_integration_hook('pre_javascript_vars_output'); foreach ($context['javascript_vars'] as $key => $value) echo ' var ', $key, ' = ', $value; } /** * Output the CSS files */ function template_css() { global $context; // Use this hook to minify/optimize CSS files call_integration_hook('pre_css_output'); foreach ($context['css_files'] as $filename => $options) echo ' '; } ?>