phpBB - Where should I add a PHP header?

Discussion in 'Programming' started by virruss, Dec 14, 2007.

  1. #1
    Hi,

    Does anyone know where (in which file) should I add some PHP code in order display a dynamic header showing the other sections of my website?

    I want to add something like:


    <?php include'my_global_nav.php'; ?>
    Code (markup):


    Thank you.
     
    virruss, Dec 14, 2007 IP
  2. wootwoot

    wootwoot Peon

    Messages:
    118
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    at the top of every file...or at the top of a file which is inside every other file
     
    wootwoot, Dec 15, 2007 IP
  3. danzor

    danzor Peon

    Messages:
    208
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Add it to overall_header.html.

    You also have to enable PHPBB to allow PHP in templates (you do in PHPBB3, not sure about 2).

    Then in your template you can use
    <!-- PHP -->
    include'my_global_nav.php';
    <!-- ENDPHP -->
    Code (markup):
     
    danzor, Dec 15, 2007 IP
  4. virruss

    virruss Peon

    Messages:
    112
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It worked. Thank you!
     
    virruss, Dec 16, 2007 IP