Topic: Masthead shows up above DOCTYPE declaration
Hello,
I'm trying to integrate PunBB into my site in such a way that my site-wide navigation/masthead appears at the top of all my PunBB pages, but I'm having a problem getting it to show up in the right place. Instead of appearing where I want it to, between <body> and <div id="punwrap">, the masthead is appearing at the top of the document, before the DOCTYPE declaration.
Instead of inserting it to where I want it, it leaves this empty (my masthead is supposed to show up between the below tags):
<body id="punbb">
<div id="punwrap">
And throws the masthead above the doctype declaration:
<div id="masthead">
<div id="logo"><img src="/site/public/images/logo.gif" /></div>
<ul id="nav">
<li id="t-contact" class="last"><a href="/site/contact">Contact</a></li>
<li id="t-forum"><a href="/site/forum">Forum</a></li>
<li id="t-blog"><a href="/site/blog">Blog</a></li>
<li id="t-home"><a href="/site/">Home</a></li>
</ul>
</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr">
I added <site_nav> in the header.php file:
// END SUBST - <body>
//START SUBST <site_nav>, calls display_nav from segments.inc
$navigation = display_nav();
$tpl_nav = $navigation;
$tpl_main = str_replace('<site_nav>', $tpl_nav, $tpl_main);
// END SUBST - <site_nav>
// START SUBST - <pun_page>
And inserted it where I wanted it in the main.tpl file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
<link rel="stylesheet" href="http://localhost/elginite/site_style.css" type="text/css" media="screen" />
</head>
<body id="punbb">
<site_nav>
<div id="punwrap">
I'm not that experienced with PHP, so I might be doing something obviously wrong. I don't know, but I've run out of ideas, and I would really appreciate any help I can get on this! Thank you for replying.
~Rick