I hope you can show me what I am missing. I have edited the theme source from the tutorial to change the header on Prince of Darkness by Antechinus. It is a curve variant. I have changed the class on a couple of items, and added it to css. I have also replaced the PM info in topbar to reflect unread posts and unread replies. I added the news to the middle bar div. I also changed the colors of course to match the dark theme. The theme works, sort of.
There are no parse errors, but the middle div disappears upon logout.
I am sure it has to do with this- if ($context['user']['is_logged']) in the top_bar_guts div.
When logged in, everything works and is where I want it, and then upon logout, the entire middle, middle_innner, and middle_guts div simply does not display, but everything else does.
I am an extreme PHP novice, so I am guessing it is something simple.
here is just the portion that I have altered from index.template.php
echo '
</head>
<body>';
}
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div class="top_bar">
<div class="top_bar_inner" style="width: ', !empty($settings['forum_width']) ? $settings['forum_width'] : '' ,'">
<div class="top_bar_guts">
<div class="floatleft">';
if ($context['user']['is_logged'])
echo '
<span><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a>
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></span>
</div>
<div class="floatright">
<span>', $context['current_time'], '</span>
</div>
</div>
</div>
</div>
<div class="middle">
<div class="middle_inner" style="width: ', !empty($settings['forum_width']) ? $settings['forum_width'] : '' ,'">
<div class="middle_guts">
<div class="logo_banner">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</div>
<div class="middle_quick_search">
<div class="floatright">
<div class="themenews">
';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<p>', $txt['news'], ': </p>
<p>', $context['random_news_line'], '</p>';
echo '
</div>
</div>
</div>
</div>
</div>
</div>
<div class="nav_bar">
<div class="nav_bar_inner" style="width: ', !empty($settings['forum_width']) ? $settings['forum_width'] : '' ,'">
<div class="nav_bar_guts">
', template_menu() ,'
</div>
</div>
</div>
';
echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
';
// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">';