Make a blank page for phpbb3.

Status
Not open for further replies.

Daniel S

New Member
Messages
2,395
Reaction score
0
Points
0
Hi. Does anybody know how i can make a blank page that i can use with phpbb3 tha uses my header and footer.

An example if you go to my error page on my website so to access that you could just type in http://www.thecomputerforum.co.uk/dfsdfsdfsdf

If you look where it says error 404 i would like the page like that except it would have links and titles of other websites that link to us.

Thank you.
 

Daniel S

New Member
Messages
2,395
Reaction score
0
Points
0
Ok here is the code of error.php

PHP:
<?php
/** 
*
* @package phpBB3
* @version $Id: $
* @copyright (c) 2008 Francis W. Fisher (Phantom) http://radoncube.com/
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/
/**
* @ignore
*/
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('mods/error');
$base_url = generate_board_url() . '/';
$template->assign_vars(array(
 'S_ERROR_PAGE' => true,
 'U_FORUM_BASE' => $base_url,
));
//set title of error page
$msg_title = $user->lang['ERROR_TITLE'];
$mode = request_var('mode', 0);
switch ($mode)
{
 case '400':
 trigger_error('ERROR_BAD_REQUEST');
 break;
 case '401':
  trigger_error('ERROR_AUTH_REQUIRED');
 break;
 case '403':
  trigger_error('ERROR_FORBIDDEN');
 break;
 case '404':
  trigger_error('ERROR_NOT_FOUND');
 break;
 case '500':
  trigger_error('ERROR_INT_SERVER');
 break;
 default:
  trigger_error('ERROR_UNKNOWN');
 break;
}
?>
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
Maybe instead of calling the trigger_error() function for every case, you could just echo the text which you want to show or include a file that you want to show.

For your case put in some code like this, instead of the "case 404" code (also change the filename based on what you want it to be.). ;)

PHP:
 case '404':
  include($phpbb_root_path.'404_error.php');
 
Last edited:

Daniel S

New Member
Messages
2,395
Reaction score
0
Points
0
I have now got this sorted.

[closed]

EDIT:

Except i have noticed i can not close the thread lol.
 
Last edited by a moderator:
Status
Not open for further replies.
Top