ich glaub in der case anweisung geht irgendwas nicht, denn ich bekomme immer einen UNGÜLTIGEN FEHLER, wenn ich versuche einen 404 zu bekommen.
der fehler wird aber trotzdem schon im phpbb style angezeigt.....
eigene basteleien brachten mich leider nicht weiter. habt ihr ne idee ?
Code: Alles auswählen
########################################################
## Mod Title: phpBB 2.0 style HTTP error messages
## Mod Version: 1.0.0
## Author: Matthijs van de Water < matthijs@vandewater.tk >
## Description: Output nice phpBB 2.0 style error message
## on a HTTP error.
##
## Installation Level: Intermediate
## Installation Time: 5-8 Minutes
## Files To Edit: 3
## Included Files: None
########################################################
##
## Installation Notes:
##
## Create error.php as per instructions below.
## Add lines to your language file(s) as per instrucions.
## Create or add lines to your .htaccess file.
########################################################
#
#-----[ CREATE error.php IN phpBB ROOT ]------------------
#
<?php
define('IN_PHPBB', true);
// Output phpBB 2.0 style HTTP error message
$phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
if( empty($lang) )
{
if( !empty($board_config['default_lang']) )
{
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx);
}
else
{
include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);
}
}
switch ($code)
{
case '401':
case '403':
case '404':
case '500':
$message = $lang[$code . '_Description'];
$message_title = $lang['Error'] . ": " . $lang[$code];
break;
default:
$message = $lang['Unknown_error'];
break;
}
message_die(GENERAL_ERROR, $message, $message_title);
?>
#
#-----[ SAVE error.php ]----------------------------------
#
#
#-----[ OPEN language/lang_YOURLANGUAGE/lang_main.php ]---
#
#
#-----[ ADD FOLLOWING LINES TO BOTTOM ]-------------------
#
$lang['Unknown_error'] = "Unknown Error";
$lang['404'] = "404 - Not Found";
$lang['404_Description'] = "The page you are trying to reach does not exist on this server.<br />You can browse the forum by following one of the links above.<br /><br />We apologise for the inconvenience.";
$lang['401'] = "401 - Incorrect Password";
$lang['401_Description'] = "The username or password you supplied is not correct.<br />You can browse the forum by following one of the links above.";
$lang['403'] = "403 - Access Denied";
$lang['403_Description'] = "You don't have the proper rights to view this page.<br />You can browse the forum by following one of the links above.";
$lang['500'] = "500 - Internal Server Error";
$lang['500_Description'] = "An Internal Server Error occurred.<br />If reloading the page doens't help, please contact the system administrator.";
#
#-----[ SAVE lang_main.php ]--------------------------------
#
YOU CAN REPEAT THIS STEP FOR EVERY LANGUAGE IN USE.
#
#-----[ OPEN .htaccess IN phpBB ROOT ]----------------------
#
#
#-----[ ADD LINES ]-----------------------------------------
#
ErrorDocument 401 /PHPBB_PATH/error.php?code=401
ErrorDocument 403 /PHPBB_PATH/error.php?code=403
ErrorDocument 404 /PHPBB_PATH/error.php?code=404
ErrorDocument 500 /PHPBB_PATH/error.php?code=500
BE SURE TO REPLACE '/PHPBB_PATH/' WITH THE PATH PHPBB IS LOCATED
ON YOUR SERVER (i.e. /phpBB/ for http://phpbb.sourceforge.net/phpBB2/)
#
#-----[ SAVE .htaccess ] -----------------------------------
#
#
#-----------------------------------------------
#
und das beispiel der anleitung is auch falsch oder ?
BE SURE TO REPLACE '/PHPBB_PATH/' WITH THE PATH phpBB IS LOCATED
ON YOUR Server (i.e. /phpBB/ for http://phpBB.sourceforge.net/phpBB2/)
das hätt doch
(i.e. /phpBB2/ for ...
heissen müssen oder ?