Smartys wrote:

Yeah, you can't have it both ways without a change in the way you call it elsewhere tongue

Darn! I guess I'll just use two different methods, one for PunBB and one for the rest of the site.

Thank you, Smartys!

Rick

Hi Smartys,
Thanks for your suggestion.  It worked perfectly for PunBB, and now the masthead is inserted in the right place. 

However, now the masthead disappears from the rest of the site!  Do you have any suggestions on how I might fix this?

Apparently the rest of my site needs those two php tags:
    ?>
    <?php

inside the body of the display_nav() method. Or they don't like it being saved to a string? This is how I call display_nav() in other parts of the site:

<body id="wordpress">
<?php display_nav(); ?>
<div id="page">

I'd really appreciate any further help you can give. Thanks!

-Rick

My Smartys,
Thanks for helping out.  I don't know PHP that well so I'm actually not sure how to answer your question about whether it's echoing directly or being stored to a string.  So I'll let the code speak for itself smile

This is what my display_nav() function looks like:

    function display_nav() {
    ?>
        <div id="masthead">
        <div id="logo"><img src="/site/public/images/logo.gif" /></div>
        <ul id="nav">
             <li id="t-contact"><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>
    <?php 
    } // end of display_head function

That's exactly what I needed.  Thanks so much. I would never have guessed an 18em border!

Rick

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

Hello,
I've spent hours trying to identify and style (color) a mystery div(s) in the viewtopic pages, and I was wondering if anybody can give me some help.

The mysterious div sits behind .postleft and .postfootleft.  It is the gray area in this screenshot:

http://s93.photobucket.com/albums/l56/u … enshot.jpg

I'd like it, of course, to be the same color as .postleft and .postfootleft, so I'd like to identify it and style it.

According to Firefox Web Developer extension's dom tool, this area is .postright and .postfootright:
html > body #punbb > div #punwrap > div #punviewtopic .pun > div #p2 .blockpost rowodd firstpost > div .box > div .inbox > div .postright

html > body #punbb > div #punwrap > div #punviewtopic .pun > div #p3 .blockpost roweven > div .box > div .inbox > div .postfootright

But when I style these:

#punbb #punwrap #punviewtopic .blockpost .postfootright {background-color: gray;} /* for example */

They are apparently different divs, covering only the right "column" of the post, not the left "column" where the user information is displayed.

This screenshot shows the result of the previous style.

http://s93.photobucket.com/albums/l56/u … styled.jpg

I wasn't sure whether I made that area gray or whether it came like that, but I used snagit and checked the color's hex in a photo editor, and searched for it in the CSS files, but found nothing that is styling this mystery element.

If anybody knows how I can get to this element and style it, pray tell!