'; // You don't need to manually load index.css, this will be set up for you. You can, of course, add // any other files you want, after template_css() has been run. Note that RTL will also be loaded for you. // The most efficient way of writing multi themes is to use a master index.css plus variant.css files. // If you've set them up properly (through $settings['theme_variants'], loadCSSFile will load the variant files for you. // load in any css from mods or themes so they can overwrite if wanted template_css(); // Save some database hits, if a width for multiple wrappers is set in admin. if (!empty($settings['forum_width'])) 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. if (!empty($context['links']['next'])) { echo ' '; } if (!empty($context['links']['prev'])) { 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() { global $context, $settings, $scripturl, $txt, $modSettings; // Wrapper div now echoes permanently for better layout options. h1 a is now target for "Go up" links. echo '
'; // If the user is logged in, display some things that might be useful. if ($context['user']['is_logged']) { // Firstly, the user's menu echo ' '; } // Otherwise they're a guest. Ask them to either register or login. else echo '
  • ', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $scripturl . '?action=login'), '
'; if ($context['allow_search']) { echo '
 '; // Using the quick search dropdown? if (!empty($modSettings['search_dropdown'])) { $selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all'); 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 '
'; echo '
'; // Otherwise they're a guest - this time ask them to either register or login - lazy bums... if (!empty($context['show_login_bar'])) { echo '
', $txt['quick_login_dec'], '
'; if (!empty($modSettings['enableOpenID'])) echo '
'; echo '
'; } else { echo ' ', $context['current_time']; } echo'
'; // Show a random news item? (or you could pick one from news_lines...) if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) echo '

', $txt['news'], ':

', $context['random_news_line'], '

'; echo '
'; // Show the menu here, according to the menu sub template, followed by the navigation tree. template_menu(); theme_linktree(); echo '
'; // The main content should go here. echo '
'; } function template_body_below() { global $context, $txt; echo '
'; // Show the XHTML, RSS and WAP2 links, as well as the copyright. // Footer is now full-width by default. Frame inside it will match theme wrapper width automatically. echo ' '; } function template_html_below() { // load in any javascipt that could be defered to the end of the page 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, $shown_linktree, $scripturl, $txt; // 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; 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 $context, $txt; 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) { // @todo this check here doesn't make much sense now (from 2.1 on), it should be moved to where the button array is generated // Kept for backward compatibility if (!isset($value['test']) || !empty($context[$value['test']])) $buttons[] = '
  • ' . $txt[$value['text']] . '
  • '; } // No buttons? No button strip either. if (empty($buttons)) return; echo ' '; } function template_maint_warning_above() { global $txt, $context, $scripturl; echo '
    ', $txt['forum_in_maintainence'], '
    ', sprintf($txt['maintenance_page'], $scripturl . '?action=admin;area=serversettings;' . $context['session_var'] . '=' . $context['session_id']), '
    '; } function template_maint_warning_below() { } ?>