Example #1
0
/**
 * Section above the main contents of the page, after opening the body tag
 */
function template_body_above()
{
    global $context, $settings, $scripturl, $txt, $modSettings;
    // Go to top/bottom of page links and skipnav link for a11y.
    echo '
	<a id="top" href="#skipnav">', $txt['skip_nav'], '</a>
	<a href="#top" id="gotop" title="', $txt['go_up'], '">&#8593;</a>
	<a href="#bot" id="gobottom" title="', $txt['go_down'], '">&#8595;</a>';
    // Skip nav link.
    echo '
	<div id="top_section">
		<div class="wrapper">';
    echo '
		</div>';
    // WAI-ARIA a11y tweaks have been applied here.
    echo '
		<div class="wrapper">
		<div class="menu_bg">
			<div class="menu_bg_margin">
				<div class="menu_bg_content">
					<div class="menu_bg_center">
					
					<div class="community_name">
					<div class="floatleft">
					<a href="', $scripturl, '">', $context['forum_name'], '</a>
					</div>
					</div>
					
					', template_menu(), '';
    call_template_callbacks('th', $context['theme_header_callbacks']);
    echo '		
					</div>
				</div>
			</div>
		</div>
		</div>
		
	</div>
	<div id="wrapper" class="wrapper">
		<div id="upper_section"', empty($context['minmax_preferences']['upshrink']) ? '' : ' style="display: none;" aria-hidden="true"', '>';
    call_template_callbacks('uc', $context['upper_content_callbacks']);
    echo '
		</div>';
    // Show the navigation tree.
    theme_linktree();
    // The main content should go here. @todo - Skip nav link.
    echo '
		<div id="main_content_section"><a id="skipnav"></a>';
}
/**
 * The infocenter ... stats, recent topics, other important information that never gets seen :P
 */
function template_info_center()
{
    global $context, $txt;
    // Here's where the "Info Center" starts...
    echo '
	<div id="info_center" class="forum_category">
		<h2 class="category_header">
			<span id="category_toggle">&nbsp;
				<span id="upshrink_ic" class="', empty($context['minmax_preferences']['info']) ? 'collapse' : 'expand', '" style="display: none;" title="', $txt['hide'], '"></span>
			</span>
			<a href="#" id="upshrink_link">', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '</a>
		</h2>
		<ul id="upshrinkHeaderIC" class="category_boards"', empty($context['minmax_preferences']['info']) ? '' : ' style="display: none;"', '>';
    call_template_callbacks('ic', $context['info_center_callbacks']);
    echo '
		</ul>
	</div>';
    // Info center collapse object.
    echo '
	<script><!-- // --><![CDATA[
		var oInfoCenterToggle = new elk_Toggle({
			bToggleEnabled: true,
			bCurrentlyCollapsed: ', empty($context['minmax_preferences']['info']) ? 'false' : 'true', ',
			aSwappableContainers: [
				\'upshrinkHeaderIC\'
			],
			aSwapClasses: [
				{
					sId: \'upshrink_ic\',
					classExpanded: \'collapse\',
					titleExpanded: ', JavaScriptEscape($txt['hide']), ',
					classCollapsed: \'expand\',
					titleCollapsed: ', JavaScriptEscape($txt['show']), '
				}
			],
			aSwapLinks: [
				{
					sId: \'upshrink_link\',
					msgExpanded: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), ',
					msgCollapsed: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), '
				}
			],
			oThemeOptions: {
				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
				sOptionName: \'minmax_preferences\',
				sSessionId: elk_session_id,
				sSessionVar: elk_session_var,
				sAdditionalVars: \';minmax_key=info\'
			},
			oCookieOptions: {
				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
				sCookieName: \'upshrinkIC\'
			}
		});
	// ]]></script>';
}
/**
 * Section above the main contents of the page, after opening the body tag
 */
function template_body_above()
{
    global $context, $settings, $scripturl, $txt, $modSettings;
    // Go to top/bottom of page links and skipnav link for a11y.
    echo '
	<a id="top" href="#skipnav">', $txt['skip_nav'], '</a>
	<a href="#top" id="gotop" title="', $txt['go_up'], '">&#8593;</a>
	<a href="#bot" id="gobottom" title="', $txt['go_down'], '">&#8595;</a>';
    // Skip nav link.
    echo '
	<div id="top_section">
		<div class="wrapper">';
    call_template_callbacks('th', $context['theme_header_callbacks']);
    echo '
		</div>
		<div id="header" class="wrapper centerheader"', empty($context['minmax_preferences']['upshrink']) ? '' : ' style="display: none;" aria-hidden="true"', '>

			<div id="logobox">';
    if (!empty($settings['header_logo_url'])) {
        echo '
			<h1 id="forumtitle">
			    <a href="', $scripturl, '"><img id="logo" src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" title="', $context['forum_name_html_safe'], '" /></a>
			</h1>';
    } else {
        echo '
			<h1 id="forumtitle">
				<a href="', $scripturl, '">', $context['forum_name'], '</a>
			</h1>';
    }
    echo '
		</div>', empty($settings['site_slogan']) ? '' : '';
    echo '
			    <div id="siteslogan" class="bluelkslogan">' . $settings['site_slogan'] . '<br /></div>', '
			   </div>';
    // Show the menu here, according to the menu sub template.
    // WAI-ARIA a11y tweaks have been applied here.
    echo '
		<div id="menu_nav" role="navigation">
			', template_menu(), '
		</div>
	</div>
	<div id="wrapper" class="wrapper">
		<div id="upper_section"', empty($context['minmax_preferences']['upshrink']) ? '' : ' style="display: none;" aria-hidden="true"', '>';
    call_template_callbacks('uc', $context['upper_content_callbacks']);
    echo '
		</div>';
    // Show the navigation tree.
    theme_linktree();
    // The main content should go here. @todo - Skip nav link.
    echo '
		<div id="main_content_section"><a id="skipnav"></a>';
}