Thanks to pentapenguin at phpBB for writing the original article, I thought I would post it here as well for easy and quick reference

This tutorial will show you how to add a new customized page to phpBB. Why would you want to do this? Say for example, you want to make a new web page that looks just like your forum. This new page can contain anything you want from simple text like a list of rules to more complicated things like other PHP scripts, for example, calendars. Let's get started.

The aboutus.php file

When you are creating the aboutus.php page, make sure there are no blank lines and/or spaces before the <?php and after the ?> parts.

For this example, we'll create a simple page that tells a little about the site. Copy and paste the code below into your favourite text editor.
Code:
   <?php

   define('IN_PHPBB', true);

   $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

   $phpEx = substr(strrchr(__FILE__, '.'), 1);

   include($phpbb_root_path . 'common.' . $phpEx);



   // Start session management

   $user->session_begin();

   $auth->acl($user->data);

   $user->setup();



   page_header('Title Here');



   $template->set_filenames(array(

     'body' => 'yourpage_body.html',

   ));



   make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

   page_footer();

   ?>

Is that it? Not quite, so let me explain.

If you are creating a completely custom page, you probably won't need to do this, but if you need access to the phpBB language files, then change this line:
Code:
$user->setup();

to this:
Code:
$user->setup('base-name-of-language-file-here');
Replace base-name-of-language-file-here with the name of the language file you want without the .php extension. For example, if you need to load the viewtopic.php language file, then use this code:
Code:
$user->setup('viewtopic');
The first change you need to change is this line:
Code:
page_header('Title Here');
Just change Title Here to whatever you want displayed in the title bar of the browser. For our example, we'll change it to About Us.

The next thing you will need to change is this line:
Code:
'body' => 'yourpage_body.html',
Again, let me explain further why you need to change this. phpBB separates the logic of the page (all the PHP code) from the design (colours, images, backgrounds, etc.) and text (the HTML file). You will need to change yourpage_body.html to something more clear like aboutus_body.html -- and we're done editing this file. Save the file above in your text editor as aboutus.php (note: Microsoft Windows may try to add a .txt extension on the end so if that happens, save it as "aboutus.php" including the quote marks).

Bonus Tip

If you would like to restrict access to the page to logged in users only, then find this line
Code:
$user->setup();
and add this bit of code after that
Code:
if ($user->data['user_id'] == ANONYMOUS)

   {

     login_box('', $user->lang['LOGIN']);

   }
The aboutus_body.html file
Next, we'll create the HTML file that contains the actual content of aboutus.php. Again, with your favourite text editor open, copy the following code:


Code:
<!-- INCLUDE overall_header.html -->



   <h2>Title Here</h2>



   <div class="panel">

     <div class="inner"><span class="corners-top"><span></span></span>



     <div class="content">

      <p>

         Content in here.

      </p>

     </div>



     <span class="corners-bottom"><span></span></span></div>

   </div>



   <!-- INCLUDE jumpbox.html -->

   <!-- INCLUDE overall_footer.html -->
This is pretty easy to do. To change the name of the page which is displayed in big letters near the top, just change this line:
Code:
<h2>Title Here</h2>
Replace Title Here with About Us.

And this is the section where you include all of your actual content:
Code:
Content in here.
You can add whatever HTML and CSS code and text in here you want. (If you don't know HTML or CSS, I'd recommend learning them. Both are easy to learn. The W3Schools site has excellent tutorials.) Here's a quick example with a little bit of text and a list of items:
Code:
         We were founded this year to bring you the best forum on the Internet!

       

         We promise to do the following:

         <ul>

         <li>Provide new content</li>

         <li>provide a friendly atmosphere</li>

         <li>Provide an environment where you can have fun!</li>

         </ul>
Wrapping it up

If you followed the directions here are what the two files should look like now:

aboutus.php:

Code:
<?php

   define('IN_PHPBB', true);

   $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

   $phpEx = substr(strrchr(__FILE__, '.'), 1);

   include($phpbb_root_path . 'common.' . $phpEx);



   // Start session management

   $user->session_begin();

   $auth->acl($user->data);

   $user->setup();



   page_header('About Us');



   $template->set_filenames(array(

     'body' => 'aboutus_body.html',

   ));



   make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

   page_footer();

   ?>
aboutus_body.html:
Code:
<!-- INCLUDE overall_header.html -->



   <h2>About Us</h2>



   <div class="panel">

     <div class="inner"><span class="corners-top"><span></span></span>



     <div class="content">

      <p>

         We were founded this year to bring you the best forum on the Internet!

       

         We promise to do the following:

         <ul>

         <li>Provide new content</li>

         <li>provide a friendly atmosphere</li>

         <li>Provide an environment where you can have fun!</li>

         </ul>

      </p>

     </div>



     <span class="corners-bottom"><span></span></span></div>

   </div>



   <!-- INCLUDE jumpbox.html -->

   <!-- INCLUDE overall_footer.html -->

Final steps

Now save the file you were just changing as aboutus_body.html and upload it to the styles/your style name here/template/ directory on your web server. Also upload the aboutus.php file to your web server in the main phpBB directory (the same place where you uploaded files like faq.php, viewforum.php, viewtopic.php, etc.).

Finally go to http://www.example.c...he-place-where- ... boutus.php to see your brand new custom page!

Enjoy!