Der funktionierende Testaufbau aus meinem letzten Beitrag sieht so aus
Öffne
viewonline.php
Finde
Davor füge eine
Code: Alles auswählen
$user->lang['ERROR_VIEWONLINE_400'] = 'Is on 400 Error Page';
$user->lang['ERROR_VIEWONLINE_401'] = 'Is on 401 Error Page';
$user->lang['ERROR_VIEWONLINE_403'] = 'Is on 403 Error Page';
$user->lang['ERROR_VIEWONLINE_404'] = 'Is on 404 Error Page';
$user->lang['ERROR_VIEWONLINE_500'] = 'Is on 500 Error Page';
// Errorpages in Viewonline
if (strpos($row['session_page'], 'mode=400') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_400'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx", 'mode=400');
}
else if (strpos($row['session_page'], 'mode=401') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_401'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx", 'mode=401');
}
else if (strpos($row['session_page'], 'mode=403') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_403'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx", 'mode=403');
}
else if (strpos($row['session_page'], 'mode=404') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_404'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx", 'mode=404');
}
else if (strpos($row['session_page'], 'mode=500') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_500'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx", 'mode=500');
}
// Errorpages in Viewonline
Erstelle
error.php mit folgendem Inhalt
Code: Alles auswählen
<?php
/**
* @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();
// Easy Error Page 1
$mode = request_var('mode', '', true);
// Header
page_header('This is a ' . $mode . ' Error');
// Error Mode
$template->assign_var('ERROR', $mode);
// Template File
$template->set_filenames(array(
'body' => 'error.html')
);
// Footer
page_footer();
?>
Erstelle
styles/prosilver/template/error.html mit folgendem Inhalt
Code: Alles auswählen
<!-- INCLUDE overall_header.html -->
<div class="navbar" style="background-color:#F6F4D0;">
<div class="inner"><span class="corners-top"><span></span></span>
<h3 style="position:relative;top:-10px;">Error Page</h3>
<h4>This is a {ERROR} Error</h4>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- INCLUDE overall_footer.html -->
und check mal die Viewonline mit User und Gast und zwei Browsern