Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inserting a body file

    Hello hello,

    I downloaded the phpBB 2.0.4 and like it allot. What I want to do now is customize my site so that it all looks the same. I want the header and footer of every page to be called up, and then just add in different body files.

    Here is the header and footer on 1 page by themselves.

    http://www.charlatanz.com/a/faqz.php

    Now the problem is how I add in the body files. At first I thought right just add in the html in the link above, but that doesn’t work.

    What about a line like
    include($phpbb_root_path . 'includes/bodyfilehere.'.$phpEx);

    Heres the code for the link above

    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = './';
    include($phpbb_root_path . 'extension.inc');
    include($phpbb_root_path . 'common.'.$phpEx);

    //
    // Start session management
    //
    $userdata = session_pagestart($user_ip, PAGE_FAQ);
    init_userprefs($userdata);
    //
    // End session management
    //

    //
    // Load the appropriate faq file
    //
    if( isset($HTTP_GET_VARS['mode']) )
    {
    switch( $HTTP_GET_VARS['mode'] )
    {
    case 'bbcode':
    $lang_file = 'lang_bbcode';
    $l_title = $lang['BBCode_guide'];
    break;
    default:
    $lang_file = 'lang_faq';
    $l_title = $lang['Flash Intro'];
    break;
    }
    }
    else
    {
    $lang_file = 'lang_faq';
    $l_title = $lang['Flash Intro'];
    }
    include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);

    //
    // Pull the array data from the lang pack

    // Lets build a page ...
    //
    $page_title = $l_title;
    include($phpbb_root_path . 'includes/page_header.'.$phpEx);

    include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

    ?>

  • #2
    Registered User
    Join Date
    Feb 2003
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Templates??

    Hey,

    Not sure exactly what you want..

    But if you want templates, that is, make all of the forum look the same... go to the forum administration, and then modify the template.

    There should be some variables like,

    <HTML>
    <HEAD>
    #TITLE#
    #JAVASCRIPT#
    </HEAD>
    <BODY>
    #MENU#
    #FORUM#
    </BODY>
    </HTML>

    Then put the variables in your design etc.

    Post in the phpBB forum about this. I am sure its a piece of cake.

    Jesh

  • #3
    Registered User
    Join Date
    Feb 2003
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    404?

    It seems that the forum is missing from the URL you gave and on the site menu.

    Jesh

  • #4
    New Coder
    Join Date
    Jun 2002
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Arr its okay ive managed to figure it out.
    Thanks for the reply though.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •