I think your best bet would be to do it this way. This is the way I did it and achieved a great custom 404 error page. my
404 page for reference.
First create the php file. Name this file 404.php
Code: Select all
<?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('404 Error');
$template->set_filenames(array(
'body' => 404.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Save this file to the root of your phpbb installation.
Next you will make the actual html page.
Make a new page and name it 404.html
Code: Select all
<!-- INCLUDE overall_header.html -->
<h2>404 Error</h2>
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<p>
<img src="yourstyle/theme/images/404pic1.jpg">
</p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
Save and upload to yourstyle/template.
This should work. If the image code doesn't work use the direct path for it as in.
http://yourdomain/styles/theme/images/404pic1.jpg
Hope this works for you.